1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.8 2003/04/08 15:03:35 frog Exp $
6 #include <stdio.h> // FIXME For FILE on GCC only
8 #include "gdcmCommon.h"
9 #include "gdcmElValue.h"
11 ////////////////////////////////////////////////////////////////////////////
12 // Container for a set of successfully parsed ElValues.
13 typedef map<TagKey, gdcmElValue*> TagElValueHT;
14 typedef map<string, gdcmElValue*> TagElValueNameHT;
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 //FIXME This is redundant with gdcmHeader::FileType enum. That sux !
21 void Add(gdcmElValue*);
23 //void ReplaceOrCreate(gdcmElValue*);
24 void Print(ostream &);
25 void PrintByName(ostream &);
26 int Write(FILE *fp, FileType type);
28 gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
29 gdcmElValue* GetElementByName (string);
30 string GetElValueByNumber(guint16 group, guint16 element);
31 string GetElValueByName (string);
33 TagElValueHT & GetTagHt(void);
35 int SetElValueByNumber(string content, guint16 group, guint16 element);
36 int SetElValueByName (string content, string TagName);
38 int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
39 int SetElValueLengthByName (guint32 l, string TagName);
41 guint32 GenerateFreeTagKeyInGroup(guint16 group);
44 void UpdateGroupLength(bool SkipSequence = false);
45 void WriteElements(FileType type, FILE *);