]> Creatis software - gdcm.git/blob - src/gdcmSeqEntry.h
ENH: Ok second chunk of patch, tests seems to go smoothly
[gdcm.git] / src / gdcmSeqEntry.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmSeqEntry.h,v $
5   Language:  C++
6   Date:      $Date: 2004/06/21 04:43:02 $
7   Version:   $Revision: 1.11 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMSQDOCENTRY_H
20 #define GDCMSQDOCENTRY_H
21
22 #include <list>
23
24 #include "gdcmSQItem.h"
25 #include "gdcmDocEntry.h"
26
27 //-----------------------------------------------------------------------------
28 typedef std::list<gdcmSQItem *> ListSQItem;
29 //-----------------------------------------------------------------------------
30
31 class GDCM_EXPORT gdcmSeqEntry : public gdcmDocEntry 
32 {
33 public:
34    gdcmSeqEntry(gdcmDictEntry* e, int depth);
35    virtual ~gdcmSeqEntry();
36    
37    virtual void Print(std::ostream &os = std::cout); 
38
39    /// \brief   returns the SQITEM chained List for this SeQuence.
40    inline ListSQItem &GetSQItems() { return items; }
41       
42    /// \brief Sets the delimitor mode
43    inline void SetDelimitorMode(bool dm) { delimitor_mode = dm;}
44
45    /// \brief Sets the Sequence Delimitation Item
46    inline void SetSequenceDelimitationItem(gdcmDocEntry * e) { seq_term = e;}
47        
48    void AddEntry(gdcmSQItem *it, int itemNumber);
49    gdcmSQItem *GetSQItemByOrdinalNumber(int itemNumber);
50
51    void SetDepthLevel(int depth);
52          
53 protected:
54
55 private:
56 // Variables
57
58    /// \brief If this Sequence is in delimitor mode (length =0xffffffff) or not
59    bool delimitor_mode;
60    
61    /// \brief Chained list of SQ Items
62    ListSQItem items;
63    
64    /// \brief sequence terminator item 
65    gdcmDocEntry *seq_term;
66 };
67
68 //-----------------------------------------------------------------------------
69 #endif
70