]> Creatis software - gdcm.git/blob - src/gdcmElValSet.h
696e8e44df039037981e0c9378557a4764761b67
[gdcm.git] / src / gdcmElValSet.h
1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.4 2003/03/21 08:52:31 jpr Exp $
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, gdcmElValue*> TagElValueHT;
14 typedef map<string, gdcmElValue*> TagElValueNameHT;
15
16 class GDCM_EXPORT gdcmElValSet {
17         TagElValueHT tagHt;             // Both accesses with a TagKey or with a
18         TagElValueNameHT NameHt;        // the DictEntry.Name are required.
19 public: 
20         void Add(gdcmElValue*); 
21         void ReplaceOrCreate(gdcmElValue*);             
22         void Print(ostream &);
23         void PrintByName(ostream &);
24         int  Write(FILE *fp);
25         int  WriteAcr(FILE *fp);
26         gdcmElValue* GetElementByNumber(guint32 group, guint32 element);
27         gdcmElValue* GetElementByName  (string);
28         string   GetElValueByNumber(guint32 group, guint32 element);
29         string   GetElValueByName  (string);
30         
31         TagElValueHT & GetTagHt(void);  
32         
33         int SetElValueByNumber(string content, guint32 group, guint32 element);
34         int SetElValueByName  (string content, string TagName);
35         
36         int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
37         int SetElValueLengthByName  (guint32 l, string TagName);
38
39 };
40
41 #endif