Tools.h++ Class Reference

Table Of Contents
findNext(RWBoolean(*fn)(T*, void*), void* d);
Returns the first element t encountered by iterating self forward such that the
expression((*fn)(t,d)) is true. fn points to a user-defined tester function which must have
prototype:
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d. Otherwise returns nil. Leaves self
referencing found item or "off the end."
T*
key();
Returns the stored value pointed to by self. Undefined if self is not referencing a value
within the list.
T*
remove();
Returns the stored value pointed to by self. and removes it from the collection. Undefined
if self is not referencing a value within the list. Leaves self referencing prior item or in
reset state.
T*
removeNext(const T*);
Returns and removes the first element t, encountered by iterating self forward, such that
the expression (*t == *a) is true. Otherwise returns nil. Leaves self referencing prior item
or in reset state.
T*
removeNext(RWBoolean(*fn)(T*, void*), void* d);
Returns and removes the first element t, encountered by iterating self forward, such that
the expression((*fn)(t,d)) is true. fn points to a user-defined tester function which must
have prototype:
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d. Otherwise returns nil. Leaves self
referencing prior item or in reset state.
void
reset();
void
reset(RWTPtrSortedDlist<T,C>& l);
Resets the iterator so that after being advanced it will point to the first element of the
collection. Using reset() with no argument will reset the iterator on the current container.
Supplying a RWTPtrSortedDlist to reset() will reset the iterator on the new container.