00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GDCMELEMENTSET_H
00020 #define GDCMELEMENTSET_H
00021
00022 #include "gdcmDocEntrySet.h"
00023
00024 #include <map>
00025 #include <iostream>
00026 #include <fstream>
00027
00028 namespace gdcm
00029 {
00030 typedef std::map<TagKey, DocEntry *> TagDocEntryHT;
00031
00032
00040 class GDCM_EXPORT ElementSet : public DocEntrySet
00041 {
00042 gdcmTypeMacro(ElementSet);
00043
00044 public:
00045 virtual void Print(std::ostream &os = std::cout,
00046 std::string const &indent = "" );
00047
00048 void WriteContent(std::ofstream *fp, FileType filetype);
00049
00050 bool AddEntry(DocEntry *Entry);
00051 bool RemoveEntry(DocEntry *EntryToRemove);
00052 void ClearEntry();
00053
00054 DocEntry *GetFirstEntry();
00055 DocEntry *GetNextEntry();
00056 DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
00058 bool IsEmpty() { return TagHT.empty(); }
00059
00060 virtual void Copy(DocEntrySet *set);
00061
00062 protected:
00063 ElementSet();
00064 ~ElementSet();
00067 bool MayIWrite(uint16_t )
00068 { return true; }
00069 private:
00070
00072 TagDocEntryHT TagHT;
00074 TagDocEntryHT::iterator ItTagHT;
00075 };
00076 }
00077
00078 #endif
00079