34 #include "dcmtk/config/osconfig.h" 36 #include "dcmtk/ofstd/oflist.h" 38 #include "dcmtk/dcmdata/dcerror.h" 83 const OFLIST_TYPENAME OFListConstIterator(T) endPos = lst.
ItemList.end();
84 OFLIST_TYPENAME OFListConstIterator(T) iterator = lst.
ItemList.begin();
85 while (iterator != endPos)
122 OFLIST_TYPENAME OFListConstIterator(T) iterator =
ItemList.begin();
132 OFLIST_TYPENAME OFListConstIterator(T) iterator =
ItemList.begin();
149 OFLIST_TYPENAME OFListConstIterator(T) iterator =
ItemList.begin();
190 OFLIST_TYPENAME OFListIterator(T) iterator =
ItemList.begin();
207 OFLIST_TYPENAME OFListIterator(T) iterator =
ItemList.begin();
230 OFLIST_TYPENAME OFListConstIterator(T) &iterator)
const 232 OFBool result = OFFalse;
235 const OFLIST_TYPENAME OFListConstIterator(T) endPos =
ItemList.end();
236 while ((--idx > 0) && (iterator != endPos))
250 OFLIST_TYPENAME OFListConstIterator(T) &iterator)
const 252 const OFLIST_TYPENAME OFListConstIterator(T) endPos =
ItemList.end();
254 while ((iterator != endPos) && (!(*iterator == item)))
256 return (iterator != endPos);
OFCondition getItem(const size_t idx, T &item) const
get copy of the specified item
Template class to store and access items in a list structure.
void addItem(const T &item)
add item to the list
size_t getNumberOfItems() const
get number of items contained in the list
OFCondition insertItem(const size_t idx, const T &item)
insert item at specified position to the list
DSRListOfItems()
default constructor
virtual ~DSRListOfItems()
destructor
static const T EmptyItem
default item which is returned in getItem() if the index is invalid.
OFBool gotoItemPos(size_t idx, OFLIST_TYPENAME OFListConstIterator(T)&iterator) const
goto specified item position
void clear()
clear all internal variables
const T & getItem(const size_t idx) const
get reference to the specified item
OFBool isEmpty() const
check whether the list is empty
double linked list template class.
void addOnlyNewItem(const T &item)
add item to the list only if it's not already contained
OFList< T > ItemList
the list maintained by this class
OFCondition removeItem(const size_t idx)
remove item from the list
DSRListOfItems< T > & operator=(const DSRListOfItems< T > &lst)
assignment operator
OFBool isElement(const T &item) const
check whether specified item is contained in the list
DSRListOfItems(const DSRListOfItems< T > &lst)
copy constructor
OFBool gotoItem(const T &item, OFLIST_TYPENAME OFListConstIterator(T)&iterator) const
goto specified item
General purpose class for condition codes.