Tools.h++ Manual
22-28 104011 Tandem Computers Incorporated
22
RWTPtrDlistIterator<T>
Synopsis
#include <rw/tpdlist.h>
RWTPtrDlist<T> list;
RWTPtrDlistIterator<T> iterator(list);
Description Iterator for class 
RWTPtrDlist<T>
, allowing sequential access to all the 
elements of a doubly-linked parameterized 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
RWTPtrDlistIterator<T>(RWTPtrDlist<T>& c);
Constructs an iterator to be used with the list 
c
.
Public member operators
RWBoolean operator++();
Advances the iterator to the next item and returns 
TRUE
. When the end of the 
collection is reached, returns 
FALSE 
and the position of the iterator will be 
undefined.
RWBoolean operator--();
Retreats the iterator to the previous item and returns 
TRUE
. When the 
beginning of the collection is reached, returns 
FALSE 
and the position of the 
iterator will be undefined.
RWBoolean operator+=(size_t n);
Advances the iterator 
n 
positions and returns 
TRUE
. When the end of the 
collection is reached, returns 
FALSE 
and the position of the iterator will be 
undefined.










