DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GlobalDcmDataDictionary Class Reference

global singleton dicom dictionary that is used by DCMTK in order to lookup attribute VR, tag names and so on. More...

Public Member Functions

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

Private Member Functions

GlobalDcmDataDictionaryoperator= (const GlobalDcmDataDictionary &)
 private undefined assignment operator
 
 GlobalDcmDataDictionary (const GlobalDcmDataDictionary &)
 private undefined copy constructor
 
void createDataDict ()
 create the data dictionary instance for this class. More...
 

Private Attributes

DcmDataDictionarydataDict
 the data dictionary managed by this class
 
OFReadWriteLock dataDictLock
 the read/write lock used to protect access from multiple threads
 

Detailed Description

global singleton dicom dictionary that is used by DCMTK in order to lookup attribute VR, tag names and so on.

The dictionary is internally populated on first use, if the user accesses it via rdlock() or wrlock(). The dictionary allows safe read (shared) and write (exclusive) access from multiple threads in parallel.

Member Function Documentation

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.

Used for first intialization. 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.

Returns
OFTrue if dictionary has been loaded, OFFalse otherwise.
const DcmDataDictionary& GlobalDcmDataDictionary::rdlock ( )

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

Returns
const reference to dictionary
DcmDataDictionary& GlobalDcmDataDictionary::wrlock ( )

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 Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8