ALBA
|
#include <albaVector.h>
Public Member Functions | |
albaVector () | |
virtual | ~albaVector () |
albaID | GetNumberOfItems () |
void | SetItem (const albaID idx, const T &object) |
albaID | AppendItem (const T &object) |
bool | ReplaceItem (const albaID idx, const T &newitem) |
bool | RemoveItem (const albaID idx) |
bool | FindAndRemoveItem (const T &object) |
void | RemoveAllItems () |
bool | IsItemPresent (const T &object) |
bool | GetItem (const albaID idx, T &obj) |
T & | GetItem (const albaID idx) |
bool | FindItem (const T &object, albaID &idx) |
albaID | Push (const T &obj) |
bool | Pop (T &obj) |
T & | operator[] (const albaID idx) |
const T & | operator[] (const albaID idx) const |
Static Public Attributes | |
static T | m_NullItem |
Protected Attributes | |
mmuVectorItems< T > * | m_Items |
albaVector - vector container wrapping STL vectors.
This class simply wraps the STL vector container. It can be used in conjunction with albaSmartPointers to store albaReferenceCounted pointers.
Definition at line 32 of file albaVector.h.
albaVector< T >::albaVector |
Definition at line 132 of file albaVector.h.
|
virtual |
Definition at line 140 of file albaVector.h.
albaID albaVector< T >::GetNumberOfItems |
return number of items in the array
Definition at line 317 of file albaVector.h.
void albaVector< T >::SetItem | ( | const albaID | idx, |
const T & | object | ||
) |
Set an item with the specified Key.
Definition at line 149 of file albaVector.h.
albaID albaVector< T >::AppendItem | ( | const T & | object | ) |
Set an item with the specified Key.
Definition at line 162 of file albaVector.h.
bool albaVector< T >::ReplaceItem | ( | const albaID | idx, |
const T & | newitem | ||
) |
Replace the item with the given Key in the container with a new one.
Return false if no item with the given Key exists.
Definition at line 218 of file albaVector.h.
bool albaVector< T >::RemoveItem | ( | const albaID | idx | ) |
Remove the item with given Key in the container.
If no object with such Key is found the container is uneffected and the function return false.
Definition at line 233 of file albaVector.h.
bool albaVector< T >::FindAndRemoveItem | ( | const T & | object | ) |
Remove an object from the list.
If object is not found, the list is unaffected and return false. See warning in description of RemoveItem(int).
Definition at line 248 of file albaVector.h.
void albaVector< T >::RemoveAllItems |
Remove all objects from the list.
Definition at line 262 of file albaVector.h.
bool albaVector< T >::IsItemPresent | ( | const T & | object | ) |
Search for an object and return its ID.
If ID == 0, object was not found.
Definition at line 286 of file albaVector.h.
bool albaVector< T >::GetItem | ( | const albaID | idx, |
T & | obj | ||
) |
Get the item with given Key in the container.
false is returned if no item with such index is present
Definition at line 171 of file albaVector.h.
T & albaVector< T >::GetItem | ( | const albaID | idx | ) |
Get the item with given Key in the container.
NullItem is returned if no item with such index is present
Definition at line 187 of file albaVector.h.
bool albaVector< T >::FindItem | ( | const T & | object, |
albaID & | idx | ||
) |
Return the item index.
Definition at line 270 of file albaVector.h.
albaID albaVector< T >::Push | ( | const T & | obj | ) |
Return the number of objects in the list.
append an item
Definition at line 295 of file albaVector.h.
bool albaVector< T >::Pop | ( | T & | obj | ) |
Retrieve an item.
Definition at line 303 of file albaVector.h.
T & albaVector< T >::operator[] | ( | const albaID | idx | ) |
provide access to vector items.
If idx is outside the result is invalid
Definition at line 202 of file albaVector.h.
const T & albaVector< T >::operator[] | ( | const albaID | idx | ) | const |
provide access to vector items.
If idx is outside the result is invalid
Definition at line 210 of file albaVector.h.
|
static |
Definition at line 103 of file albaVector.h.
|
protected |
Definition at line 107 of file albaVector.h.