GPL_DynamicArray

GPL_DynamicArray

gpl

1998 12-05


CLASS

GPL_DynamicArray - C++ dynamic array template


SYNOPSIS

GPL_DynamicArray<data_type> darray(block_size);


Class GPL_DynamicArray is an array that expands and contracts to fit the number of elements in the array. Compression (collapsing the array to fill empty slots in the middle) is not automatic. However, new elements will go into empty slots in the middle if there are any. The array is reduced in size when block_size or more pointers are free at the end of the array.


GPL_DynamicArray is really an array of pointers to some object type.


Removal of an element does not destroy the element object itself. Only the pointer to it in the array is removed. Space for element objects must be cleaned up by the calling code.


CONSTRUCTOR


MEMBER FUNCTIONS