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. If no such element exists, returns a nil
pointer equivalent to false. Leaves self referencing the found item, or "past the end."
void
insertAfterPoint(T* p);
Inserts the pointer p into the container directly after the element referenced by self.
T*
key();
Returns the stored value referenced by self. Undefined if self is not referencing a value
within the list.
T*
remove();
Returns the stored value referenced by self and removes it from the collection. Undefined
if self is not referencing a value within the list.
T*
removeNext(const T*);
Returns and removes the first element t, encountered by iterating self forward, such that
the expression (*t == *a) is true. If no such element exists, returns nil.
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. If no such element exists, returns nil.
void
reset();
void
reset(RWTPtrDlist<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 RWTPtrDlist<T> to reset() will reset the iterator on the new container.