Loading...
Searching...
No Matches
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 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 | rdunlock ()
| unlocks the read lock which must have been acquired previously.
void | wrunlock ()
| unlocks the 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
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

## clear()

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.

## createDataDict()

void GlobalDcmDataDictionary::createDataDict | ( |  | ) |

private

create the data dictionary instance for this class.

Used for first initialization. The caller must not have dataDictLock locked.

## isDictionaryLoaded()

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.

## rdlock()

const DcmDataDictionary & GlobalDcmDataDictionary::rdlock | ( |  | ) |

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

Returns
  const reference to dictionary

## wrlock()

DcmDataDictionary & GlobalDcmDataDictionary::wrlock | ( |  | ) |

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

Returns
  non-const reference to dictionary

## Member Data Documentation

## dataDictLock

OFReadWriteLock GlobalDcmDataDictionary::dataDictLock

private

the read/write lock used to protect access from multiple threads

Remarks
  this member is only available if DCMTK is compiled with thread support enabled.

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

- dcmdata/include/dcmtk/dcmdata/dcdict.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0