1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.17 2003/10/02 11:26:15 malaterre Exp $
6 #include "gdcmCommon.h"
7 #include "gdcmElValue.h"
9 #include <stdio.h> // FIXME For FILE on GCC only
12 ////////////////////////////////////////////////////////////////////////////
13 // Container for a set of successfully parsed ElValues.
15 typedef std::map<TagKey, gdcmElValue*> TagElValueHT;
16 typedef std::map<std::string, gdcmElValue*> TagElValueNameHT;
18 class GDCM_EXPORT gdcmElValSet {
19 TagElValueHT tagHt; // Both accesses with a TagKey or with a
20 TagElValueNameHT NameHt; // the DictEntry.Name are required.
22 typedef std::string GroupKey;
23 typedef std::map<GroupKey, int> GroupHT;
26 void Add(gdcmElValue*);
28 void Print(std::ostream &);
29 void PrintByName(std::ostream &);
30 int Write(FILE *fp, FileType type);
32 gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
33 gdcmElValue* GetElementByName (std::string);
34 std::string GetElValueByNumber(guint16 group, guint16 element);
35 std::string GetElValueByName (std::string);
37 TagElValueHT & GetTagHt(void);
39 int SetElValueByNumber(std::string content, guint16 group, guint16 element);
40 int SetElValueByName (std::string content, std::string TagName);
42 int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
43 int SetElValueLengthByName (guint32 l, std::string TagName);
45 int SetVoidAreaByNumber(void *a, guint16 Group, guint16 Elem );
47 guint32 GenerateFreeTagKeyInGroup(guint16 group);
48 int CheckIfExistByNumber(guint16 Group, guint16 Elem );
51 void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
52 void WriteElements(FileType type, FILE *);