Tools.h++ Class Reference

Table Of Contents
removeAt(size_type i);
Removes and returns the item at position i in self. This position must be between zero
and one less then the number of entries in the collection, otherwise the function throws an
exception of type RWBoundsErr.
T*
removeFirst();
Removes and returns the first item in the collection.
T*
removeLast();
Removes and returns the first item in the collection.
size_type
replaceAll(const T* oldVal, T* newVal);
Replaces with newVal all elements t in self such that the expression (*t == *oldVal) is
true. Returns the number of items replaced.
size_type
replaceAll(bool (*fn)(T*, void*),void* x,T* newVal);
size_type
replaceAll(bool (*fn)(const T*, void*),void* x,T* newVal);
Replaces with newVal all elements t in self such that the expression ((*fn)(t,d))is true.
Returns the number of items replaced. 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.
void
resize(size_type n);
Modify the capacity of the vector to be at least as large as n. The function has no effect if
the capacity is already as large as n.
void
sort();
Sorts the collection using the less-than operator to compare elements. Elements are
dereferenced before being compared.
vector<T*,allocator>&
std();
const vector<T*,allocator>&
std() const;
Returns a reference to the underlying C++-standard collection that serves as the