Tools.h++ Manual

104011 Tandem Computers Incorporated 22-113
22
Public member functions
RWTValSlist<T>* container() const;
Returns a pointer to the collection over which this iterator is iterating.
RWBoolean findNext(const T& a);
Advances the iterator to the first element that is equal to a and returns
TRUE
, or
FALSE
if there is no such element. Equality is measured by the class-defined
equality operator for type
T
.
RWBoolean findNext(RWBoolean (*testFun)
(const T&, void*),void*);
Advances the iterator to the first element for which the tester function pointed
to by
testFun
returns
TRUE
and returns
TRUE
, or
FALSE
if there is no such
element.
void insertAfterPoint(const T& a);
Inserts the value
a
into the iterator's associated collection in the position
immediately after the iterator's current position.
T key() const;
Returns the value at the iterator's current position. The results are undefined if
the iterator is no longer valid.
RWBoolean remove();
Removes the value from the iterator's associated collection at the current
position of the iterator. Returns
TRUE
if successful,
FALSE
otherwise.
Afterwards, if successful, the iterator will be positioned at the element
immediately before the removed element. This function is relatively inefficient
for a singly-linked list.
RWBoolean removeNext(const T& a);
Advances the iterator to the first element that is equal to a and removes it.
Returns
TRUE
if successful,
FALSE
otherwise. Equality is measured by the
class-defined equality operator for type
T
. Afterwards, if successful, the
iterator will be positioned at the element immediately before the removed
element.
RWBoolean removeNext(RWBoolean (*testFun)
(const T&, void*), void*);
Advances the iterator to the first element for which the tester function pointed
to by
testFun
returns
TRUE
and removes it. Returns
TRUE
if successful,
FALSE
otherwise. Afterwards, if successful, the iterator will be positioned at
the element immediately before the removed element.