-int gdcmDictSet::LoadDicomV3Dict(void) {
- if (dicts.count(PUB_DICT_NAME))
- return 1;
- return LoadDictFromFile(DictPath + PUB_DICT_FILENAME, PUB_DICT_NAME);
+//-----------------------------------------------------------------------------
+// Public
+/**
+ * \brief Loads a dictionary from a specified file, and add it
+ * to already the existing ones contained in this DictSet.
+ * @param filename Absolute or relative filename containing the
+ * dictionary to load.
+ * @param name Symbolic name that be used as identifier of the newly
+ * created dictionary.
+ */
+Dict *DictSet::LoadDictFromFile(std::string const &filename,
+ DictKey const &name)
+{
+ Dict *newDict = new Dict(filename);
+ AppendDict(newDict, name);
+
+ return newDict;
+}
+
+/**
+ * \brief Retrieve the specified dictionary (when existing) from this
+ * DictSet.
+ * @param dictName The symbolic name of the searched dictionary.
+ * \result The retrieved dictionary.
+ */
+Dict *DictSet::GetDict(DictKey const &dictName)
+{
+ DictSetHT::iterator dict = Dicts.find(dictName);
+ if ( dict != Dicts.end() )
+ {
+ return dict->second;
+ }
+ return NULL;
+}
+
+/**
+ * \brief Get the first dictionary while visiting the DictSet
+ * \return The first Dict if found, otherwhise NULL
+ */
+Dict *DictSet::GetFirstDict()
+{
+ ItDictHt = Dicts.begin();
+ if ( ItDictHt != Dicts.end() )
+ return ItDictHt->second;
+ return NULL;