]> Creatis software - gdcm.git/blob - src/gdcmElValSet.h
* src/gdcm.h splitted in gdcmCommon.h, gdcmDict.h, gdcmDictEntry.h,
[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         ElValue* GetElementByNumber(guint32 group, guint32 element);
25         ElValue* GetElementByName  (string);
26         string   GetElValueByNumber(guint32 group, guint32 element);
27         string   GetElValueByName  (string);
28         
29         TagElValueHT & GetTagHt(void);  
30         
31         int SetElValueByNumber(string content, guint32 group, guint32 element);
32         int SetElValueByName  (string content, string TagName);
33         
34         int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
35         int SetElValueLengthByName  (guint32 l, string TagName);
36
37 };
38
39 #endif