DCMTK Version 3.7.0
OFFIS DICOM Toolkit
Loading...
Searching...
No Matches
DcmHashDict Class Reference

a hash table of pointers to DcmDictEntry objects More...

Public Member Functions

 DcmHashDict ()
 default constructor
 ~DcmHashDict ()
 destructor
int size () const
 counts total number of entries
void clear ()
 clears the hash table of all entries
void put (DcmDictEntry *entry)
 inserts an entry into hash table (deletes old entry if present)
const DcmDictEntryget (const DcmTagKey &key, const char *privCreator) const
 hash table lookup for the given tag key and private creator name
void del (const DcmTagKey &key, const char *privCreator)
 deletes the entry for the given tag and private creator identifier
DcmHashDictIterator begin () const
 returns iterator to start of hash table
DcmHashDictIterator end () const
 returns iterator to end of hash table
STD_NAMESPACE ostream & loadSummary (STD_NAMESPACE ostream &out)
 prints some information about hash table bucket utilization

Private Member Functions

 DcmHashDict (const DcmHashDict &)
 private unimplemented copy constructor
DcmHashDictoperator= (const DcmHashDict &)
 private unimplemented copy assignment operator
void _init ()
 performs initialization for given hash table size, called from constructor
int hash (const DcmTagKey *key, const char *privCreator) const
 compute hash value for given tag key
DcmDictEntryinsertInList (DcmDictEntryList &lst, DcmDictEntry *entry)
 inserts new entry into given list
DcmDictEntryremoveInList (DcmDictEntryList &lst, const DcmTagKey &key, const char *privCreator)
 removes the entry for the given tag and private creator identifier
DcmDictEntryfindInList (DcmDictEntryList &lst, const DcmTagKey &key, const char *privCreator) const
 searches entry for the given tag and private creator identifier

Private Attributes

DcmDictEntryList ** hashTab
 array of (hash table size) pointers to DcmDictEntryList elements implementing the different buckets of the hash table
int lowestBucket
 index of lowest bucket for which the DcmDictEntryList has been initialized
int highestBucket
 index of highest bucket for which the DcmDictEntryList has been initialized
int entryCount
 number of entries in hash table

Static Private Attributes

static const int hashTabLength
 number of buckets in hash table

Friends

class DcmHashDictIterator

Detailed Description

a hash table of pointers to DcmDictEntry objects

Member Function Documentation

◆ del()

void DcmHashDict::del ( const DcmTagKey & key,
const char * privCreator )

deletes the entry for the given tag and private creator identifier

Parameters
keytag key of the entry to be deleted
privCreatorprivate creator identifier, may be NULL

◆ findInList()

DcmDictEntry * DcmHashDict::findInList ( DcmDictEntryList & lst,
const DcmTagKey & key,
const char * privCreator ) const
private

searches entry for the given tag and private creator identifier

Parameters
lstlist to search in
keytag key of the entry to be searched for
privCreatorprivate creator identifier, may be NULL
Returns
pointer to found element, NULL if not found

◆ get()

const DcmDictEntry * DcmHashDict::get ( const DcmTagKey & key,
const char * privCreator ) const

hash table lookup for the given tag key and private creator name

Parameters
keytag key of the entry to be searched for
privCreatorprivate creator identifier, may be NULL
Returns
pointer to entry (if found), otherwise NULL

◆ hash()

int DcmHashDict::hash ( const DcmTagKey * key,
const char * privCreator ) const
private

compute hash value for given tag key

Parameters
keypointer to tag key
privCreatorprivate creator identifier, may be NULL
Returns
hash value

◆ insertInList()

DcmDictEntry * DcmHashDict::insertInList ( DcmDictEntryList & lst,
DcmDictEntry * entry )
private

inserts new entry into given list

Parameters
lstlist to add to
entrynew element to add, will be deleted upon destruction of the hash table
Returns
pointer to replaced element, if any

◆ loadSummary()

STD_NAMESPACE ostream & DcmHashDict::loadSummary ( STD_NAMESPACE ostream & out)

prints some information about hash table bucket utilization

Parameters
outthe stream to print into

◆ put()

void DcmHashDict::put ( DcmDictEntry * entry)

inserts an entry into hash table (deletes old entry if present)

Parameters
entrypointer to new entry

◆ removeInList()

DcmDictEntry * DcmHashDict::removeInList ( DcmDictEntryList & lst,
const DcmTagKey & key,
const char * privCreator )
private

removes the entry for the given tag and private creator identifier

Parameters
lstlist to remove from
keytag key of the entry to be removed
privCreatorprivate creator identifier, may be NULL
Returns
pointer to removed element, if any

◆ size()

int DcmHashDict::size ( ) const
inline

counts total number of entries

Returns
number of entries

References entryCount.


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


Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1