Tools.h++ Class Reference

Table Of Contents
Clears all elements of self and replaces them by copying all elements of stddeq.
bool
operator<(const RWTPtrDeque<T>& deq);
Returns true if self compares lexicographically less than deq, otherwise returns false.
Items in each collection are dereferenced before being compared. Assumes that type T
has well-defined less-than semantics.
bool
operator==(const RWTPtrDeque<T>& deq);
Returns true if self compares equal to deq, otherwise returns false. Two collections are
equal if both have the same number of entries, and iterating through both collections
produces, in turn, individual elements that compare equal to each other. Elements are
dereferenced before being compared.
reference
operator()(size_type i);
const_reference
operator()(size_type i) const;
Returns a reference to the ith element of self. Index i should be between 0 and one less
then the number of entries, otherwise the results are undefined--no bounds checking is
performed.
reference
operator[](size_type i);
const_reference
operator[](size_type i) const;
Returns a reference to the ith element of self. Index i must be between 0 and one less then
the number of entries in self, otherwise the function throws an exception of type
RWBoundsErr.
Public Member Functions
void
append(T* a);
Adds the item a to the end of the collection.
void
apply(void (*fn)(T*,void*), void* d);
void
apply(void (*fn)(const T*,void*), void* d) const;
void
apply(void (*fn)(T*&,void*), void* d);
Applies the user-defined function pointed to by fn to every item in the collection. This