#include <WEMObjectVector.h>
Public Member Functions | |
| WEMObjectVector (unsigned int init=0, unsigned int bs=8192) | |
| Standard constructor. | |
| virtual | ~WEMObjectVector () |
| Standard destructor. | |
| unsigned int | num () const |
| Return number of elements in the vector. | |
| T * | at (unsigned int pos) const |
| Return element at given position, return NULL when out of range. | |
| T * | first () |
| Return first element. | |
| const T * | first () const |
| Return first element. | |
| virtual T * | append (unsigned int *pos) |
| Append element to back of vector. | |
| virtual void | deleteAt (unsigned int pos) |
| Delete element at given position. | |
| virtual void | destroy () |
| Delete all elements in the vector. | |
Protected Member Functions | |
| virtual void | expand () |
| Grow vector, add extra block of size BLOCKSIZE. | |
For speed and better memory handling, the vector is an array within an array. The base blocks have a BLOCKSIZE of 8192. This allows for quick expanding.
Definition at line 28 of file WEMObjectVector.h.
| ml::WEMObjectVector< T >::WEMObjectVector | ( | unsigned int | init = 0, |
|
| unsigned int | bs = 8192 | |||
| ) | [inline] |
Standard constructor.
Definition at line 74 of file WEMObjectVector.h.
References ML_CHECK_NEW, ML_TRACE_IN_TIME_CRITICAL, and T.
| ml::WEMObjectVector< T >::~WEMObjectVector | ( | ) | [inline, virtual] |
Standard destructor.
Definition at line 97 of file WEMObjectVector.h.
References ml::WEMObjectVector< T >::destroy(), and ML_TRACE_IN_TIME_CRITICAL.
| T * ml::WEMObjectVector< T >::append | ( | unsigned int * | pos | ) | [inline, virtual] |
Append element to back of vector.
Definition at line 148 of file WEMObjectVector.h.
References ml::WEMObjectVector< T >::expand(), ML_TRACE_IN_TIME_CRITICAL, and T.
| T* ml::WEMObjectVector< T >::at | ( | unsigned int | pos | ) | const [inline] |
Return element at given position, return NULL when out of range.
Definition at line 39 of file WEMObjectVector.h.
| void ml::WEMObjectVector< T >::deleteAt | ( | unsigned int | pos | ) | [inline, virtual] |
Delete element at given position.
Definition at line 173 of file WEMObjectVector.h.
References ML_TRACE_IN_TIME_CRITICAL.
| void ml::WEMObjectVector< T >::destroy | ( | ) | [inline, virtual] |
Delete all elements in the vector.
Definition at line 107 of file WEMObjectVector.h.
References ML_DELETE_ARRAY, and ML_TRACE_IN_TIME_CRITICAL.
Referenced by ml::WEMObjectVector< T >::~WEMObjectVector().
| void ml::WEMObjectVector< T >::expand | ( | ) | [inline, protected, virtual] |
Grow vector, add extra block of size BLOCKSIZE.
Definition at line 125 of file WEMObjectVector.h.
References ML_CHECK_NEW, ML_DELETE_ARRAY, ML_TRACE_IN_TIME_CRITICAL, and T.
Referenced by ml::WEMObjectVector< T >::append().
| const T* ml::WEMObjectVector< T >::first | ( | ) | const [inline] |
Return first element.
Definition at line 43 of file WEMObjectVector.h.
Referenced by ml::WEMObjectVector< WEMQuad >::first().
| T* ml::WEMObjectVector< T >::first | ( | ) | [inline] |
| unsigned int ml::WEMObjectVector< T >::num | ( | ) | const [inline] |
1.5.8