11 #include <vlutil/vlPrint.h>
40 virtual unsigned int size()
const {
return myMap.size(); }
46 virtual const std::map<K, T*>&
map() {
return myMap; };
78 DtWarn(
"DtIteratorBase::reset() unexpected location specified.\n");
126 return myMap.begin()->second;
142 return myMap.rbegin()->second;
162 typename std::map<K, T*>::const_iterator nextItem =
myCursor;
170 if (nextItem !=
myMap.end())
172 return nextItem->second;
180 typename std::map<K, T*>::const_iterator nextItem =
myCursor;
184 nextItem =
myMap.end();
196 if (nextItem !=
myMap.end())
198 return nextItem->second;
226 return myMap.rbegin()->second;
242 return myMap.begin()->second;
258 typename std::map<K, T*>::const_iterator tmpCursor =
myCursor;
268 tmpCursor =
myMap.end();
276 if (tmpCursor ==
myMap.end())
280 tmpCursor =
myMap.begin();
284 tmpCursor =
myMap.end();
294 if (tmpCursor !=
myMap.end())
296 return tmpCursor->second;
311 typename std::map<K, T*>::const_iterator prevItem =
myCursor;
315 prevItem =
myMap.end();
327 if (prevItem !=
myMap.end())
329 return prevItem->second;
337 typename std::map<K, T*>::const_iterator prevItem =
myCursor;
345 if (prevItem !=
myMap.end())
347 return prevItem->second;
362 typename std::map<K, T*>::const_iterator tmpCursor =
myCursor;
368 tmpCursor =
myMap.end();
380 if (tmpCursor ==
myMap.end())
384 tmpCursor =
myMap.end();
389 tmpCursor =
myMap.begin();
398 if (tmpCursor !=
myMap.end())
400 return tmpCursor->second;
419 const std::map<K, T*>&
myMap;
virtual ~DtMapIteratorBase()
Definition: mapIteratorBase.h:37
virtual T * last(bool move=true)
Definition: mapIteratorBase.h:410
virtual bool empty() const
Definition: mapIteratorBase.h:44
virtual T * internalPrev(bool move=true)
If the cursor is 0, returns 0 (move is ignored in this case).
Definition: mapIteratorBase.h:305
T * operator++()
Definition: mapIteratorBase.h:414
virtual bool reset(bool reverse=false)
Sets the cursor and the direction of this iterator over the list.
Definition: mapIteratorBase.h:52
virtual T * first(bool move=true)
Definition: mapIteratorBase.h:407
virtual T * internalWrapNext(bool move=true)
If the cursor is 0, returns 0 (move is ignored in this case).
Definition: mapIteratorBase.h:251
virtual T * internalNext(bool move=true)
Definition: mapIteratorBase.h:156
virtual const std::map< K, T * > & map()
Definition: mapIteratorBase.h:46
DtIteratorDirection myDirection
Definition: mapIteratorBase.h:421
T * operator*()
Definition: mapIteratorBase.h:148
Definition: iteratorBase.h:19
Definition: iteratorBase.h:26
DtMapIteratorBase(const DtMapIteratorBase &orig)
Copy constructor.
Definition: mapIteratorBase.h:34
virtual T * current()
Definition: mapIteratorBase.h:406
Definition: iteratorBase.h:25
Definition: iteratorBase.h:20
DtIteratorDirection
Definition: iteratorBase.h:23
virtual T * next(bool move=true)
Definition: mapIteratorBase.h:408
virtual T * wrapNext(bool move=true)
Definition: mapIteratorBase.h:411
DtMapIteratorBase(const std::map< K, T * > &map)
Constructor. Supply the DtList to be iterated over.
Definition: mapIteratorBase.h:31
virtual void setDirection(DtIteratorDirection direction)
Sets the direction of this iterator. The cursor is not moved.
Definition: mapIteratorBase.h:95
virtual bool reset(DtIteratorLocation location, DtIteratorDirection direction=DtIteratorForward)
Sets the cursor and the direction of this iterator over the list.
Definition: mapIteratorBase.h:60
Description: DtMapIteratorBase is the base class for iterators used to iterate over a std::map...
Definition: mapIteratorBase.h:18
T * operator--()
Definition: mapIteratorBase.h:415
DtIteratorLocation
Definition: iteratorBase.h:17
virtual T * prev(bool move=true)
Definition: mapIteratorBase.h:409
virtual T * internalWrapPrev(bool move=true)
Definition: mapIteratorBase.h:355
const DtMapIteratorBase & operator=(const DtMapIteratorBase &orig)
Assignment Operator.
virtual T * internalFirst(bool move=true)
Returns the first vertex in the list if going DtIteratorForward, and the last vertex if going DtItera...
Definition: mapIteratorBase.h:111
virtual DtIteratorDirection direction()
Returns the current direction of the iterator.
Definition: mapIteratorBase.h:101
virtual T * wrapPrev(bool move=true)
Definition: mapIteratorBase.h:412
virtual unsigned int size() const
Definition: mapIteratorBase.h:40
std::map< K, T * >::const_iterator myCursor
Definition: mapIteratorBase.h:420
const std::map< K, T * > & myMap
Definition: mapIteratorBase.h:415
virtual T * internalCurrent() const
Returns the current vertex. The cursor is not moved.
Definition: mapIteratorBase.h:151
virtual T * internalLast(bool move=true)
Returns the last vertex in the list if going DtIteratorForward, and the first vertex if going DtItera...
Definition: mapIteratorBase.h:211
T * operator->()
Definition: mapIteratorBase.h:147
virtual void reverse()
Reverses the direction of this iterator. The cursor is not moved.
Definition: mapIteratorBase.h:87