Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWGVector(val)

Module:  Essential Tools Module   Group:  Generic


Does not inherit

Local Index

Members

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 -- RWGVector is deprecated. Please use RWTValVector or RWTPtrVector.

Note that it is a value-based collection: items are copied in and out of the collection.

The class val must have:

For each type of RWGVector, you must include one (and only one) call to the macro implement, somewhere in your code.

Persistence

None

Example

Program output:

Public Constructors

RWGVector(val)();
RWGVector(val)(size_t n);
RWGVector(val)(size_t n, val v);
RWGVector(val)(RWGVector(val)& s);

Public Member Operators

RWGVector(val)&
operator=(RWGVector(val)& s);
RWGVector(val)&
operator=(val v);
val
operator()(size_t i) const;
val&
operator()(size_t i);
val
operator[](size_t i) const;
val&
operator[](size_t i);

Public Member Functions

const val*
data() const;
size_t
length() const;
void
reshape(size_t n);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.