1 /*=========================================================================
4 Module: $RCSfile: gdcmDictSet.h,v $
6 Date: $Date: 2007/08/22 16:14:04 $
7 Version: $Revision: 1.55 $
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 =========================================================================*/
19 #ifndef _GDCMDICTSET_H
20 #define _GDCMDICTSET_H
22 #include "gdcmRefCounter.h"
24 #include "gdcmGlobal.h"
29 namespace GDCM_NAME_SPACE
31 //-----------------------------------------------------------------------------
32 typedef std::map<DictKey, Dict*> DictSetHT;
34 //-----------------------------------------------------------------------------
36 * \brief Container for managing a set of loaded dictionaries (Dict).
37 * \note Hopefully, sharing dictionaries should avoid
38 * - reloading an already loaded dictionary (saving time)
39 * - having many in memory representations of the same dictionary
42 class GDCM_EXPORT DictSet : public RefCounter
44 gdcmTypeMacro(DictSet);
47 /// \brief Contructs a DictSet with a RefCounter
48 static DictSet *New() {return new DictSet();}
50 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
52 // Probabely useless !
53 //EntryNamesList *GetPubDictEntryNames();
54 //EntryNamesByCatMap *GetPubDictEntryNamesByCategory();
56 Dict *LoadDictFromFile( std::string const &fileName,
57 DictKey const &name );
59 Dict *GetDict( DictKey const &DictName );
61 /// \brief Returns the default reference DICOM V3 public dictionary.
62 //Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); }
63 Dict* GetDefaultPubDict() { return Global::DefaultPubDict; }
65 // \ brief Returns the virtual references DICOM dictionary.
66 // \ warning : not end user intended
67 // Dict *GetVirtualDict() { return &VirtualEntries; }
72 static std::string BuildDictPath();
79 /// Hash table of all dictionaries contained in this DictSet
81 /// Iterator to visit the Dictionaries of a given DictSet
82 DictSetHT::iterator ItDictHt;
84 /// Directory path to dictionaries
87 } // end namespace gdcm
89 //-----------------------------------------------------------------------------