32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/oflist.h"
34 #include "dcmtk/ofstd/ofstream.h"
41 const int DCMHASHDICT_DEFAULT_HASHSIZE = 2047;
44 typedef OFListIterator(
DcmDictEntry *) OFListIteratorPDcmDictEntry;
45 typedef OFListConstIterator(
DcmDictEntry *) OFListConstIteratorPDcmDictEntry;
66 OFListIteratorPDcmDictEntry::operator=(i);
89 OFListConstIteratorPDcmDictEntry::operator=(i);
165 {
return !(*
this == x); }
173 {
stepUp();
return *
this; }
217 {
_init(hashTabLen); }
257 STD_NAMESPACE ostream&
loadSummary(STD_NAMESPACE ostream& out);
268 void _init(
int hashSize);
int lowestBucket
index of lowest bucket for which the DcmDictEntryList has been initialized
DcmDictEntryListIterator(const OFListIterator(DcmDictEntry *)&iter)
constructor
class maintaining a attribute tag (group and element number)
STD_NAMESPACE ostream & loadSummary(STD_NAMESPACE ostream &out)
prints some information about hash table bucket utilization
const DcmDictEntry * operator*() const
dereferencing of iterator
iterator class for traversing a DcmHashDict
OFBool operator!=(const DcmHashDictIterator &x) const
comparison non-equality
an ordered list of pointers to DcmDictEntry objects
DcmHashDictIterator operator++(int)
post-increment operator
DcmDictEntry * findInList(DcmDictEntryList &lst, const DcmTagKey &k, const char *privCreator) const
searcjes entry for the given tag and private creator
const_iterator class for traversing a DcmDictEntryList
each object of this class manages one entry of the global DICOM data dictionary.
int highestBucket
index of highest bucket for which the DcmDictEntryList has been initialized
void clear()
clears the hash table of all entries
DcmDictEntryListIterator & operator=(const DcmDictEntryListIterator &i)
copy assignment operator
DcmHashDict(int hashTabLen=DCMHASHDICT_DEFAULT_HASHSIZE)
constructor
DcmHashDictIterator & operator=(const DcmHashDictIterator &i)
copy assignment operator
DcmHashDict & operator=(const DcmHashDict &)
private unimplemented copy assignment operator
a hash table of pointers to DcmDictEntry objects
DcmDictEntryListConstIterator(const OFListConstIterator(DcmDictEntry *)&iter)
constructor
DcmHashDictIterator end() const
returns iterator to end of hash table
DcmDictEntryListConstIterator()
default constructor
DcmHashDictIterator(const DcmHashDictIterator &i)
copy constructor
OFBool operator==(const DcmHashDictIterator &x) const
comparison equality
int size() const
counts total number of entries
const DcmHashDict * dict
pointer to the hash dictionary this iterator traverses
DcmDictEntryList()
constructor
DcmDictEntryListConstIterator & operator=(const DcmDictEntryListConstIterator &i)
copy assignment operator
void put(DcmDictEntry *e)
inserts an entry into hash table (deletes old entry if present)
DcmHashDictIterator begin() const
returns iterator to start of hash table
iterator class for traversing a DcmDictEntryList
~DcmDictEntryList()
destructor
DcmDictEntryList ** hashTab
array of (hash table size) pointers to DcmDictEntryList elements implementing the different buckets o...
DcmDictEntryList & operator=(const DcmDictEntryList &)
private undefined copy assignment operator
void init(const DcmHashDict *d, OFBool atEnd=OFFalse)
initializes the iterator
void stepUp()
implements increment operator on hash dictionary
int hashTabLength
number of buckets in hash table
double linked list template class.
DcmDictEntryListIterator()
default constructor
DcmDictEntry * removeInList(DcmDictEntryList &lst, const DcmTagKey &k, const char *privCreator)
removes the entry for the given tag and private creator
void clear()
clears list and deletes all entries
DcmDictEntry * insertInList(DcmDictEntryList &lst, DcmDictEntry *e)
inserts new entry into given list
DcmHashDictIterator & operator++()
pre-increment operator
int entryCount
number of entries in hash table
int hash(const DcmTagKey *k) const
compute hash value for given tag key
DcmDictEntry * insertAndReplace(DcmDictEntry *e)
inserts an entry into the list and returns any replaced entry
DcmHashDictIterator(const DcmHashDict *d, OFBool atEnd=OFFalse)
constructor, creates iterator to existing hash dictionary
OFBool iterating
flag indicating if iter is currently valid
int hindex
index of current bucket
DcmHashDictIterator()
default constructor
void del(const DcmTagKey &k, const char *privCreator)
deletes the entry for the given tag and private creator
void _init(int hashSize)
performs initialization for given hash table size, called from constructor
DcmDictEntryListIterator iter
iterator for traversing a bucket in the hash table