1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.16 2003/07/23 08:43:03 jpr 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.
14 typedef std::map<TagKey, gdcmElValue*> TagElValueHT;
15 typedef std::map<std::string, gdcmElValue*> TagElValueNameHT;
17 class GDCM_EXPORT gdcmElValSet {
18 TagElValueHT tagHt; // Both accesses with a TagKey or with a
19 TagElValueNameHT NameHt; // the DictEntry.Name are required.
21 typedef std::string GroupKey;
22 typedef std::map<GroupKey, int> GroupHT;
25 void Add(gdcmElValue*);
27 void Print(std::ostream &);
28 void PrintByName(std::ostream &);
29 int Write(FILE *fp, FileType type);
31 gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
32 gdcmElValue* GetElementByName (std::string);
33 std::string GetElValueByNumber(guint16 group, guint16 element);
34 std::string GetElValueByName (std::string);
36 TagElValueHT & GetTagHt(void);
38 int SetElValueByNumber(std::string content, guint16 group, guint16 element);
39 int SetElValueByName (std::string content, std::string TagName);
41 int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
42 int SetElValueLengthByName (guint32 l, std::string TagName);
44 int SetVoidAreaByNumber(void *a, guint16 Group, guint16 Elem );
46 guint32 GenerateFreeTagKeyInGroup(guint16 group);
47 int CheckIfExistByNumber(guint16 Group, guint16 Elem );
50 void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
51 void WriteElements(FileType type, FILE *);