00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GDCMSQITEM_H
00019 #define GDCMSQITEM_H
00020
00021 #include "gdcmDocEntrySet.h"
00022 #include "gdcmElementSet.h"
00023
00024 #include <list>
00025 #include <fstream>
00026
00027 namespace gdcm
00028 {
00029 class DocEntry;
00030
00031
00032 typedef std::list<DocEntry *> ListDocEntry;
00033
00034
00041 class GDCM_EXPORT SQItem : public DocEntrySet
00042 {
00043 public:
00044 SQItem(int depthLevel);
00045 ~SQItem();
00046
00047 virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" );
00048 void WriteContent(std::ofstream *fp, FileType filetype);
00049
00050 bool AddEntry(DocEntry *Entry);
00051 bool RemoveEntry(DocEntry *EntryToRemove);
00052 bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
00053 void ClearEntry();
00054
00055 DocEntry *GetFirstEntry();
00056 DocEntry *GetNextEntry();
00057
00058 DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
00059
00060 bool IsEmpty() { return DocEntries.empty(); };
00061
00063 int GetSQItemNumber() { return SQItemNumber; };
00065 void SetSQItemNumber(int itemNumber) { SQItemNumber = itemNumber; };
00066
00068 int GetDepthLevel() { return SQDepthLevel; }
00069
00071 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00072
00074 void SetBaseTagKey( BaseTagKey const &key ) { BaseTagKeyNested = key; }
00075
00077 BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
00078
00079 protected:
00080
00082 ListDocEntry DocEntries;
00084 ListDocEntry::iterator ItDocEntries;
00086 ListDocEntry::iterator ItValEntries;
00087
00088 private:
00094 int SQDepthLevel;
00095
00098 BaseTagKey BaseTagKeyNested;
00099
00101 int SQItemNumber;
00102 };
00103 }
00104
00105 #endif