Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWGSortedVector(val)
RWGSortedVector(val) RWGVector(val)
Synopsis
Description
Persistence
Example
Public Constructors
Public Member Functions
Synopsis
#include <rw/gsortvec.h>
declare(RWGSortedVector,val)
implement(RWGSortedVector, val)
RWGSortedVector(val) v; // A sorted vector of vals .
Description
Class RWGSortedVector(val) represents a vector of elements of val val, sorted using an insertion
sort. The elements can be retrieved using an index or a search. Duplicates are allowed. Objects of
val RWGSortedVector(val) are declared with macros defined in the standard C++ header file
<generic.h>.
Note that it is a value-based collection: items are copied in and out of the collection.
The class val must have:
a default constructor;
well-defined copy semantics (val::val(const val&) or equiv.);
well-defined assignment semantics (val::operator=(const val&) or equiv.);
well-defined equality semantics (val::operator==(const val&) or equiv.);