+
+/** \brief
+ * Creates a new DocEntry (without any 'value' ...)
+ * @param group group number of the underlying DictEntry
+ * @param elem elem number of the underlying DictEntry
+ * @param vr V(alue) R(epresentation) of the Entry -if private Entry-
+ */
+DocEntry* DocEntrySet::NewDocEntryByNumber(uint16_t group, uint16_t elem,
+ TagName const & vr)
+{
+ // Find out if the tag we encountered is in the dictionaries:
+ Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
+ DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, elem);
+ std::string goodVR = vr;
+ DictEntry *goodDict = dictEntry;
+
+ // Check if the would VR is good
+ if (elem==0x0000)
+ goodVR="UL";
+
+ // Check if the DictEntry VR corresponds with the would VR
+ if (goodDict)
+ if (goodDict->GetVR() != goodVR && goodVR!=GDCM_UNKNOWN)
+ goodDict=NULL;
+
+ // Create a new virtual DictEntry if necessary
+ if (!goodDict)
+ {
+ if (dictEntry)
+ goodDict = NewVirtualDictEntry(group, elem, goodVR,"FIXME",dictEntry->GetName());
+ else
+ goodDict = NewVirtualDictEntry(group, elem, goodVR);
+ }
+
+ // Create the DocEntry
+ DocEntry *newEntry = new DocEntry(goodDict);
+ if (!newEntry)
+ {
+ dbg.Verbose(1, "SQItem::NewDocEntryByNumber",
+ "failed to allocate DocEntry");
+ return 0;
+ }
+ return newEntry;
+}
+
+/* \brief
+ * Probabely move, as is, to DocEntrySet, as a non virtual method
+ * and remove Document::NewDocEntryByName
+ */
+DocEntry *DocEntrySet::NewDocEntryByName(TagName const & name)