GlsMap Toolkit
1.8.0
|
#include <vpf_util.h>
Public Types | |
enum | { DEFAULT_INITIAL_SIZE = 16u } |
Public Member Functions | |
PointerArray (const unsigned int initialSize=DEFAULT_INITIAL_SIZE) | |
~PointerArray () | |
bool | InsertPointer (T *const p) |
bool | MovePointer (const unsigned int curIndex, const unsigned int newIndex) |
unsigned int | GetCount (void) const |
T * | GetPointer (const unsigned int index) |
const T * | GetPointer (const unsigned int index) const |
bool | IsValid (void) const |
Protected Attributes | |
WarningBool | _isValid |
unsigned int | _arraySize |
unsigned int | _arrayCount |
T ** | _pointers |
encapsulates a growable array of pointers
anonymous enum |
default initial size of array
|
inline |
Ctor
initialSize | [optional, defaults to DEFAULT_INITIAL_SIZE] initial size of array (>0) |
|
inline |
Dtor
|
inline |
Get number of pointers in the array
|
inline |
Get a pointer in the array
index | zero based index into array |
|
inline |
Get a const pointer in the array
index | zero based index into array |
|
inline |
Insert a pointer into the array at the end of the array
p | pointer to add (non NULL) |
|
inline |
Determine if the array is in a valid state
|
inline |
Move a pointer from one index in the array to another index in the array. array elements are shifted down accordingly.
curIndex | current index of pointer |
newIndex | new desired index of pointer |
|
protected |
number of elements in _pointers pointer array
|
protected |
length of _pointers pointer array
|
protected |
true if array is valid else false
|
protected |
array of T pointers