1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2005/11/28 15:20:33 $
7 Version: $Revision: 1.51 $
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 "gdcmCommandManager.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 * - reloading an already loaded dictionary (saving time)
38 * - having many in memory representations of the same dictionary
41 class GDCM_EXPORT DictSet : public CommandManager
43 gdcmTypeMacro(DictSet);
46 /// \brief Contructs a DictSet with a RefCounter
47 static DictSet *New() {return new DictSet();}
49 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
51 // Probabely useless !
52 //EntryNamesList *GetPubDictEntryNames();
53 //EntryNamesByCatMap *GetPubDictEntryNamesByCategory();
55 Dict *LoadDictFromFile( std::string const &fileName,
56 DictKey const &name );
58 Dict *GetDict( DictKey const &DictName );
60 /// \brief Returns the default reference DICOM V3 public dictionary.
61 Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); }
63 // \ brief Returns the virtual references DICOM dictionary.
64 // \ warning : not end user intended
65 // Dict *GetVirtualDict() { return &VirtualEntries; }
70 static std::string BuildDictPath();
77 /// Hash table of all dictionaries contained in this DictSet
79 /// Iterator to visit the Dictionaries of a given DictSet
80 DictSetHT::iterator ItDictHt;
82 /// Directory path to dictionaries
85 } // end namespace gdcm
87 //-----------------------------------------------------------------------------