Tools.h++ Class Reference

Table Of Contents
T* const&
first() const;
Returns a pointer to the first item in the vector. An exception of type
RWBoundsError will occur if the vector is empty.
size_t
index(const T* a) const;
Performs a linear search, returning the index of the first object that is equal to
the object pointed to by a, or RW_NPOS if there is no such object. Equality is
measured by the class-defined equality operator for type T.
void
insert(T* a);
Adds the object pointed to by a to the end of the vector. The collection will be
resized automatically if this causes the number of items to exceed the capacity.
void
insertAt(size_t i, T* a);
Adds the object pointed to by a at the index position i. The item previously at
position i is moved to i+1, etc. The collection will be resized automatically if
this causes the number of items to exceed the capacity. The index i must be between
0 and the number of items in the vector or an exception of type RWBoundsError will
occur.
RWBoolean
isEmpty() const;
Returns TRUE if there are no items in the collection, FALSE otherwise.
T*&
last();
T* const&
last() const;