DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
encapsulates a data dictionary with access methods which allow safe read and write access from multiple threads in parallel. More...
Public Member Functions | |
GlobalDcmDataDictionary () | |
constructor. | |
~GlobalDcmDataDictionary () | |
destructor | |
const DcmDataDictionary & | rdlock () |
acquires a read lock and returns a const reference to the dictionary. | |
DcmDataDictionary & | wrlock () |
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 | |
GlobalDcmDataDictionary & | operator= (const GlobalDcmDataDictionary &) |
private undefined assignment operator | |
GlobalDcmDataDictionary (const GlobalDcmDataDictionary &) | |
private undefined copy constructor | |
void | createDataDict () |
create the data dictionary instance for this class. | |
Private Attributes | |
DcmDataDictionary * | dataDict |
the data dictionary managed by this class |
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.
void GlobalDcmDataDictionary::clear | ( | ) |
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.
void GlobalDcmDataDictionary::createDataDict | ( | ) | [private] |
create the data dictionary instance for this class.
The caller must not have dataDictLock locked.
OFBool GlobalDcmDataDictionary::isDictionaryLoaded | ( | ) |
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.
const DcmDataDictionary& GlobalDcmDataDictionary::rdlock | ( | ) |
acquires a read lock and returns a const reference to the dictionary.
acquires a write lock and returns a non-const reference to the dictionary.