]> Creatis software - gdcm.git/blob - src/gdcmDictGroupName.h
* Some classes inherit now from gdcm::RefCounter
[gdcm.git] / src / gdcmDictGroupName.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDictGroupName.h,v $
5   Language:  C++
6   Date:      $Date: 2005/10/25 14:52:34 $
7   Version:   $Revision: 1.4 $
8                                                                                 
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.
12                                                                                 
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.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMDICTGROUPNAME_H
20 #define GDCMDICTGROUPNAME_H
21
22 #include "gdcmRefCounter.h"
23
24 #include <map>
25 #include <string>
26 #include <iostream>
27
28 namespace gdcm 
29 {
30
31 //-----------------------------------------------------------------------------
32 /// Group Name Hash Table
33 typedef std::map<uint16_t, TagName> DictGroupNameHT;
34
35 //-----------------------------------------------------------------------------
36 /**
37  * \brief Container for dicom 'Value Representation' Hash Table.
38  * \note   This is a singleton.
39  */
40 class GDCM_EXPORT DictGroupName : public RefCounter
41 {
42    gdcmTypeMacro(DictGroupName);
43
44 public:
45    static DictGroupName *New() {return new DictGroupName();}
46
47    void Print(std::ostream &os = std::cout);
48
49    const TagName &GetName(uint16_t group);
50
51 protected:
52    DictGroupName();
53    ~DictGroupName();
54
55 private:
56    DictGroupNameHT groupName;
57 };
58 } // end namespace gdcm
59
60 //-----------------------------------------------------------------------------
61 #endif