Public Member Functions | |
DSRListOfItems () | |
default constructor | |
DSRListOfItems (const DSRListOfItems< T > &lst) | |
copy constructor | |
virtual | ~DSRListOfItems () |
destructor | |
DSRListOfItems< T > & | operator= (const DSRListOfItems< T > &lst) |
assignment operator | |
void | clear () |
clear all internal variables | |
OFBool | isEmpty () const |
check whether the list is empty | |
size_t | getNumberOfItems () const |
get number of items contained in the list | |
OFBool | isElement (const T &item) const |
check whether specified item is contained in the list | |
const T & | getItem (const size_t idx) const |
get reference to the specified item | |
OFCondition | getItem (const size_t idx, T &item) const |
get copy of the specified item | |
void | addItem (const T &item) |
add item to the list | |
void | addOnlyNewItem (const T &item) |
add item to the list only if it's not already contained | |
OFCondition | insertItem (const size_t idx, const T &item) |
insert item at specified position to the list | |
OFCondition | removeItem (const size_t idx) |
remove item from the list | |
Static Public Attributes | |
const T | EmptyItem |
default item which is returned in getItem() if the index is invalid. | |
Protected Member Functions | |
OFBool | gotoItemPos (size_t idx, OFLIST_TYPENAME OFListConstIterator(T)&iterator) const |
goto specified item position | |
OFBool | gotoItem (const T &item, OFLIST_TYPENAME OFListConstIterator(T)&iterator) const |
goto specified item | |
Protected Attributes | |
OFList< T > | ItemList |
the list maintained by this class |
For instances of this class T needs to have at least a default constructor, assignment and comparison operator.
Definition at line 53 of file dsrtlist.h.
|
copy constructor
|
|
add item to the list
|
|
add item to the list only if it's not already contained
|
|
get copy of the specified item
|
|
get reference to the specified item
Reimplemented in DSRGraphicDataList. Definition at line 134 of file dsrtlist.h. |
|
get number of items contained in the list
|
|
goto specified item
Referenced by DSRListOfItems< DSRWaveformChannelItem >::isElement(). |
|
goto specified item position
Referenced by DSRListOfItems< DSRWaveformChannelItem >::getItem(), DSRListOfItems< DSRWaveformChannelItem >::insertItem(), and DSRListOfItems< DSRWaveformChannelItem >::removeItem(). |
|
insert item at specified position to the list
|
|
check whether specified item is contained in the list
Referenced by DSRListOfItems< DSRWaveformChannelItem >::addOnlyNewItem(). |
|
check whether the list is empty
|
|
assignment operator
|
|
remove item from the list
|
|
default item which is returned in getItem() if the index is invalid. This static member variable needs to be defined (not only declared) in each derived class. Definition at line 223 of file dsrtlist.h. |