Tools.h++ Manual
104011 Tandem Computers Incorporated 23-9
23
RWGDlistIterator(type)
RWGDlistIterator(type)
|
RWDlistIterator
|
RWSlistIterator
Synopsis
#include <rw/gdlist.h>
declare(RWGDlist,
type
)
RWGDlist
(type)
a;
RWGDlistIterator
(type)
I(a);
Description Iterator for class
RWGDlist
(type), which allows sequential access to all the
elements of a doubly-linked 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.
In order to simplify the following documentation, an imaginary typedef
typedef RWBoolean (*
yourTester
)(const
type
*, const void*);
has been used. See the documentation for class
RWGDlist
(type) for an
explanation of this function.
Example See class
RWGDlist
(type)
Public constructor
RWGDlistIterator(
type
)( RWGDlist(
type
)& list);
Construct an iterator for the
RWGDlist
(type)
list
. Immediately after
construction, the position of the iterator is undefined.