Tools.h++ Class Reference

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