]> Creatis software - gdcm.git/blob - src/gdcmSeqEntry.h
PLEASE : keep on waiting for the final version !
[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);
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      
43 protected:
44
45 private:
46
47 // Variables
48
49 /// \brief If this Sequence is in delimitor mode (length =0xffffffff) or not
50    bool delimitor_mode;
51    
52 /// \brief chained list of SQ Items
53    ListSQItem items;
54    
55 /// \brief sequence terminator item 
56    gdcmDocEntry *seq_term;
57
58 };
59
60
61 //-----------------------------------------------------------------------------
62 #endif
63