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_NAME_SPACE
00028 {
00029 class DocEntry;
00030
00031
00032 typedef std::list<DocEntry *> ListDocEntry;
00033
00034
00041 class GDCM_EXPORT SQItem : public DocEntrySet
00042 {
00043 gdcmTypeMacro(SQItem);
00044
00045 public:
00046 static SQItem *New(int depthLevel) {return new SQItem(depthLevel);}
00047
00048 virtual void Print(std::ostream &os = std::cout,
00049 std::string const &indent = "" );
00050 void WriteContent(std::ofstream *fp, FileType filetype, bool insideMetaElements);
00051 uint32_t ComputeFullLength();
00052
00053 bool AddEntry(DocEntry *Entry);
00054 bool RemoveEntry(DocEntry *EntryToRemove);
00055 void ClearEntry();
00056
00057 DocEntry *GetFirstEntry();
00058 DocEntry *GetNextEntry();
00059
00060 DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
00061
00062 bool IsEmpty() { return DocEntries.empty(); }
00063
00065 int GetSQItemNumber() { return SQItemNumber; }
00067 void SetSQItemNumber(int itemNumber) { SQItemNumber = itemNumber; }
00068
00070 int GetDepthLevel() { return SQDepthLevel; }
00071
00073 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00074
00075 virtual void Copy(DocEntrySet *set);
00076
00077 protected:
00078 SQItem(int depthLevel);
00079 ~SQItem();
00080
00081
00083 ListDocEntry DocEntries;
00085 ListDocEntry::iterator ItDocEntries;
00086
00087 private:
00093 int SQDepthLevel;
00094
00096 int SQItemNumber;
00097 };
00098 }
00099
00100 #endif