Tools.h++ Class Reference

Table Of Contents
Public Member Functions
void
append(const_reference a);
Adds the item a to the end of the collection.
void
apply(void (*fn)(reference,void*), void* d);
void
apply(void (*fn)(const_reference,void*), void* d) const;
Applies the user-defined function pointed to by fn to every item in the collection. This
function must have one of the prototypes:
void yourfun(const_reference a, void* d);
void yourfun(reference a, void* d);
Client data may be passed through parameter d.
reference
at(size_type i);
const_reference
at(size_type i) const;
Returns a reference to the ith element of self. Index i must be between 0 and one less then
the number of entries in self, otherwise the function throws an exception of type
RWBoundsErr.
iterator
begin();
const_iterator
begin() const;
Returns an iterator positioned at the first element of self.
void
clear();
Clears the collection by removing all items from self. Each item will have its destructor
called.
bool
contains(const_reference a) const;
Returns true if there exists an element t in self such that the expression(t == a) is true,
otherwise returns false.
bool
contains(bool (*fn)(const_reference,void*), void* d) const;
Returns true if there exists an element t in self such that the expression ((*fn)(t,d)) is true,
otherwise returns false. fn points to a user-defined tester function which must have