Tools.h++ Class Reference

Table Of Contents
T*
find(const T* a) const;
If there exists an element t in self such that the expression (*t == *a) is true, returns t.
Otherwise, returns rwnil.
T*
find(bool (*fn)(T*,void*),void* d) const;
T*
find(bool (*fn)(const T*,void*),void* d) const;
If there exists an element t in self such that the expression ((*fn)(t,d)) is true, returns t.
Otherwise, returns rwnil. fn points to a user-defined tester function which must have one
of the prototypes:
bool yourTester(const T* a, void* d);
bool yourTester(const T* a, void* d);
Client data may be passed through parameter d.
reference
first();
const_reference
first() const;
Returns a reference to the first element of self.
T*
get();
Removes and returns the first element in the collection.
size_type
index(const T* a) const;
Returns the position of the first item t in self such that (*t == *a), or returns the static
member npos if no such item exists.
size_type
index(bool (*fn)(T*,void*), void* d) const;
size_type
index(bool (*fn)(const T*,void*), void* d) const;
Returns the position of the first item t in self such that((*fn)(t,d)) is true, or returns the
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);
Client data may be passed through parameter d.
bool
insert(T* a);