ADTF
3.18.2
|
Utility class that stores DDL entities. More...
Public Types | |
typedef T ** | iterator |
iterator for DDL container | |
typedef T *const * | const_iterator |
const iterator for DDL container | |
Public Member Functions | |
cDDLContainerNoClone (bool bSorted=true) | |
Constructor. More... | |
void | Insert (T *pElem, int nPos=-1) |
Insert. More... | |
T * | Find (const A_UTILS_NS::cString &strName) |
Finds an element by name. More... | |
iterator | FindIt (const A_UTILS_NS::cString &strName) |
Finds an element by name. More... | |
const T * | Find (const A_UTILS_NS::cString &strName) const |
Finds an element by name. More... | |
void | CopyFromRef (cDDLContainerNoClone &oOther) |
Copies the pointers from the other container. More... | |
void | Delete () |
Deletes all stored items (by calling delete on the pointers) | |
void | Sort () |
Sort the items by name. | |
bool | IsSorted () const |
Returns Whether or not the container is sorted by name or not. More... | |
iterator | begin () |
Returns an iterator to the first element. More... | |
const_iterator | begin () const |
Returns an iterator to the first element. More... | |
iterator | end () |
Returns an iterator to the element after the last element. More... | |
const_iterator | end () const |
Returns an iterator to the element after the last element. More... | |
void | clear () |
clears the container (does not destroy the elements) | |
iterator | erase (iterator itPos) |
removes an element from the container More... | |
iterator | erase (iterator itPosFirst, iterator itPosLast) |
removes a sequence of elements from the container More... | |
bool | empty () const |
Returns whether the container is empty or not. More... | |
unsigned int | size () const |
Returns the size of the container. More... | |
T *& | operator[] (unsigned int nPos) |
random access operator. More... | |
T *const & | operator[] (unsigned int nPos) const |
random access operator. More... | |
T *& | at (unsigned int nPos) |
random access method. More... | |
T *const & | at (unsigned int nPos) const |
random access method. More... | |
Private Attributes | |
std::vector< T * > | m_vecPointers |
bool | m_bSorted |
Utility class that stores DDL entities.
Definition at line 17 of file ddlcontainer.h.
cDDLContainerNoClone | ( | bool | bSorted = true | ) |
Constructor.
[in] | bSorted | whether the items should be sorted by name (this improves access times) |
T*& at | ( | unsigned int | nPos | ) |
random access method.
[in] | nPos | The index of the element. |
T* const& at | ( | unsigned int | nPos | ) | const |
random access method.
[in] | nPos | The index of the element. |
iterator begin | ( | ) |
Returns an iterator to the first element.
const_iterator begin | ( | ) | const |
Returns an iterator to the first element.
void CopyFromRef | ( | cDDLContainerNoClone< T > & | oOther | ) |
Copies the pointers from the other container.
[in] | oOther | Thge other container |
bool empty | ( | ) | const |
Returns whether the container is empty or not.
iterator end | ( | ) |
Returns an iterator to the element after the last element.
const_iterator end | ( | ) | const |
Returns an iterator to the element after the last element.
removes an element from the container
[in] | itPos | The element which should be removed. |
removes a sequence of elements from the container
itPosFirst | the first element to erase. |
itPosLast | the first one that should not be erased. |
T* Find | ( | const A_UTILS_NS::cString & | strName | ) |
Finds an element by name.
[in] | strName |
const T* Find | ( | const A_UTILS_NS::cString & | strName | ) | const |
Finds an element by name.
[in] | strName |
iterator FindIt | ( | const A_UTILS_NS::cString & | strName | ) |
void Insert | ( | T * | pElem, |
int | nPos = -1 |
||
) |
Insert.
[in] | pElem | The element to insert. |
[in] | nPos | Position to add the element |
bool IsSorted | ( | ) | const |
Returns Whether or not the container is sorted by name or not.
T*& operator[] | ( | unsigned int | nPos | ) |
random access operator.
[in] | nPos | The index of the element. |
T* const& operator[] | ( | unsigned int | nPos | ) | const |
random access operator.
[in] | nPos | The index of the element. |
unsigned int size | ( | ) | const |
Returns the size of the container.