|
MeVisLab Toolbox Reference
|
#include <WEMContainer.h>
Public Member Functions | |
| WEMContainer (unsigned int init=0) | |
| Standard constructor. | |
| WEMContainer (WEMContainer &&) noexcept=default | |
| WEMContainer & | operator= (WEMContainer &&) noexcept=default |
| ~WEMContainer () override | |
| Standard destructor. | |
| T * | at (unsigned int pos) |
| Returns the element at the given position, typecast from WEMPrimitive to T. | |
| const T * | at (unsigned int pos) const |
| Returns the element at the given position, typecast from WEMPrimitive to T. | |
| void | swap (unsigned int i, unsigned int j) override |
| Swaps elements and updates their indices. | |
| unsigned int | append (WEMPrimitive *wp) override |
| int | remove (WEMPrimitive *wp) override |
| void | replace (WEMPrimitive *wp, unsigned int pos) override |
| Replaces the given element at the given position, updates index. | |
| void | destroy () override |
| Destroys all elements in this vector. | |
| Public Member Functions inherited from ml::WEMVector< WEMPrimitive > | |
| WEMVector (unsigned int init=0) | |
| Standard constructor. | |
| WEMVector & | operator= (WEMVector &&other) noexcept |
| virtual | ~WEMVector () |
| Standard destructor. | |
| unsigned int | num () const |
| Returns the number of elements in this vector. | |
| WEMPrimitive * | at (unsigned int pos) const |
| Returns the element at the given position or returns NULL if out of range. | |
| WEMPrimitive * | first () |
| Returns the first element. | |
| WEMPrimitive * | last () |
| Returns the last element. | |
| virtual unsigned int | append (WEMPrimitive *elem) |
| Appends the given element to back of this vector. | |
| virtual void | clear () |
| virtual void | deleteAt (unsigned int pos) |
| Deletes the element at the given position. | |
| virtual void | deleteLast () |
| Deletes the last element of this vector. | |
| virtual int | remove (WEMPrimitive *elem) |
| Deletes the element given by its pointer. | |
| virtual int | lookup (WEMPrimitive *elem) const |
| Searches for the given element in this vector and returns its position. | |
| virtual int | removeUnSwapped (WEMPrimitive *elem) |
| Deletes the element given by its pointer. Keeps the order of the elements! | |
| virtual void | replace (WEMPrimitive *elem, unsigned int pos) |
| Replaces the given position with the given element. | |
| void | reserve (unsigned int init) |
Reserves init elements, copies old ones if existing. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ml::WEMVector< WEMPrimitive > | |
| virtual void | expand () |
| Grow vector, add extra block of size BLOCKSIZE. | |
| virtual unsigned int | appendUnsafe (WEMPrimitive *elem) |
Container with the ability to detect double inserts. Uses _heapPosition to prevent conflicts with _entryNumber.
Definition at line 26 of file WEMContainer.h.
| ml::WEMContainer< T >::WEMContainer | ( | unsigned int | init = 0 | ) |
Standard constructor.
Definition at line 57 of file WEMContainer.h.
References T, WEMContainer(), and ml::WEMVector< WEMPrimitive >::WEMVector().
Referenced by operator=(), WEMContainer(), and WEMContainer().
|
defaultnoexcept |
References WEMContainer().
|
override |
Standard destructor.
Definition at line 65 of file WEMContainer.h.
References ~WEMContainer().
Referenced by ~WEMContainer().
|
override |
Appends the given element to this vector and updates the index. Only works if element is not yet in vector!
Definition at line 131 of file WEMContainer.h.
References append(), ml::WEMVector< T, fixedBufferSize >::appendUnsafe(), ml::WEMPrimitive::getHeapPosition(), ml::WEMVector< WEMPrimitive >::last(), and ml::WEMVector< WEMPrimitive >::num().
Referenced by append(), and operator=().
| T * ml::WEMContainer< T >::at | ( | unsigned int | pos | ) |
Returns the element at the given position, typecast from WEMPrimitive to T.
Definition at line 72 of file WEMContainer.h.
References at(), ml::WEMVector< T, fixedBufferSize >::at(), and T.
Referenced by at(), at(), destroy(), operator=(), remove(), and swap().
| const T * ml::WEMContainer< T >::at | ( | unsigned int | pos | ) | const |
Returns the element at the given position, typecast from WEMPrimitive to T.
Definition at line 88 of file WEMContainer.h.
|
overridevirtual |
Destroys all elements in this vector.
Reimplemented from ml::WEMVector< WEMPrimitive >.
Definition at line 96 of file WEMContainer.h.
References at(), ml::WEMVector< WEMPrimitive >::clear(), destroy(), ml::WEMVector< WEMPrimitive >::num(), ml::WEMVector< T, fixedBufferSize >::replace(), and T.
Referenced by destroy(), and operator=().
|
defaultnoexcept |
|
override |
Removes the given element from vector. Note that this is done in O(1)!
Definition at line 156 of file WEMContainer.h.
References at(), ml::WEMVector< WEMPrimitive >::deleteLast(), ml::WEMPrimitive::getHeapPosition(), ml::WEMVector< WEMPrimitive >::num(), remove(), and swap().
Referenced by operator=(), and remove().
|
override |
Replaces the given element at the given position, updates index.
Definition at line 144 of file WEMContainer.h.
References replace(), ml::WEMVector< T, fixedBufferSize >::replace(), and ml::WEMPrimitive::setHeapPosition().
Referenced by operator=(), and replace().
|
overridevirtual |
Swaps elements and updates their indices.
Reimplemented from ml::WEMVector< WEMPrimitive >.
Definition at line 121 of file WEMContainer.h.
References at(), swap(), and ml::WEMVector< T, fixedBufferSize >::swap().
Referenced by operator=(), remove(), and swap().