![]() |
VR-Forces 4.7 Class Documentation
|
Description: DtMapIteratorBase is the base class for iterators used to iterate over a std::map. More...

Public Member Functions | |
| DtMapIteratorBase (const std::map< K, T * > &map) | |
| Constructor. Supply the DtList to be iterated over. | |
| DtMapIteratorBase (const DtMapIteratorBase &orig) | |
| Copy constructor. | |
| virtual | ~DtMapIteratorBase () |
| virtual unsigned int | size () const |
| virtual bool | empty () const |
| virtual const std::map< K, T * > & | map () |
| 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 of 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 T * | internalFirst (bool move=true) |
| Returns the first vertex in the list if going DtIteratorForward, and the last vertex if going DtIteratorReverse. | |
| T * | operator-> () |
| T * | operator* () |
| virtual T * | internalCurrent () const |
| Returns the current vertex. The cursor is not moved. | |
| 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 std::map< K, T * > & | myMap |
| std::map< K, T * >::const_iterator | myCursor |
| DtIteratorDirection | myDirection |
Private Member Functions | |
| DtMapIteratorBase () | |
| const DtMapIteratorBase & | operator= (const DtMapIteratorBase &orig) |
| Assignment Operator. | |
Description: DtMapIteratorBase is the base class for iterators used to iterate over a std::map.
It wraps the std::map::iterator to provide an interface similar to DtIteratorBase.
|
private |
|
inline |
Constructor. Supply the DtList to be iterated over.
References DtMapIteratorBase< K, T >::first().
|
inline |
Copy constructor.
|
inlinevirtual |
|
private |
Assignment Operator.
|
inlinevirtual |
References DtMapIteratorBase< K, T >::myMap.
|
inlinevirtual |
References DtMapIteratorBase< K, T >::myMap.
|
inlinevirtual |
References DtMapIteratorBase< K, T >::myMap.
|
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.
References DtIteratorBeginning, DtIteratorEnd, DtIteratorForward, DtIteratorReverse, and DtMapIteratorBase< K, T >::reverse().
Referenced by DtMapIteratorBase< K, T >::internalFirst(), and DtMapIteratorBase< K, T >::internalLast().
|
inlinevirtual |
Sets the cursor and the direction of this iterator over the list.
References DtMapIteratorBase< K, T >::direction(), DtIteratorBeginning, DtIteratorEnd, DtMapIteratorBase< K, T >::myCursor, DtMapIteratorBase< K, T >::myDirection, and DtMapIteratorBase< K, T >::myMap.
|
inlinevirtual |
Reverses the direction of this iterator. The cursor is not moved.
References DtIteratorForward, DtIteratorReverse, and DtMapIteratorBase< K, T >::myDirection.
Referenced by DtMapIteratorBase< K, T >::reset().
|
inlinevirtual |
Sets the direction of this iterator. The cursor is not moved.
References DtMapIteratorBase< K, T >::direction(), and DtMapIteratorBase< K, T >::myDirection.
|
inlinevirtual |
Returns the current direction of the iterator.
References DtMapIteratorBase< K, T >::myDirection.
Referenced by DtMapIteratorBase< K, T >::reset(), and DtMapIteratorBase< K, T >::setDirection().
|
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
References DtIteratorForward, DtMapIteratorBase< K, T >::myDirection, DtMapIteratorBase< K, T >::myMap, and DtMapIteratorBase< K, T >::reset().
Referenced by DtMapIteratorBase< K, T >::first().
|
inline |
References DtMapIteratorBase< K, T >::current().
|
inline |
References DtMapIteratorBase< K, T >::current().
|
inlinevirtual |
Returns the current vertex. The cursor is not moved.
References DtMapIteratorBase< K, T >::myCursor, and DtMapIteratorBase< K, T >::myMap.
Referenced by DtMapIteratorBase< K, T >::current().
|
inlinevirtual |
|
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
References DtIteratorForward, DtMapIteratorBase< K, T >::myDirection, DtMapIteratorBase< K, T >::myMap, and DtMapIteratorBase< K, T >::reset().
Referenced by DtMapIteratorBase< K, T >::last().
|
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.
References DtIteratorForward, DtMapIteratorBase< K, T >::myCursor, DtMapIteratorBase< K, T >::myDirection, and DtMapIteratorBase< K, T >::myMap.
Referenced by DtMapIteratorBase< K, T >::wrapNext().
|
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.
References DtIteratorForward, DtMapIteratorBase< K, T >::myCursor, DtMapIteratorBase< K, T >::myDirection, and DtMapIteratorBase< K, T >::myMap.
Referenced by DtMapIteratorBase< K, T >::prev().
|
inlinevirtual |
|
inlinevirtual |
References DtMapIteratorBase< K, T >::internalCurrent().
Referenced by DtMapIteratorBase< K, T >::operator*(), and DtMapIteratorBase< K, T >::operator->().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalFirst().
Referenced by DtMapIteratorBase< K, T >::DtMapIteratorBase(), and DtVrfObjectFilterMapIterator::first().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalNext().
Referenced by DtVrfObjectFilterMapIterator::next(), and DtMapIteratorBase< K, T >::operator++().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalPrev().
Referenced by DtMapIteratorBase< K, T >::operator--(), and DtVrfObjectFilterMapIterator::prev().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalLast().
Referenced by DtVrfObjectFilterMapIterator::last().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalWrapNext().
Referenced by DtVrfObjectFilterMapIterator::wrapNext().
|
inlinevirtual |
Reimplemented in DtVrfObjectFilterMapIterator.
References DtMapIteratorBase< K, T >::internalWrapPrev().
Referenced by DtVrfObjectFilterMapIterator::wrapPrev().
|
inline |
References DtMapIteratorBase< K, T >::next().
|
inline |
References DtMapIteratorBase< K, T >::prev().
|
protected |
Referenced by DtMapIteratorBase< K, T >::empty(), DtMapIteratorBase< K, T >::internalCurrent(), DtMapIteratorBase< K, T >::internalFirst(), DtMapIteratorBase< K, T >::internalLast(), DtMapIteratorBase< K, T >::internalNext(), DtMapIteratorBase< K, T >::internalPrev(), DtMapIteratorBase< K, T >::internalWrapNext(), DtMapIteratorBase< K, T >::internalWrapPrev(), DtMapIteratorBase< K, T >::map(), DtMapIteratorBase< K, T >::reset(), and DtMapIteratorBase< K, T >::size().
|
protected |
|
protected |
Referenced by DtMapIteratorBase< K, T >::direction(), DtMapIteratorBase< K, T >::internalFirst(), DtMapIteratorBase< K, T >::internalLast(), DtMapIteratorBase< K, T >::internalNext(), DtMapIteratorBase< K, T >::internalPrev(), DtMapIteratorBase< K, T >::internalWrapNext(), DtMapIteratorBase< K, T >::internalWrapPrev(), DtMapIteratorBase< K, T >::reset(), DtMapIteratorBase< K, T >::reverse(), and DtMapIteratorBase< K, T >::setDirection().