]> Creatis software - gdcm.git/blob - src/gdcmElValSet.h
eccd5584ab8e15cc35cf6bdc8f4b210f2650fdb5
[gdcm.git] / src / gdcmElValSet.h
1 // gdcmElValSet.h
2
3 #ifndef GDCMELVALSET_H
4 #define GDCMELVALSET_H
5
6 #include <stdio.h>    // FIXME For FILE on GCC only
7 #include <map>
8 #include "gdcmCommon.h"
9 #include "gdcmElValue.h"
10
11 ////////////////////////////////////////////////////////////////////////////
12 // Container for a set of successfully parsed ElValues.
13 typedef map<TagKey, ElValue*> TagElValueHT;
14 typedef map<string, ElValue*> TagElValueNameHT;
15
16 class GDCM_EXPORT ElValSet {
17         TagElValueHT tagHt;             // Both accesses with a TagKey or with a
18         TagElValueNameHT NameHt;        // the DictEntry.Name are required.
19 public: 
20         void Add(ElValue*);             
21         void Print(ostream &);
22         void PrintByName(ostream &);
23         int  Write(FILE *fp);
24         int  WriteAcr(FILE *fp);
25         ElValue* GetElementByNumber(guint32 group, guint32 element);
26         ElValue* GetElementByName  (string);
27         string   GetElValueByNumber(guint32 group, guint32 element);
28         string   GetElValueByName  (string);
29         
30         TagElValueHT & GetTagHt(void);  
31         
32         int SetElValueByNumber(string content, guint32 group, guint32 element);
33         int SetElValueByName  (string content, string TagName);
34         
35         int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
36         int SetElValueLengthByName  (guint32 l, string TagName);
37
38 };
39
40 #endif