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

gdcmSQItem.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmSQItem.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/07 08:48:18 $
00007   Version:   $Revision: 1.41 $
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 #ifndef GDCMSQITEM_H
00019 #define GDCMSQITEM_H
00020 
00021 #include "gdcmDocEntrySet.h"
00022 #include "gdcmElementSet.h"
00023 
00024 #include <list>
00025 #include <fstream>
00026 
00027 namespace gdcm 
00028 {
00029 class DocEntry;
00030 
00031 //-----------------------------------------------------------------------------
00032 typedef std::list<DocEntry *> ListDocEntry;
00033 
00034 //-----------------------------------------------------------------------------
00041 class GDCM_EXPORT SQItem : public DocEntrySet 
00042 {
00043 public:
00044    SQItem(int depthLevel);
00045    ~SQItem();
00046 
00047    virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" ); 
00048    void WriteContent(std::ofstream *fp, FileType filetype);
00049 
00050    bool AddEntry(DocEntry *Entry); // add to the List
00051    bool RemoveEntry(DocEntry *EntryToRemove);
00052    bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
00053    void ClearEntry();
00054   
00055    DocEntry *GetFirstEntry();
00056    DocEntry *GetNextEntry();
00057 
00058    DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
00059 
00060    bool IsEmpty() { return DocEntries.empty(); };
00061 
00063    int GetSQItemNumber() { return SQItemNumber; };
00065    void SetSQItemNumber(int itemNumber) { SQItemNumber = itemNumber; };
00066 
00068    int GetDepthLevel() { return SQDepthLevel; }                                                                             
00069 
00071    void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00072 
00074    void SetBaseTagKey( BaseTagKey const &key ) { BaseTagKeyNested = key; }
00075 
00077    BaseTagKey const &GetBaseTagKey() const { return BaseTagKeyNested; }
00078 
00079 protected:
00080 // Variables that need to be accessed in subclasses
00082    ListDocEntry DocEntries;
00084    ListDocEntry::iterator ItDocEntries;
00086    ListDocEntry::iterator ItValEntries;
00087   
00088 private:
00094    int SQDepthLevel;
00095 
00098    BaseTagKey BaseTagKeyNested;
00099 
00101    int SQItemNumber;
00102 };
00103 } // end namespace gdcm
00104 //-----------------------------------------------------------------------------
00105 #endif

Generated on Thu Feb 10 22:18:00 2005 for gdcm by doxygen 1.3.6