MeVisLab Toolbox Reference
|
Dynamic templated vector. More...
#include <WEMFastVector.h>
Public Member Functions | |
WEMFastVector (unsigned int init) | |
Standard constructor. More... | |
virtual | ~WEMFastVector () |
Standard destructor. More... | |
unsigned int | num () const |
Returns the number of elements in this vector. More... | |
T * | at (unsigned int pos) const |
Returns the element at the given position, returns NULL if out of range. More... | |
T * | first () |
Returns the first element. More... | |
const T * | first () const |
Returns the first element. More... | |
T * | last () |
Returns the last element. More... | |
const T * | last () const |
Returns the last element. More... | |
virtual unsigned int | append (T *elem) |
Appends the given element to the back of this vector. More... | |
virtual void | swap (unsigned int p1, unsigned int p2) |
Swaps the two given elements in this vector. More... | |
virtual void | clear () |
Clears all internal pointers. More... | |
virtual void | destroy () |
Deletes all data. More... | |
virtual void | deleteAt (unsigned int pos) |
Deletes the element at the given position. More... | |
virtual void | deleteLast () |
Deletes the last element of this vector. More... | |
virtual int | remove (T *elem) |
Deletes the element given by its pointer. More... | |
virtual int | lookup (T *elem) const |
Searches for the element in this vector and returns its position. More... | |
virtual int | removeUnSwapped (T *elem) |
Deletes the element given by its pointer, searches the element and deletes it, but keeps the order of elements. More... | |
virtual void | replace (T *elem, unsigned int pos) |
Replaces the element at the given position with the given element. More... | |
Dynamic templated vector.
Fast vector as a simple wrapper around a fixed size array of <T>. All elements are deleted on destruction of the vector, no need to delete elements in between!
Definition at line 26 of file WEMFastVector.h.
ml::WEMFastVector< T >::WEMFastVector | ( | unsigned int | init | ) |
Standard constructor.
Definition at line 83 of file WEMFastVector.h.
References ml::library::init(), and T.
|
virtual |
Standard destructor.
Definition at line 98 of file WEMFastVector.h.
References ml::library::destroy().
|
virtual |
Appends the given element to the back of this vector.
Definition at line 129 of file WEMFastVector.h.
|
inline |
Returns the element at the given position, returns NULL if out of range.
Definition at line 37 of file WEMFastVector.h.
|
virtual |
Clears all internal pointers.
This does not delete the elements in the vector!
Definition at line 108 of file WEMFastVector.h.
|
virtual |
Deletes the element at the given position.
Definition at line 169 of file WEMFastVector.h.
|
virtual |
Deletes the last element of this vector.
Definition at line 183 of file WEMFastVector.h.
|
virtual |
Deletes all data.
Definition at line 116 of file WEMFastVector.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Searches for the element in this vector and returns its position.
Definition at line 191 of file WEMFastVector.h.
References boost::at().
|
inline |
Returns the number of elements in this vector.
Definition at line 35 of file WEMFastVector.h.
|
virtual |
Deletes the element given by its pointer.
Definition at line 208 of file WEMFastVector.h.
|
virtual |
Deletes the element given by its pointer, searches the element and deletes it, but keeps the order of elements.
Definition at line 221 of file WEMFastVector.h.
|
virtual |
Replaces the element at the given position with the given element.
Definition at line 145 of file WEMFastVector.h.
|
virtual |
Swaps the two given elements in this vector.
Definition at line 153 of file WEMFastVector.h.
References T.