Tools.h++ Class Reference

Table Of Contents
September 1, 1991
Public Constructor
RWTPtrSortedVector(size_t capac = RWDEFAULT_CAPACITY);
Create an empty sorted vector with an initial capacity equal to capac. The vector will be
automatically resized should the number of items exceed this amount.
RWTPtrSortedVector<T>(const RWTPtrSortedVector<T>& c);
Constructs a new ordered vector as a shallow copy of c. After construction, pointers will be
shared between the two collections.
Public Operators
RWTPtrSortedVector<T>&
operator=(const RWTPtrSortedVector& c);
Sets self to a shallow copy of c. Afterwards, pointers will be shared between the two collections.
T*&
operator()(size_t i);
T* const&
operator()(size_t i) const;
Returns a pointer to the ith value in the vector. The first variant can be used as an lvalue, the
second cannot. The index i must be between zero and the number of items in the collection less
one. No bounds checking is performed. When used as an lvalue, care must be taken so as not to
disturb the sortedness of the collection.
T*&
operator[](size_t i);
T* const&
operator[](size_t i) const;
Returns a pointer to the ith value in the vector. The first variant can be used as an lvalue, the
second cannot. The index i must be between zero and the number of items in the collection less
one, or an exception of type RWBoundsError will be thrown. When used as an lvalue, care must
be taken so as not to disturb the sortedness of the collection.
Public Member Functions
T*&
at(size_t i);
T* const&
at(size_t i) const;
Returns a pointer to the ith value in the vector. The first variant can be used as an lvalue, the
second cannot. The index i must be between zero and the number of items in the collection less
one, or an exception of type RWBoundsError will be thrown. When used as an lvalue, care must
be taken so as not to disturb the sortedness of the collection.