-gdcmDictSet::~gdcmDictSet() {
- for (DictSetHT::iterator tag = Dicts.begin(); tag != Dicts.end(); ++tag) {
- gdcmDict* EntryToDelete = tag->second;
- if ( EntryToDelete )
- delete EntryToDelete;
+/**
+ * \brief Create a DictEntry which will be referenced in no dictionary
+ * @param group Group number of the Entry
+ * @param elem Element number of the Entry
+ * @param vr Value Representation of the Entry
+ * @param vm Value Multiplicity of the Entry
+ * @param name English name of the Entry
+ * @return virtual entry
+ */
+DictEntry *DictSet::NewVirtualDictEntry( uint16_t group,
+ uint16_t elem,
+ TagName vr,
+ TagName vm,
+ TagName name)
+{
+ DictEntry *entry;
+
+ // Let's follow 'Purify' advice
+ //
+ // const std::string tag = DictEntry::TranslateToKey(group,elem)
+ // + "#" + vr + "#" + vm + "#" + name;
+ char res[10];
+ sprintf(res,"%04x|%04x", group, elem);
+ std::string tag = res;
+ tag += "#" + vr + "#" + vm + "#" + name;
+
+ TagKeyHT::iterator it;
+
+ it = VirtualEntries.find(tag);
+ if ( it != VirtualEntries.end() )
+ {
+ entry = &(it->second);