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_NAME_SPACE
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
00048 static SeqEntry *New(DocEntry *d, int depth) {return new SeqEntry(d,depth);}
00050 static SeqEntry *New(uint16_t group,uint16_t elem)
00051 {return new SeqEntry(group,elem);}
00052
00053 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
00054 void WriteContent(std::ofstream *fp, FileType filetype, bool insideMetaElements);
00055 uint32_t ComputeFullLength();
00056
00057 void AddSQItem(SQItem *it, int itemNumber);
00058 void ClearSQItem();
00059 SQItem *GetFirstSQItem();
00060 SQItem *GetNextSQItem();
00061 SQItem *GetSQItem(int itemNumber);
00062 unsigned int GetNumberOfSQItems();
00063
00065 void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
00067 void SetDelimitationItem(DocEntry *e);
00068
00070 DocEntry *GetDelimitationItem() { return SeqTerm;}
00071
00073 int GetDepthLevel() const { return SQDepthLevel; }
00075 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00076
00077 virtual void Copy(DocEntry *doc);
00078
00079 protected:
00080
00081 private:
00082
00083 SeqEntry( DocEntry *d, int depth );
00084 SeqEntry( uint16_t group, uint16_t elem );
00085 ~SeqEntry();
00086
00087
00089 bool DelimitorMode;
00090
00092 ListSQItem Items;
00094 ListSQItem::iterator ItSQItem;
00095
00097 DocEntry *SeqTerm;
00098
00103 int SQDepthLevel;
00104 };
00105 }
00106
00107 #endif
00108