Tools.h++ Manual
104011 Tandem Computers Incorporated 21-105
21
RWDlistCollectablesIterator
RWDlistCollectablesIterator
||
RWIterator RWDlistIterator
|
RWSlistIterator
Synopsis
#include <rw/dlistcol.h>
RWDlistCollectables d;
RWDlistCollectablesIterator it(d);
Description Iterator for class
RWDlistCollectables
. Traverses the linked-list from the
first (head) to the last (tail) item. Functions are provided for moving in either
direction.
Like all Tools.h++ iterators, the "current item" is undefined immediately after
construction—you must define it by using
operator()
or some other (valid)
operation.
Once the iterator has advanced beyond the end of the collection it is no longer
valid—continuing to use it will bring undefined results.
Public constructor
RWDlistCollectablesIterator (RWDlistCollectables& d);
Construct a
RWDlistCollectablesIterator
from a
RWDlistCollectables
. Immediately after construction, the position of the
iterator is undefined.
Public member operators
virtual RWCollectable* operator()();
Redefined from class
RWIterator
. Advances the iterator to the next item and
returns it. Returns nil when the end of the list is reached.
void operator++();
Advances the iterator one item.
void operator--();
Moves the iterator back one item.
void operator+=(size_t n);
Advances the iterator
n
items.