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);
137 : dict(NULL), hindex(0), iterating(OFFalse), iter()
146 : dict(NULL), hindex(0), iterating(OFFalse), iter()
151 : dict(i.dict), hindex(i.hindex), iterating(i.iterating), iter(i.iter)
161 {
return (hindex == x.
hindex) && (iter == x.
iter); }
165 {
return !(*
this == x); }
173 { stepUp();
return *
this; }
186 void init(
const DcmHashDict *d, OFBool atEnd = OFFalse);
216 : hashTab(NULL), hashTabLength(0), lowestBucket(0), highestBucket(0), entryCount(0)
217 { _init(hashTabLen); }
223 int size()
const {
return entryCount; }
243 void del(
const DcmTagKey& k,
const char *privCreator);
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)
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
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
DcmDictEntryListIterator & operator=(const DcmDictEntryListIterator &i)
copy assignment operator
DcmHashDict(int hashTabLen=DCMHASHDICT_DEFAULT_HASHSIZE)
constructor
DcmHashDictIterator & operator=(const DcmHashDictIterator &i)
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
DcmHashDictIterator begin() const
returns iterator to start of hash table
iterator class for traversing a DcmDictEntryList
DcmDictEntryList ** hashTab
array of (hash table size) pointers to DcmDictEntryList elements implementing the different buckets o...
int hashTabLength
number of buckets in hash table
double linked list template class.
DcmDictEntryListIterator()
default constructor
DcmHashDictIterator & operator++()
pre-increment operator
int entryCount
number of entries in hash table
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
DcmDictEntryListIterator iter
iterator for traversing a bucket in the hash table