VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
DtRecursiveSimStatementIterator Class Reference

Iterator for iterating over a DtList of DtSimBlock subblocks and all its descendants (each DtSimBlock is a DtRwIntrusiveList of DtSimStatements). More...

List of all members.

Public Member Functions

 DtRecursiveSimStatementIterator (DtSimStatement *statement)
 Constructor.
 DtRecursiveSimStatementIterator (const DtRecursiveSimStatementIterator &orig)
 Copy Constructor.
const
DtRecursiveSimStatementIterator
operator= (const DtRecursiveSimStatementIterator &orig)
 Assignment Operator.
virtual ~DtRecursiveSimStatementIterator ()
 Destructor.
DtRecursiveSimStatementIteratorclone () const
virtual DtSimStatementfirst (bool reset=true)
 Calls reset() if reset arg is true (useful for for() loops).
virtual DtSimStatementcurrent () const
 returns the current object. List index is unmodified.
virtual DtSimStatementnext ()
 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 DtSimStatementstatement () const
 get a pointer to our statement.
virtual DtSimStatementparentStatement () 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
DtSimStatementmyStatement
DtRecursiveSimBlockIteratormyChildIterator
DtRecursiveSimBlockIteratormyParentIterator

Detailed Description

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.


Constructor & Destructor Documentation

Default Constructor. Do not use.

Constructor.

Pass in the statement whose sub-blocks are to be iterated over.

Copy Constructor.

Destructor.


Member Function Documentation

const DtRecursiveSimStatementIterator& DtRecursiveSimStatementIterator::operator= ( const DtRecursiveSimStatementIterator orig)

Assignment Operator.

virtual DtSimStatement* DtRecursiveSimStatementIterator::first ( bool  reset = true) [virtual]

Calls reset() if reset arg is true (useful for for() loops).

Returns the first object on the list

returns the current object. List index is unmodified.

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 DtRecursiveSimStatementIterator::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 int DtRecursiveSimStatementIterator::cursor ( ) const [virtual]

get a pointer to the cursor. Use with care.

get a pointer to our statement.

get a pointer to the current statement's parent statement.

get index of parent subblock in which the current statement resides.

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).


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)