Tools.h++ Class Reference

Table Of Contents
function must have one of the prototypes:
void yourfun(T* a, void* d);
void yourfun(const T* a, void* d);
void yourfun(T*& a, void* d);
for reference semantics. 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.
void
clearAndDestroy();
Removes all items from the collection and uses operator delete to destroy the objects
pointed to by those items. Do not use this method if multiple pointers to the same object
are stored.
bool
contains (const T* a) const;
If there exists an element t in self such that the expression (*t == *a) is true, returns true.
Otherwise, returns false.
bool
contains (bool (*fn)(const T*, void*), void *d) const;
bool
contains(bool (*fn)(T*,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 one of
the prototypes:
bool yourTester(T* a, void* d);
bool yourTester(const T* a, void *d)