]> Creatis software - gdcm.git/blob - src/gdcmSeqEntry.h
Still in a debugging status.
[gdcm.git] / src / gdcmSeqEntry.h
1 // gdcmSeqEntry.h
2
3 #ifndef GDCMSQDOCENTRY_H
4 #define GDCMSQDOCENTRY_H
5
6 #include <list>
7
8 #include "gdcmSQItem.h"
9 #include "gdcmDocEntry.h"
10
11 //-----------------------------------------------------------------------------
12 typedef std::list<gdcmSQItem *> ListSQItem;
13 //-----------------------------------------------------------------------------
14
15 class GDCM_EXPORT gdcmSeqEntry : public gdcmDocEntry 
16 {
17 public:
18    gdcmSeqEntry(gdcmDictEntry* e, int depth);
19    ~gdcmSeqEntry(void);
20    
21    virtual void Print(std::ostream &os = std::cout); 
22
23  /// \brief   returns the SQITEM chained List for this SeQuence.
24    inline ListSQItem &GetSQItems() 
25       {return items;};
26       
27  /// \brief Sets the delimitor mode
28     inline void SetDelimitorMode(bool dm) 
29        { delimitor_mode = dm;}
30
31  /// \brief Sets the Sequence Delimitation Item
32     inline void SetSequenceDelimitationItem(gdcmDocEntry * e) 
33        { seq_term = e;}
34        
35     void AddEntry(gdcmSQItem *it); 
36
37  /// \brief   creates a new SQITEM for this SeQuence.
38     gdcmSQItem * NewItem(void);
39     
40    gdcmDocEntry *NewDocEntryByNumber(guint16 group, guint16 element);    
41    gdcmDocEntry *NewDocEntryByName  (std::string Name); 
42    gdcmDocEntry *GetDocEntryByNumber(guint16 group, guint16 element);
43
44    void SetDepthLevel(int depth);
45          
46 protected:
47
48 private:
49
50 // Variables
51
52 /// \brief If this Sequence is in delimitor mode (length =0xffffffff) or not
53    bool delimitor_mode;
54    
55 /// \brief chained list of SQ Items
56    ListSQItem items;
57    
58 /// \brief sequence terminator item 
59    gdcmDocEntry *seq_term;
60
61 };
62
63
64 //-----------------------------------------------------------------------------
65 #endif
66