Tools.h++ Class Reference

Table Of Contents
static member npos if no such item exists. 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);
for the const version. Client data may be passed through parameter d.
bool
insert(T* a);
Adds the item a to the end of the collection. Returns true.
void
insertAt(size_type i, T* a);
Inserts the item a in front of the item at position i in self. self position must be between
zero and the number of entries in the collection, otherwise the function throws an
exception of type RWBoundsErr.
bool
isEmpty() const;
Returns true if there are no items in the collection, false otherwise.
T*&
last();
T*const&
last() const;
Returns a reference to the last item in the collection.
reference
maxElement();
const_reference
maxElement() const;
reference
minElement();
const_reference
minElement() const;
Returns a reference to the maximum or minimum element in self.
size_type
occurrencesOf(const T* a) const;
Returns the number of elements t in self such that the expression (*t == *a) is true.
size_type
occurrencesOf(bool (*fn)( T*,void*), void* d) const;
size_type
occurrencesOf(bool (*fn)(const T*,void*), void* d) const;