Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWTPtrSet<T,C>
Synopsis
Standard C++ Library Dependent!
Description
Persistence
Examples
Related Classes
Public Typedefs
Public Constructors
Public Member Operators
Public Member Functions
Related Global Operators
Synopsis
#include <rw/tpset.h>
RWTPtrSet<T,C> s;
Standard C++ Library Dependent!
RWTPtrSet requires the Standard C++ Library.
Description
This class maintains a pointer-based collection of values, which are ordered according to a comparison object
of type C. Class T is the type pointed to by the items in the collection. C must induce a total ordering on
elements of type T via a public member
bool operator()(const T& x, const T& y)
which returns true if x should precede y within the collection. The structure less<T> from the C++-standard
header file <functional> is an example. Note that items in the collection will be dereferenced before being
compared.
RWTPtrSet<T,C> will not accept an item that compares equal to an item already in the collection.
(RWTPtrMultiSet<T,C> may contain multiple items that compare equal to each other.) Equality is based on
the comparison object and not on the == operator. Given a comparison object comp, items a and b are equal if