Tools.h++ Class Reference

Table Of Contents
prototype:
bool yourTester(const_reference a, void* d);
Client data may be passed through parameter d.
iterator
end();
const_iterator
end() const;
Returns a past-the-end valued iterator of self.
size_type
entries() const;
Returns the number of elements in self.
bool
find(const_reference a,T& k) const;
If there exists an element t in self such that the expression (t == a) is true, assigns t to k
and returns true. Otherwise, returns false and leaves the value of k unchanged.
bool
find(bool (*fn)(const_reference,void*), void* d, T& k) const;
If there exists an element t in self such that the expression ((*fn)(t,d)) is true, assigns t to
k and returns true. Otherwise, returns false and leaves the value of k unchanged. fn points
to a user-defined tester function which must have prototype:
bool yourTester(const_reference 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.
size_type
index(const_reference 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)(const_reference,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 prototype:
bool yourTester(const_reference a, void* d);