VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Attributes | Private Member Functions
DtIteratorBase< T > Class Template Reference

Description: DtIteratorBase is the base class for iterators. More...

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

List of all members.

Public Member Functions

 DtIteratorBase (const DtList &list)
 Constructor. Supply the DtList to be iterated over.
 DtIteratorBase (const DtIteratorBase &orig)
 Copy constructor.
virtual ~DtIteratorBase ()
virtual unsigned int size () const
virtual bool empty () const
virtual const DtList & list ()
virtual bool reset (bool reverse=false)
 Sets the cursor and the direction of this iterator over the list.
virtual bool reset (DtIteratorLocation location, DtIteratorDirection direction=DtIteratorForward)
 Sets the cursor and the direction of this iterator over the list.
virtual void reverse ()
 Reverses the direction if this iterator. The cursor is not moved.
virtual void setDirection (DtIteratorDirection direction)
 Sets the direction of this iterator. The cursor is not moved.
virtual DtIteratorDirection direction ()
 Returns the current direction of the iterator.
virtual int cursorIndex () const
 Returns current cursor index in list.
virtual void setCursorIndex (int i)
virtual T * internalFirst (bool move=true)
 Returns the first vertex in the list if going DtIteratorForward, and the last vertex if going DtIteratorReverse.
virtual T * internalCurrent () const
 Returns the current vertex. The cursor is not moved.
virtual DtListItem * cursor () const
 Returns the current cursor. Use with caution.
virtual T * itemToObject (DtListItem *item, bool move)
virtual T * internalNext (bool move=true)
virtual T * internalLast (bool move=true)
 Returns the last vertex in the list if going DtIteratorForward, and the first vertex if going DtIteratorReverse.
virtual T * internalWrapNext (bool move=true)
 If the cursor is 0, returns 0 (move is ignored in this case).
virtual T * internalPrev (bool move=true)
 If the cursor is 0, returns 0 (move is ignored in this case).
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)
 Assignment Operator.

Detailed Description

template<class T>
class DtIteratorBase< T >

Description: DtIteratorBase is the base class for iterators.


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 ( ) [inline, virtual]

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 [inline, virtual]
Returns:
The size of the container being iterated over.
template<class T>
virtual bool DtIteratorBase< T >::empty ( ) const [inline, virtual]
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 ( ) [inline, virtual]
template<class T>
virtual bool DtIteratorBase< T >::reset ( bool  reverse = false) [inline, virtual]

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 DtIteratorBase< DtVrfObject >::internalFirst(), DtIteratorBase< DtVrfObject >::internalLast(), and DtIteratorBase< DtVrfObject >::reset().

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

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

template<class T>
virtual void DtIteratorBase< T >::reverse ( ) [inline, virtual]

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

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

template<class T>
virtual void DtIteratorBase< T >::setDirection ( DtIteratorDirection  direction) [inline, virtual]

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

template<class T>
virtual DtIteratorDirection DtIteratorBase< T >::direction ( ) [inline, virtual]

Returns the current direction of the iterator.

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

template<class T>
virtual int DtIteratorBase< T >::cursorIndex ( ) const [inline, virtual]

Returns current cursor index in list.

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

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 DtBaseSimObjectIterator< DtVrfObject >::first(), and DtIteratorBase< DtVrfObject >::first().

template<class T>
virtual T* DtIteratorBase< T >::internalCurrent ( ) const [inline, virtual]

Returns the current vertex. The cursor is not moved.

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

template<class T>
virtual DtListItem* DtIteratorBase< T >::cursor ( ) const [inline, virtual]

Returns the current cursor. Use with caution.

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

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 DtBaseSimObjectIterator< DtVrfObject >::last(), and DtIteratorBase< DtVrfObject >::last().

template<class T>
virtual T* DtIteratorBase< T >::internalWrapNext ( bool  move = true) [inline, virtual]

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 DtBaseSimObjectIterator< DtVrfObject >::wrapNext(), and DtIteratorBase< DtVrfObject >::wrapNext().

template<class T>
virtual T* DtIteratorBase< T >::internalPrev ( bool  move = true) [inline, virtual]

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 DtBaseSimObjectIterator< DtVrfObject >::prev(), and DtIteratorBase< DtVrfObject >::prev().

template<class T>
virtual T* DtIteratorBase< T >::internalWrapPrev ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::current ( ) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::first ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::next ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::prev ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::last ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::wrapNext ( bool  move = true) [inline, virtual]
template<class T>
virtual T* DtIteratorBase< T >::wrapPrev ( bool  move = true) [inline, virtual]
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 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)