Tools.h++ Manual
23-32 104011 Tandem Computers Incorporated
23
RWGVector(val)
Synopsis
#include <rw/gvector.h>
declare(RWGVector,
val
)
implement(RWGVector,
val
)
RWGVector (
val
) a; // A Vector of
val's
.
Description Class
RWGVector
(val) represents a group of ordered elements, accessible by an
index. Duplicates are allowed. This class is implemented as an array. Objects of
type
RWGVector
(val) are declared with macros defined in the standard C++
header file <generic.h>.
Note – 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.).
For each type of
RWGVector
, you must include one (and only one) call to the
macro
implement
, somewhere in your code.