VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
DtIteratorBase< T > Class Template Reference

template<class T>
class DtIteratorBase< T >

Description: DtIteratorBase is the base class for iterators used to iterate over a DtList.

Inheritance diagram for DtIteratorBase< T >:
Inheritance graph
[legend]

Public Member Functions

 DtIteratorBase (const DtList &list)
 
 DtIteratorBase (const DtIteratorBase &orig)
 
virtual ~DtIteratorBase ()
 
virtual unsigned int size () const
 
virtual bool empty () const
 
virtual const DtList & list () const
 
virtual bool reset (bool reverse=false)
 
virtual bool reset (DtIteratorLocation location, DtIteratorDirection direction=DtIteratorForward)
 
virtual void reverse ()
 
virtual void setDirection (DtIteratorDirection direction)
 
virtual DtIteratorDirection direction ()
 
virtual int cursorIndex () const
 
virtual void setCursorIndex (int i)
 
virtual T * internalFirst (bool move=true)
 
T * operator-> ()
 
T * operator* ()
 
virtual T * internalCurrent () const
 
virtual DtListItem * cursor () const
 
virtual T * itemToObject (DtListItem *item, bool move)
 
virtual T * internalNext (bool move=true)
 
virtual T * internalLast (bool move=true)
 
virtual T * internalWrapNext (bool move=true)
 
virtual T * internalPrev (bool move=true)
 
virtual T * internalWrapPrev (bool move=true)
 
virtual T * current ()
 
virtual T * first (bool move=true)
 
virtual T * next (bool move=true)
 
virtual T * prev (bool move=true)
 
virtual T * last (bool move=true)
 
virtual T * wrapNext (bool move=true)
 
virtual T * wrapPrev (bool move=true)
 
T * operator++ ()
 
T * operator-- ()
 

Protected Attributes

const DtList & myList
 
DtListItem * myCursor
 
DtIteratorDirection myDirection
 

Private Member Functions

 DtIteratorBase ()
 
const DtIteratorBaseoperator= (const DtIteratorBase &orig)
 

Constructor & Destructor Documentation

template<class T>
DtIteratorBase< T >::DtIteratorBase ( )
private
template<class T>
DtIteratorBase< T >::DtIteratorBase ( const DtList &  list)
inline

Constructor. Supply the DtList to be iterated over.

template<class T>
DtIteratorBase< T >::DtIteratorBase ( const DtIteratorBase< T > &  orig)
inline

Copy constructor.

template<class T>
virtual DtIteratorBase< T >::~DtIteratorBase ( )
inlinevirtual

Member Function Documentation

template<class T>
const DtIteratorBase& DtIteratorBase< T >::operator= ( const DtIteratorBase< T > &  orig)
private

Assignment Operator.

template<class T>
virtual unsigned int DtIteratorBase< T >::size ( ) const
inlinevirtual
Returns
The size of the container being iterated over.
template<class T>
virtual bool DtIteratorBase< T >::empty ( ) const
inlinevirtual
Returns
A boolean specifying whether or not the container being iterated over is empty or not.
template<class T>
virtual const DtList& DtIteratorBase< T >::list ( ) const
inlinevirtual
template<class T>
virtual bool DtIteratorBase< T >::reset ( bool  reverse = false)
inlinevirtual

Sets the cursor and the direction of this iterator over the list. If reverse is false, DtIteratorBeginning and DtIteratorForward are used, otherwise, DtIteratorEnd and DtIteratorReverse are used. Returns true unless the list is empty.

Referenced by DtVrfProcessStateRepositoryIterator::first(), DtSimObjectStateRepositoryIterator::first(), DtIteratorBase< DtLocalVector >::internalFirst(), DtIteratorBase< DtLocalVector >::internalLast(), DtVrfProcessStateRepositoryIterator::last(), DtSimObjectStateRepositoryIterator::last(), DtIteratorBase< DtLocalVector >::reset(), and DtRecursiveResourceIterator::reset().

template<class T>
virtual bool DtIteratorBase< T >::reset ( DtIteratorLocation  location,
DtIteratorDirection  direction = DtIteratorForward 
)
inlinevirtual

Sets the cursor and the direction of this iterator over the list.

template<class T>
virtual void DtIteratorBase< T >::reverse ( )
inlinevirtual

Reverses the direction if this iterator. The cursor is not moved.

Referenced by DtIteratorBase< DtLocalVector >::reset().

template<class T>
virtual void DtIteratorBase< T >::setDirection ( DtIteratorDirection  direction)
inlinevirtual

Sets the direction of this iterator. The cursor is not moved.

template<class T>
virtual DtIteratorDirection DtIteratorBase< T >::direction ( )
inlinevirtual

Returns the current direction of the iterator.

Referenced by DtIteratorBase< DtLocalVector >::reset(), and DtIteratorBase< DtLocalVector >::setDirection().

template<class T>
virtual int DtIteratorBase< T >::cursorIndex ( ) const
inlinevirtual

Returns current cursor index in list.

template<class T>
virtual void DtIteratorBase< T >::setCursorIndex ( int  i)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::internalFirst ( bool  move = true)
inlinevirtual

Returns the first vertex in the list if going DtIteratorForward, and the last vertex if going DtIteratorReverse. If move is true, first() resets this iterator to DtIteratorBeginning and DtIteratorForward if going DtIteratorForward DtIteratorEnd and DtIteratorReverse if going DtIteratorReverse.

Referenced by DtIteratorBase< DtLocalVector >::first().

template<class T>
T* DtIteratorBase< T >::operator-> ( )
inline
template<class T>
T* DtIteratorBase< T >::operator* ( )
inline
template<class T>
virtual T* DtIteratorBase< T >::internalCurrent ( ) const
inlinevirtual

Returns the current vertex. The cursor is not moved.

Referenced by DtIteratorBase< DtLocalVector >::current().

template<class T>
virtual DtListItem* DtIteratorBase< T >::cursor ( ) const
inlinevirtual

Returns the current cursor. Use with caution.

template<class T>
virtual T* DtIteratorBase< T >::itemToObject ( DtListItem *  item,
bool  move 
)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::internalNext ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::internalLast ( bool  move = true)
inlinevirtual

Returns the last vertex in the list if going DtIteratorForward, and the first vertex if going DtIteratorReverse. If move is true, last() resets this iterator to DtIteratorEnd and DtIteratorReverse if going DtIteratorForward DtIteratorBeginning and DtIteratorForward if going DtIteratorReverse.

Referenced by DtIteratorBase< DtLocalVector >::last().

template<class T>
virtual T* DtIteratorBase< T >::internalWrapNext ( bool  move = true)
inlinevirtual

If the cursor is 0, returns 0 (move is ignored in this case). Otherwise, returns the vertex at the next position in the list in the current direction and if move is true, moves the cursor there.

Referenced by DtIteratorBase< DtLocalVector >::wrapNext().

template<class T>
virtual T* DtIteratorBase< T >::internalPrev ( bool  move = true)
inlinevirtual

If the cursor is 0, returns 0 (move is ignored in this case). Otherwise, returns the vertex at the previous position in the list in the current direction and if move is true, moves the cursor there.

Referenced by DtIteratorBase< DtLocalVector >::prev().

template<class T>
virtual T* DtIteratorBase< T >::internalWrapPrev ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::current ( )
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::first ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::next ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::prev ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::last ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::wrapNext ( bool  move = true)
inlinevirtual
template<class T>
virtual T* DtIteratorBase< T >::wrapPrev ( bool  move = true)
inlinevirtual
template<class T>
T* DtIteratorBase< T >::operator++ ( )
inline
template<class T>
T* DtIteratorBase< T >::operator-- ( )
inline

Member Data Documentation

template<class T>
const DtList& DtIteratorBase< T >::myList
protected
template<class T>
DtListItem* DtIteratorBase< T >::myCursor
protected
template<class T>
DtIteratorDirection DtIteratorBase< T >::myDirection
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)