OFFIS DCMTK  Version 3.6.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DcmSimpleMap< T > Class Template Reference

this class implements a simple map of key-value pairs. More...

Inheritance diagram for DcmSimpleMap< T >:
[legend]
Collaboration diagram for DcmSimpleMap< T >:
[legend]

Public Member Functions

 DcmSimpleMap ()
 default constructor
 
 ~DcmSimpleMap ()
 destructor
 
OFBool add (const OFString &key, const T &value)
 inserts a new key-value pair into the map by means of copy construction.
 
const T * lookup (const OFString &key) const
 looks up the given key in the map.
 
OFLIST_TYPENAME OFListIterator (DcmKeyValuePair< T > *) begin()
 return iterator to first element in list
 
OFLIST_TYPENAME OFListIterator (DcmKeyValuePair< T > *) end()
 return iterator to end of list
 

Private Member Functions

 DcmSimpleMap (const DcmSimpleMap &arg)
 private undefined copy constructor
 
DcmSimpleMapoperator= (const DcmSimpleMap &arg)
 private undefined copy assignment operator
 

Private Attributes

OFList< DcmKeyValuePair< T > * > list_
 the list of key-value pairs
 

Detailed Description

template<class T>
class DcmSimpleMap< T >

this class implements a simple map of key-value pairs.

No double keys are permitted, the second attempt to insert an element with a key already present will fail. Template type must be copy constructable.

Definition at line 120 of file dcmsmap.h.

Member Function Documentation

template<class T>
OFBool DcmSimpleMap< T >::add ( const OFString key,
const T &  value 
)
inline

inserts a new key-value pair into the map by means of copy construction.

Parameters
keykey
valuevalue
Returns
true if successful, false if failed because key already present

Definition at line 147 of file dcmsmap.h.

template<class T>
const T* DcmSimpleMap< T >::lookup ( const OFString key) const
inline

looks up the given key in the map.

Parameters
keykey
Returns
pointer to value if found, NULL otherwise.

Definition at line 162 of file dcmsmap.h.

Referenced by DcmSimpleMap< DcmExtendedNegotiationList * >::add().


The documentation for this class was generated from the following file:


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2