![]() |
VR-Forces 4.0.4 Class Documentation
|
Iterator for iterating over a DtRwIntrusiveList of DtSimStatements and all its descendants (as represented by each DtSimStatement's list of DtSimBlock subblocks). More...
Public Member Functions | |
| DtRecursiveSimBlockIterator (DtSimBlock *simBlock) | |
| Constructor. | |
| DtRecursiveSimBlockIterator (const DtRecursiveSimBlockIterator &orig) | |
| Copy Constructor. | |
| const DtRecursiveSimBlockIterator & | operator= (const DtRecursiveSimBlockIterator &orig) |
| Assignment Operator. | |
| virtual | ~DtRecursiveSimBlockIterator () |
| Destructor. | |
| DtRecursiveSimBlockIterator * | clone () const |
| virtual DtSimStatement * | first (bool reset=true) |
| Calls reset() if reset arg is true (useful for for() loops). | |
| virtual DtSimStatement * | current () const |
| returns the current object. List index is unmodified. | |
| virtual DtSimStatement * | next () |
| moves the index to the next position and returns the object at that position in the list. | |
| virtual void | reset () |
| sets the current pointer to the start of the list. | |
| virtual DtSimStatement * | cursor () const |
| get a pointer to the cursor. Use with care. | |
| virtual DtSimStatement * | parentStatement () const |
| set/get a pointer to the current statement's parent statement. | |
| virtual int | parentSubBlockIndex () const |
| set/get index of parent subblock in which the current statement resides. | |
| virtual void | setParentIterator (DtRecursiveSimStatementIterator *parentIterator) |
| set/get parent iterator. | |
| virtual DtRecursiveSimStatementIterator * | parentIterator () const |
Protected Member Functions | |
| DtRecursiveSimBlockIterator () | |
| Default Constructor. Do not use. | |
Protected Attributes | |
| DtSimStatement * | myCursor |
| DtSimBlock * | myList |
| DtRecursiveSimStatementIterator * | myChildIterator |
| DtRecursiveSimStatementIterator * | myParentIterator |
Iterator for iterating over a DtRwIntrusiveList of DtSimStatements and all its descendants (as represented by each DtSimStatement's list of DtSimBlock subblocks).
This iterator performs an pre-order iteration over the 'forest' that represents the DtSimBlock's descendants.
| DtRecursiveSimBlockIterator::DtRecursiveSimBlockIterator | ( | ) | [protected] |
Default Constructor. Do not use.
Constructor.
simBlock is the DtSimBlock whose statements are to be iterated over.
| DtRecursiveSimBlockIterator::DtRecursiveSimBlockIterator | ( | const DtRecursiveSimBlockIterator & | orig | ) |
Copy Constructor.
| virtual DtRecursiveSimBlockIterator::~DtRecursiveSimBlockIterator | ( | ) | [virtual] |
Destructor.
| const DtRecursiveSimBlockIterator& DtRecursiveSimBlockIterator::operator= | ( | const DtRecursiveSimBlockIterator & | orig | ) |
Assignment Operator.
| virtual DtSimStatement* DtRecursiveSimBlockIterator::first | ( | bool | reset = true | ) | [virtual] |
Calls reset() if reset arg is true (useful for for() loops).
Returns the first object on the list
| virtual DtSimStatement* DtRecursiveSimBlockIterator::current | ( | ) | const [virtual] |
returns the current object. List index is unmodified.
| virtual DtSimStatement* DtRecursiveSimBlockIterator::next | ( | ) | [virtual] |
moves the index to the next position and returns the object at that position in the list.
Returns null if already at the end of list.
| virtual void DtRecursiveSimBlockIterator::reset | ( | ) | [virtual] |
sets the current pointer to the start of the list.
Normally this isn't needed if you use the standard for loop syntax.
| virtual DtSimStatement* DtRecursiveSimBlockIterator::cursor | ( | ) | const [virtual] |
get a pointer to the cursor. Use with care.
| virtual DtSimStatement* DtRecursiveSimBlockIterator::parentStatement | ( | ) | const [virtual] |
set/get a pointer to the current statement's parent statement.
Accessor is recursive. If currently iterating over a child (myChildIterator exists), invokes child iterator's parentStatement() method. Otherwise, returns myParentStmt.
| virtual int DtRecursiveSimBlockIterator::parentSubBlockIndex | ( | ) | const [virtual] |
set/get index of parent subblock in which the current statement resides.
Accessor is recursive. If currently iterating over a child (myChildIterator exists), invokes child iterator's subBlockIndex() method. Otherwise, returns myParentSubBlockIndex.
| virtual void DtRecursiveSimBlockIterator::setParentIterator | ( | DtRecursiveSimStatementIterator * | parentIterator | ) | [virtual] |
set/get parent iterator.
parentIterator is the iterator over our parent statement. Should be NULL in the case that simBlock is the top-level block in a plan. parentIterator is the iterator that created us.
| virtual DtRecursiveSimStatementIterator* DtRecursiveSimBlockIterator::parentIterator | ( | ) | const [virtual] |
DtSimStatement* DtRecursiveSimBlockIterator::myCursor [protected] |
DtSimBlock* DtRecursiveSimBlockIterator::myList [protected] |