next up previous contents
Next: Stack Up: Utility objects Previous: NameList   Contents

Subsections


ResizeArray

Files: ResizeArray.h, ResizeArray.c
Derived from: none
Global instance (if any): none
Used in optional component: Part of main VMD code

Description

A template class which implements a dynamically-growing, automatically resizing array of data of a given type. Elements in the array may be accessed via the [] operator. When new data is added to the end of an array, the size of the array is automatically increased if necessary.

A ResizeArray has two sizes that are important:

Constructors

Internal data structures

Nonvirtual member functions

Method of use

A ResizeArray is created by specifying the type of data to store, i.e.
ResizeArray<char *> stringArray;
Once created, it looks just like an array, and you can use the [] operator to get and set data. For example:
stringArray[3] = "Some text.";
or
cout « stringArray[3] « endl;


next up previous contents
Next: Stack Up: Utility objects Previous: NameList   Contents
vmd@ks.uiuc.edu