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

Iterator for iterating over a DtRwIntrusiveList of DtSimStatements and all its descendants (as represented by each DtSimStatement's list of DtSimBlock subblocks). More...

List of all members.

Public Member Functions

 DtRecursiveSimBlockIterator (DtSimBlock *simBlock)
 Constructor.
 DtRecursiveSimBlockIterator (const DtRecursiveSimBlockIterator &orig)
 Copy Constructor.
const DtRecursiveSimBlockIteratoroperator= (const DtRecursiveSimBlockIterator &orig)
 Assignment Operator.
virtual ~DtRecursiveSimBlockIterator ()
 Destructor.
DtRecursiveSimBlockIteratorclone () 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 DtSimStatementcursor () const
 get a pointer to the cursor. Use with care.
virtual DtSimStatementparentStatement () 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

DtSimStatementmyCursor
DtSimBlockmyList
DtRecursiveSimStatementIteratormyChildIterator
DtRecursiveSimStatementIteratormyParentIterator

Detailed Description

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.


Constructor & Destructor Documentation

Default Constructor. Do not use.

Constructor.

simBlock is the DtSimBlock whose statements are to be iterated over.

Copy Constructor.

Destructor.


Member Function Documentation

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

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

get a pointer to the cursor. Use with care.

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.

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.


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)