#include <ProfileIterator.h>
Collaboration diagram for vpr::ProfileIterator:

Public Methods | |
| void | first (void) |
| Access the first child of the parent. More... | |
| void | next (void) |
| Access the next child of the parent. More... | |
| ProfileIterator * | getChild (void) |
| ProfileIterator * | getSibling (void) |
| bool | isDone (void) |
| Tells if the there are no more children to iterate through. More... | |
| void | enterChild (int index) |
| Make the given child the new parent. More... | |
| void | enterLargestChild (void) |
| Make the largest child the new parent. More... | |
| void | enterParent (void) |
| Make the current parent's parent the new parent. More... | |
| const char * | getCurrentName (void) |
| int | getCurrentTotalCalls (void) |
| float | getCurrentTotalTime (void) |
| const char * | getCurrentParentName (void) |
| void | printTree (ProfileNode *node) |
| const ProfileNode::NodeHistoryRange | getNodeHistoryRange () |
| int | getCurrentParentTotalCalls (void) |
| float | getCurrentParentTotalTime (void) |
Protected Methods | |
| ProfileIterator (ProfileNode *start) | |
Protected Attributes | |
| ProfileNode * | mCurrentParent |
| ProfileNode * | mCurrentChild |
Friends | |
| class | ProfileManager |
Definition at line 18 of file ProfileIterator.h.
|
|
Definition at line 6 of file ProfileIterator.cpp. References mCurrentChild, and mCurrentParent. Referenced by getChild, and getSibling.
00007 {
00008 mCurrentParent = start;
00009 mCurrentChild = mCurrentParent->getChild();
00010 }
|
|
|
Access the first child of the parent.
Definition at line 12 of file ProfileIterator.cpp. References mCurrentChild, and mCurrentParent.
00013 {
00014 mCurrentChild = mCurrentParent->getChild();
00015 }
|
|
|
Access the next child of the parent.
Definition at line 17 of file ProfileIterator.cpp. References mCurrentChild, and mCurrentParent. Referenced by enterChild.
00018 {
00019 ProfileNode* temp;
00020 temp = mCurrentParent;
00021 mCurrentParent = mCurrentChild;
00022 mCurrentChild = mCurrentChild->getChild();
00023 if(mCurrentChild == NULL)
00024 {
00025 mCurrentChild = mCurrentParent;
00026 mCurrentParent = temp;
00027 mCurrentChild->getSibling();
00028 }
00029 }
|
|
|
Definition at line 32 of file ProfileIterator.h. References mCurrentChild, and ProfileIterator.
00032 {return new ProfileIterator(mCurrentChild->getChild());}
|
|
|
Definition at line 34 of file ProfileIterator.h. References mCurrentChild, and ProfileIterator.
00034 {return new ProfileIterator(mCurrentChild->getSibling());}
|
|
|
Tells if the there are no more children to iterate through.
Definition at line 31 of file ProfileIterator.cpp. References mCurrentChild.
00032 {
00033 return mCurrentChild == NULL;
00034 }
|
|
|
Make the given child the new parent.
Definition at line 36 of file ProfileIterator.cpp. References enterParent, mCurrentChild, mCurrentParent, and next.
00037 {
00038 mCurrentChild = mCurrentParent->getChild();
00039 while ( (mCurrentChild != NULL) && (index != 0) ) {
00040 index--;
00041 mCurrentChild = mCurrentChild->getSibling();
00042 }
00043
00044 if ( mCurrentChild != NULL ) {
00045 mCurrentParent = mCurrentChild;
00046 mCurrentChild = mCurrentParent->getChild();
00047 }
00048 if(mCurrentChild == NULL)
00049 {
00050 enterParent();
00051 next();
00052 }
00053 }
|
|
|
Make the largest child the new parent.
|
|
|
Make the current parent's parent the new parent.
Definition at line 55 of file ProfileIterator.cpp. References mCurrentChild, and mCurrentParent. Referenced by enterChild.
00056 {
00057 if ( mCurrentParent->getParent() != NULL ) {
00058 mCurrentParent = mCurrentParent->getParent();
00059 }
00060 mCurrentChild = mCurrentParent->getChild();
00061 }
|
|
|
Definition at line 62 of file ProfileIterator.h. References mCurrentChild.
00062 { return mCurrentChild->getName(); }
|
|
|
Definition at line 67 of file ProfileIterator.h. References mCurrentChild.
00067 { return mCurrentChild->getTotalCalls(); }
|
|
|
Definition at line 72 of file ProfileIterator.h. References mCurrentChild.
00072 { return mCurrentChild->getTotalTime(); }
|
|
|
Definition at line 77 of file ProfileIterator.h. References mCurrentParent.
00077 { return mCurrentParent->getName(); }
|
|
|
Definition at line 82 of file ProfileIterator.h.
00082 {node->printTree(node);}
|
|
|
Definition at line 87 of file ProfileIterator.h. References mCurrentChild.
00087 { return mCurrentChild->getNodeHistoryRange();}
|
|
|
Definition at line 92 of file ProfileIterator.h. References mCurrentParent.
00092 { return mCurrentParent->getTotalCalls(); }
|
|
|
Definition at line 97 of file ProfileIterator.h. References mCurrentParent.
00097 { return mCurrentParent->getTotalTime(); }
|
|
|
Definition at line 105 of file ProfileIterator.h. |
|
|
Definition at line 101 of file ProfileIterator.h. Referenced by enterChild, enterParent, first, getCurrentParentName, getCurrentParentTotalCalls, getCurrentParentTotalTime, next, and ProfileIterator. |
|
|
Definition at line 102 of file ProfileIterator.h. Referenced by enterChild, enterParent, first, getChild, getCurrentName, getCurrentTotalCalls, getCurrentTotalTime, getNodeHistoryRange, getSibling, isDone, next, and ProfileIterator. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002