]> Creatis software - gdcm.git/blobdiff - src/gdcmElValSet.h
*FIX : gdcmHeader::LoadElements is now based
[gdcm.git] / src / gdcmElValSet.h
index 7fc07ce3779ace1d8f30134b8fa4f920f16c5bac..0d22c603b68fa15257a072c400353ddd1d805859 100644 (file)
@@ -1,53 +1,61 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.9 2003/04/08 17:10:58 jpr Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.18 2003/11/10 09:21:40 jpr Exp $
 
 #ifndef GDCMELVALSET_H
 #define GDCMELVALSET_H
 
-#include <stdio.h>    // FIXME For FILE on GCC only
-#include <map>
 #include "gdcmCommon.h"
 #include "gdcmElValue.h"
 
+#include <stdio.h>    // FIXME For FILE on GCC only
+#include <map>
+#include <list>       // for linking together *all* the Dicom Elements
+
 ////////////////////////////////////////////////////////////////////////////
 // Container for a set of successfully parsed ElValues.
-typedef map<TagKey, gdcmElValue*> TagElValueHT;
-typedef map<string, gdcmElValue*> TagElValueNameHT;
+
+typedef std::map<TagKey,      gdcmElValue*> TagElValueHT;
+typedef std::map<std::string, gdcmElValue*> TagElValueNameHT;
+   
+typedef std::string GroupKey;
+typedef std::map<GroupKey, int> GroupHT;
+
+typedef std::list<gdcmElValue*> ListTag; // for linking together the Elements
 
 class GDCM_EXPORT gdcmElValSet {
    TagElValueHT tagHt;             // Both accesses with a TagKey or with a
    TagElValueNameHT NameHt;        // the DictEntry.Name are required.
-   
-   typedef string GroupKey;
-   typedef map<GroupKey, int> GroupHT; 
-   
+   ListTag listElem;
+
 public:        
+   ~gdcmElValSet();
    void Add(gdcmElValue*);
                        
-   void Print(ostream &);
-   void PrintByName(ostream &);
+   void Print(std::ostream &);
+   void PrintByName(std::ostream &);
    int  Write(FILE *fp, FileType type);
 
    gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
-   gdcmElValue* GetElementByName  (string);
-   string   GetElValueByNumber(guint16 group, guint16 element);
-   string   GetElValueByName  (string);
+   gdcmElValue* GetElementByName  (std::string);
+   std::string  GetElValueByNumber(guint16 group, guint16 element);
+   std::string  GetElValueByName  (std::string);
        
    TagElValueHT & GetTagHt(void);      
+   ListTag & GetListElem(void);        
        
-   int SetElValueByNumber(string content, guint16 group, guint16 element);
-   int SetElValueByName  (string content, string TagName);
+   int SetElValueByNumber(std::string content, guint16 group, guint16 element);
+   int SetElValueByName  (std::string content, std::string TagName);
        
    int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
-   int SetElValueLengthByName  (guint32 l, string TagName);
+   int SetElValueLengthByName  (guint32 l, std::string TagName);
+   
+   int SetVoidAreaByNumber(void *a, guint16 Group, guint16 Elem );
 
    guint32 GenerateFreeTagKeyInGroup(guint16 group);
+   int CheckIfExistByNumber(guint16 Group, guint16 Elem );
        
 private:
-   void UpdateGroupLength(bool SkipSequence = false);
+   void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
    void WriteElements(FileType type, FILE *);
-   
-   void UpdateGroupLengthNew(bool SkipSequence = false, FileType type = ImplicitVR);
-
 };
 
 #endif