Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmSeqEntry.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmSeqEntry.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/11/29 12:48:47 $
00007   Version:   $Revision: 1.39 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
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 // Variables
00083    bool DelimitorMode;
00084    
00086    ListSQItem Items;
00088    ListSQItem::iterator ItSQItem;
00089 
00091    DocEntry *SeqTerm;
00092 
00097    int SQDepthLevel;
00098 };
00099 } // end namespace gdcm
00100 //-----------------------------------------------------------------------------
00101 #endif
00102 

Generated on Fri Jan 20 10:14:26 2006 for gdcm by  doxygen 1.4.4