OFFIS DCMTK  Version 3.6.0
Public Member Functions | Private Member Functions | Private Attributes
GlobalDcmDataDictionary Class Reference

encapsulates a data dictionary with access methods which allow safe read and write access from multiple threads in parallel. More...

Collaboration diagram for GlobalDcmDataDictionary:
[legend]

List of all members.

Public Member Functions

 GlobalDcmDataDictionary (OFBool loadBuiltin, OFBool loadExternal)
 constructor.
 ~GlobalDcmDataDictionary ()
 destructor
const DcmDataDictionaryrdlock ()
 acquires a read lock and returns a const reference to the dictionary.
DcmDataDictionarywrlock ()
 acquires a write lock and returns a non-const reference to the dictionary.
void unlock ()
 unlocks the read or write lock which must have been acquired previously.
OFBool isDictionaryLoaded ()
 checks if a data dictionary has been loaded.
void clear ()
 erases the contents of the dictionary.

Private Member Functions

GlobalDcmDataDictionaryoperator= (const GlobalDcmDataDictionary &)
 private undefined assignment operator
 GlobalDcmDataDictionary (const GlobalDcmDataDictionary &)
 private undefined copy constructor

Private Attributes

DcmDataDictionary dataDict
 the data dictionary managed by this class

Detailed Description

encapsulates a data dictionary with access methods which allow safe read and write access from multiple threads in parallel.

A read/write lock is used to protect threads from each other. This allows parallel read-only access by multiple threads, which is the most common case.

Definition at line 223 of file dcdict.h.


Constructor & Destructor Documentation

GlobalDcmDataDictionary::GlobalDcmDataDictionary ( OFBool  loadBuiltin,
OFBool  loadExternal 
)

constructor.

Parameters:
loadBuiltinif true, the dictionary constructor calls loadBuiltinDictionary().
loadExternalif true, the dictionary constructor calls loadExternalDictionaries().

Member Function Documentation

erases the contents of the dictionary.

This method acquires and releases a write lock. It must not be called with another lock on the dictionary being held by the calling thread. This method is intended as a help for debugging memory leaks.

checks if a data dictionary has been loaded.

This method acquires and releases a read lock. It must not be called with another lock on the dictionary being held by the calling thread.

Returns:
OFTrue if dictionary has been loaded, OFFalse otherwise.

acquires a read lock and returns a const reference to the dictionary.

Returns:
const reference to dictionary

acquires a write lock and returns a non-const reference to the dictionary.

Returns:
non-const reference to dictionary.

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


Generated on Fri Jun 1 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.7.6.1