Tools.h++ Manual
22-112 104011 Tandem Computers Incorporated
22
RWTValSlistIterator<T>
Synopsis
#include <rw/tvslist.h>
RWTValSlist<T< list;
RWTValSlistIterator<T> iterator(list);
Description Iterator for class
RWTValSlist<T>
, allowing sequential access to all the
elements of a singly-linked parameterized list. Elements are accessed in order,
from first to last.
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
RWTValSlistIterator<T>(RWTValSlist<T>& c);
Constructs an iterator to be used with the list
c
.
Public member operators
RWBoolean operator++();
Advances the iterator one position. Returns
TRUE
if the new position is valid,
FALSE
otherwise.
RWBoolean operator+=(size_t n);
Advances the iterator n positions. Returns
TRUE
if the new position is valid,
FALSE
otherwise.
RWBoolean operator()();
Advances the iterator one position. Returns
TRUE
if the new position is valid,
FALSE
otherwise.