Tools.h++ Class Reference

Table Of Contents
Returns the number of elements t in self such that the expression((*fn)(t,d)) is true. fn
points to a user-defined tester function which must have one of the prototypes:
bool yourTester(T* a, void* d);
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d.
T*
popBack();
Removes and returns the last item in the collection.
T*
popFront();
Removes and returns the first item in the collection.
void
prepend(T* a);
Adds the item a to the beginning of the collection.
void
pushBack(T* a);
Adds the item a to the end of the collection.
void
pushFront(T* a);
Adds the item a to the beginning of the collection.
T*
remove(const T* a);
Removes and returns the first element t in self such that the expression (*t == *a) is true.
Returns rwnil if there is no such element.
T*
remove(bool (*fn)(T*, void*), void* d);
T*
remove(bool (*fn)(const T*,void*), void* d);
Removes and returns the first element t in self such that the expression ((*fn)(t,d)) is true.
Returns rwnil if there is no such element. fn points to a user-defined tester function which
must have one of the prototypes:
bool yourTester(T* a, void* d);
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d.
size_type const T*
removeAll(const_reference a);