00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GDCMSQDOCENTRY_H
00020 #define GDCMSQDOCENTRY_H
00021
00022 #include "gdcmDocEntry.h"
00023
00024 #include <list>
00025
00026 namespace gdcm
00027 {
00028 class SQItem;
00029
00030 typedef std::list<SQItem *> ListSQItem;
00031
00032
00040 class GDCM_EXPORT SeqEntry : public DocEntry
00041 {
00042 gdcmTypeMacro(SeqEntry);
00043
00044 public:
00046 static SeqEntry *New(DictEntry *e) {return new SeqEntry(e);}
00048 static SeqEntry *New(DocEntry *d, int depth) {return new SeqEntry(d,depth);}
00049
00050 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
00051 void WriteContent(std::ofstream *fp, FileType filetype);
00052 uint32_t ComputeFullLength();
00053
00054 void AddSQItem(SQItem *it, int itemNumber);
00055 void ClearSQItem();
00056 SQItem *GetFirstSQItem();
00057 SQItem *GetNextSQItem();
00058 SQItem *GetSQItem(int itemNumber);
00059 unsigned int GetNumberOfSQItems();
00060
00062 void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
00063 void SetDelimitationItem(DocEntry *e);
00065 DocEntry *GetDelimitationItem() { return SeqTerm;}
00066
00068 int GetDepthLevel() const { return SQDepthLevel; }
00070 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00071
00072 virtual void Copy(DocEntry *doc);
00073
00074 protected:
00075
00076 private:
00077 SeqEntry( DictEntry *e);
00078 SeqEntry( DocEntry *d, int depth );
00079 ~SeqEntry();
00080
00081
00083 bool DelimitorMode;
00084
00086 ListSQItem Items;
00088 ListSQItem::iterator ItSQItem;
00089
00091 DocEntry *SeqTerm;
00092
00097 int SQDepthLevel;
00098 };
00099 }
00100
00101 #endif
00102