Tools.h++ Class Reference

Table Of Contents
Advances self to the first element t encountered by iterating 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. Returns true if an element was found,
returns false otherwise.
T
key();
Returns the stored value referenced by self.
RWBoolean
remove();
Removes the value referenced by self from the collection. true is returned if the removal
is successful, false is returned otherwise.
RWBoolean
removeNext(const T);
Removes the first element t, encountered by iterating self forward, such that the
expression (t == a) is true. Returns true if an element was found and removed, returns
false otherwise.
RWBoolean
removeNext(RWBoolean(*fn)(T, void*), void* d);
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. Returns true if an element was found and
removed, returns false otherwise.
void
reset();
void
reset(RWTValDlist<T>& l);
Resets the iterator so that after being advanced it will reference the first element of the
collection. Using reset() with no argument will reset the iterator on the current container.
Supplying a RWTValDlist to reset() will reset the iterator on the new container.