-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 = Dict::New(filename);
+ Dicts[name] = newDict;
+
+ 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;