Tools.h++ Class Reference

Table Of Contents
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);
Client data may be passed through parameter d.
bool
insert(const_reference a);
Adds the item a to self. The collection remains sorted. Returns true.
size_type
insert(const vector<T,allocator>& a);
Inserts all elements of a into self. The collection remains sorted. Returns the number of
items inserted.
bool
isEmpty() const;
Returns true if there are no items in the collection, false otherwise.
bool
isSorted() const;
Returns true if the collection is sorted relative to the supplied comparator object, false
otherwise.
const_reference
last() const;
Returns a reference to the last item in the collection.
size_type
length() const;