Tools.h++ Manual

23-10 104011 Tandem Computers Incorporated
23
Public member operators type
* operator()();
Advances the iterator to the next item and returns it. Returns nil if at the end
of the collection.
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.
void operator-=(size_t n);
Moves the iterator back
n
items.
Public member functions
RWBoolean atFirst() const;
Returns
TRUE
if the iterator is at the start of the list,
FALSE
otherwise;
RWBoolean atLast() const;
Returns
TRUE
if the iterator is at the end of the list,
FALSE
otherwise;
type
* findNext(yourTester t,const
type
* d);
Moves the iterator to the next item for which the function pointed to by
t
finds
a match with
d
and returns it. Returns nil if no match is found, in which case
the position of the iterator will be undefined.
type
* findNextReference(const
type
*
e);
Moves the iterator to the next item with the address
e
and returns it. Returns
nil if no match is found, in which case the position of the iterator will be
undefined.
type
* insertAfterPoint(
type
* a);
Adds item
a
after the current iterator position and return the item. The
position of the iterator is left unchanged.
type
* key() const;
Returns the item at the current iterator position.