152 if (m_Items->Vector.size()<=idx)
154 m_Items->Vector.resize(idx+1);
157 m_Items->Vector[idx]=object;
165 m_Items->Vector.push_back(
object);
166 return m_Items->Vector.size()-1;
174 if (idx>=0 && idx<m_Items->Vector.size())
176 obj=m_Items->Vector[idx];
190 if (idx>=0 && idx<m_Items->Vector.size())
192 return m_Items->Vector[idx];
205 return (idx<m_Items->Vector.size())?m_Items->Vector[idx]:m_NullItem;
213 return (idx<m_Items->Vector.size())?m_Items->Vector[idx]:m_NullItem;
221 if (idx<m_Items->Vector.size())
223 m_Items->Vector[idx]=newitem;
236 if (idx<m_Items->Vector.size())
238 m_Items->Vector.erase(m_Items->Vector.begin()+idx);
252 if (FindItem(
object,idx))
254 return RemoveItem(idx);
265 m_Items->Vector.clear();
273 for (
albaID i=0;i<m_Items->Vector.size();i++)
274 if (m_Items->Vector[i]==
object)
290 return FindItem(
object,idx);
298 return AppendItem(
object);
306 if (GetItem(GetNumberOfItems()-1,obj))
308 RemoveItem(GetNumberOfItems()-1);
320 return m_Items->Vector.size();
long albaID
type for IDs inside ALBA
albaBase - the pourpose of this class is just to groups utilities classes
albaUtility - the pourpose of this class is just to groups utilities classes
albaVector - vector container wrapping STL vectors.
albaID GetNumberOfItems()
return number of items in the array
albaID AppendItem(const T &object)
Set an item with the specified Key.
T & operator[](const albaID idx)
provide access to vector items.
bool GetItem(const albaID idx, T &obj)
Get the item with given Key in the container.
bool Pop(T &obj)
Retrieve an item.
mmuVectorItems< T > * m_Items
bool ReplaceItem(const albaID idx, const T &newitem)
Replace the item with the given Key in the container with a new one.
albaID Push(const T &obj)
Return the number of objects in the list.
T & GetItem(const albaID idx)
Get the item with given Key in the container.
bool FindItem(const T &object, albaID &idx)
Return the item index.
void SetItem(const albaID idx, const T &object)
Set an item with the specified Key.
bool IsItemPresent(const T &object)
Search for an object and return its ID.
bool RemoveItem(const albaID idx)
Remove the item with given Key in the container.
void RemoveAllItems()
Remove all objects from the list.
bool FindAndRemoveItem(const T &object)
Remove an object from the list.