#include <ddggroup.h>
Public Members | |||
ddgIterator ( void ) | |||
Default Constructor. | |||
ddgIterator ( ddgGroup *l ) | |||
Constuctor initialized with a ddgGroup. | |||
void | initFirst ( ddgGroup * l ) | ||
void | initLast ( ddgGroup * l ) | ||
ddgNode* | operator * ( void ) const | ||
Return the element in the list to which the iterator is currently pointing. | |||
ddgIterator& | operator++ ( void ) | ||
Inlining of the following causes problems in some cases on the SGI. More... | |||
ddgIterator& | operator++ ( int ) | ||
{ if (_list && (_index < _list->size())) _index++; return *this;}. | |||
ddgIterator& | operator-- ( void ) | ||
{ DIterator tmp = *this; if (_list && (_index < _list->size())) _index++; return tmp;}. | |||
ddgIterator& | operator-- ( int ) | ||
{ if (_list && (_index >= 0)) _index--; return *this;}. |
It remebers its current location in the object it is traversing. Multiple Iterators can operate on the same DGroup.
ddgIterator & ddgIterator::operator++ (void) |
Inlining of the following causes problems in some cases on the SGI.
The following while expression will fail: Iterator it( list ), it2 ( list2 ); while ( *it++ && *it2++) { do something }