1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2005/10/25 14:52:34 $
7 Version: $Revision: 1.49 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
22 #include "gdcmRefCounter.h"
30 //-----------------------------------------------------------------------------
31 typedef std::map<DictKey, Dict*> DictSetHT;
33 //-----------------------------------------------------------------------------
35 * \brief Container for managing a set of loaded dictionaries (Dict).
36 * \note Hopefully, sharing dictionaries should avoid
37 * \par reloading an already loaded dictionary (saving time)
38 * \par having many in memory representations of the same dictionary
41 class GDCM_EXPORT DictSet : public RefCounter
43 gdcmTypeMacro(DictSet);
46 static DictSet *New() {return new DictSet();}
48 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
50 // Probabely useless !
51 //EntryNamesList *GetPubDictEntryNames();
52 //EntryNamesByCatMap *GetPubDictEntryNamesByCategory();
54 Dict *LoadDictFromFile( std::string const &fileName,
55 DictKey const &name );
57 Dict *GetDict( DictKey const &DictName );
59 /// \brief Returns the default reference DICOM V3 public dictionary.
60 Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); }
62 // \ brief Returns the virtual references DICOM dictionary.
63 // \ warning : not end user intended
64 // Dict *GetVirtualDict() { return &VirtualEntries; }
69 static std::string BuildDictPath();
76 /// Hash table of all dictionaries contained in this DictSet
78 /// Iterator to visit the Dictionaries of a given DictSet
79 DictSetHT::iterator ItDictHt;
81 /// Directory path to dictionaries
84 } // end namespace gdcm
86 //-----------------------------------------------------------------------------