![]() |
VR-Forces 4.1.1 Class Documentation
|
Iterator for iterating over a DtList of DtSimBlock subblocks and all its descendants (each DtSimBlock is a DtRwIntrusiveList of DtSimStatements). More...
Public Member Functions | |
| DtRecursiveSimStatementIterator (DtSimStatement *statement) | |
| Constructor. | |
| DtRecursiveSimStatementIterator (const DtRecursiveSimStatementIterator &orig) | |
| Copy Constructor. | |
| const DtRecursiveSimStatementIterator & | operator= (const DtRecursiveSimStatementIterator &orig) |
| Assignment Operator. | |
| virtual | ~DtRecursiveSimStatementIterator () |
| Destructor. | |
| DtRecursiveSimStatementIterator * | 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 int | cursor () const |
| get a pointer to the cursor. Use with care. | |
| virtual DtSimStatement * | statement () const |
| get a pointer to our statement. | |
| virtual DtSimStatement * | parentStatement () const |
| get a pointer to the current statement's parent statement. | |
| virtual int | parentSubBlockIndex () const |
| get index of parent subblock in which the current statement resides. | |
| virtual void | setParentIterator (DtRecursiveSimBlockIterator *parentIterator) |
| set/get the parent iterator (the one that created us). | |
| virtual DtRecursiveSimBlockIterator * | parentIterator () const |
Protected Member Functions | |
| DtRecursiveSimStatementIterator () | |
| Default Constructor. Do not use. | |
Protected Attributes | |
| int | myCursor |
| DtSimStatement * | myStatement |
| DtRecursiveSimBlockIterator * | myChildIterator |
| DtRecursiveSimBlockIterator * | myParentIterator |
Iterator for iterating over a DtList of DtSimBlock subblocks and all its descendants (each DtSimBlock is a DtRwIntrusiveList of DtSimStatements).
This iterator performs an pre-order iteration over the 'forest' that represents the statement's descendants.
|
protected |
Default Constructor. Do not use.
| DtRecursiveSimStatementIterator::DtRecursiveSimStatementIterator | ( | DtSimStatement * | statement | ) |
Constructor.
Pass in the statement whose sub-blocks are to be iterated over.
| DtRecursiveSimStatementIterator::DtRecursiveSimStatementIterator | ( | const DtRecursiveSimStatementIterator & | orig | ) |
Copy Constructor.
|
virtual |
Destructor.
| const DtRecursiveSimStatementIterator& DtRecursiveSimStatementIterator::operator= | ( | const DtRecursiveSimStatementIterator & | orig | ) |
Assignment Operator.
| DtRecursiveSimStatementIterator* DtRecursiveSimStatementIterator::clone | ( | ) | const |
|
virtual |
Calls reset() if reset arg is true (useful for for() loops).
Returns the first object on the list
|
virtual |
returns the current object. List index is unmodified.
|
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 |
sets the current pointer to the start of the list.
Normally this isn't needed if you use the standard for loop syntax.
|
virtual |
get a pointer to the cursor. Use with care.
|
virtual |
get a pointer to our statement.
|
virtual |
get a pointer to the current statement's parent statement.
|
virtual |
get index of parent subblock in which the current statement resides.
|
virtual |
set/get the parent iterator (the one that created us).
parentIterator is the iterator over our parent statement's sub blocks, inside one of which our statement belongs (its the iterator that spawned us).
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |