Tools.h++ Manual
104011 Tandem Computers Incorporated 22-11
22
RWTIsvDlistIterator<T>
Synopsis
#include <rw/tidlist.h>
RWTIsvDlist<T> list;
RWTIsvDlistIterator<T> iterator(list);
Description Iterator for class
RWTIsvDlist<T>
, allowing sequential access to all the
elements of a doubly-linked parameterized intrusive list. Elements are
accessed in order, 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
RWTIsvDlistIterator(RWTIsvDlist<T>& c);
Constructs an iterator to be used with the list
c
.
Public operators
T* operator++();
Advances the iterator one position, returning a pointer to the new link, or nil if
the end of the list has been reached.
T* operator--();
Reverses the iterator one position, returning a pointer to the new link, or nil if
the beginning of the list has been reached.
T* operator+=(size_t n);
Advances the iterator n positions, returning a pointer to the new link, or nil if
the end of the list has been reached.
T* operator-=(size_t n);
Reverses the iterator n positions, returning a pointer to the new link, or nil if
the beginning of the list has been reached.
T* operator()();
Advances the iterator one position, returning a pointer to the new link, or nil if
the end of the list has been reached.