36 #include "dcmtk/config/osconfig.h"
37 #include "dcmtk/ofstd/oflist.h"
38 #include "dcmtk/ofstd/ofstring.h"
134 while (first != last)
149 OFBool result = OFFalse;
166 while (first != last)
168 if ((*first)->matches(key))
return &((*first)->value());
T & value()
return value of key-value pair
const T & value() const
return value of key-value pair
const T * lookup(const OFString &key) const
looks up the given key in the map.
OFIterator< T > erase(OFIterator< T > position)
removes the element at the given position from the list.
DcmKeyValuePair(const DcmKeyValuePair &arg)
copy constructor
double linked list template class.
this template class implements a simple key - value pair map that is used in template class DcmSimple...
~DcmKeyValuePair()
destructor
OFIterator< T > end() const
returns an iterator which points to the past-to-end element of the list.
OFBool matches(const OFString &key) const
checks if this entry matches the given key
OFList< DcmKeyValuePair< T > * > list_
the list of key-value pairs
OFBool add(const OFString &key, const T &value)
inserts a new key-value pair into the map by means of copy construction.
OFBool operator==(const DcmKeyValuePair &arg) const
comparison operator.
DcmKeyValuePair(const OFString &k, const T &v)
constructor
DcmSimpleMap & operator=(const DcmSimpleMap &arg)
private undefined copy assignment operator
this class implements a simple map of key-value pairs.
OFIterator< T > begin() const
returns an iterator referencing the first element in the list.
DcmKeyValuePair & operator=(const DcmKeyValuePair &arg)
private undefined copy assignment operator
DcmSimpleMap()
default constructor
OFLIST_TYPENAME OFListIterator(DcmKeyValuePair< T > *) begin()
return iterator to first element in list
~DcmSimpleMap()
destructor
a simple string class that implements a subset of std::string.
OFLIST_TYPENAME OFListIterator(DcmKeyValuePair< T > *) end()
return iterator to end of list
void push_back(const T &x)
inserts after the last element of the list.