MeVisLabToolboxReference
|
Dynamic vector, based on a memory pool. Keeps track on entry numbers of stored primitives. More...
#include <WEMIndexVector.h>
Public Member Functions | |
WEMIndexVector (unsigned int init=0, unsigned int bs=8192) | |
Standard constructor. | |
virtual | ~WEMIndexVector () |
Standard destructor. | |
unsigned int | num () const |
Returns the number of elements in this vector. | |
T * | at (unsigned int pos) const |
Returns the element at the given position, typecast from WEMPrimitive to T. | |
T * | first () |
Returns the first element of this vector. | |
const T * | first () const |
Returns the first element of this vector. | |
T * | append () |
Appends an element to this vector, returns it and updates the index. | |
int | remove (T *t) |
Removes the given element from vector. | |
virtual void | destroy () |
Destroys all elements in this vector. |
Dynamic vector, based on a memory pool. Keeps track on entry numbers of stored primitives.
Definition at line 23 of file WEMIndexVector.h.
ml::WEMIndexVector< T >::WEMIndexVector | ( | unsigned int | init = 0 , |
unsigned int | bs = 8192 |
||
) |
Standard constructor.
Definition at line 70 of file WEMIndexVector.h.
References ML_CHECK_NEW, and T.
ml::WEMIndexVector< T >::~WEMIndexVector | ( | ) | [virtual] |
T * ml::WEMIndexVector< T >::append | ( | ) |
Appends an element to this vector, returns it and updates the index.
Definition at line 165 of file WEMIndexVector.h.
References T.
T* ml::WEMIndexVector< T >::at | ( | unsigned int | pos | ) | const [inline] |
Returns the element at the given position, typecast from WEMPrimitive to T.
Definition at line 34 of file WEMIndexVector.h.
void ml::WEMIndexVector< T >::destroy | ( | ) | [virtual] |
Destroys all elements in this vector.
Definition at line 104 of file WEMIndexVector.h.
References ML_DELETE_ARRAY.
const T* ml::WEMIndexVector< T >::first | ( | ) | const [inline] |
Returns the first element of this vector.
Definition at line 38 of file WEMIndexVector.h.
Referenced by ml::WEMIndexVector< WEMQuad >::first().
T* ml::WEMIndexVector< T >::first | ( | ) | [inline] |
Returns the first element of this vector.
Definition at line 36 of file WEMIndexVector.h.
unsigned int ml::WEMIndexVector< T >::num | ( | ) | const [inline] |
Returns the number of elements in this vector.
Definition at line 32 of file WEMIndexVector.h.
int ml::WEMIndexVector< T >::remove | ( | T * | t | ) |
Removes the given element from vector.
Note that this is done in O(1).
Definition at line 186 of file WEMIndexVector.h.