gdcmNestedModuleEntries.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004   Module:  $URL$
00005 
00006   Copyright (c) 2006-2010 Mathieu Malaterre
00007   All rights reserved.
00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 #ifndef GDCMNESTEDMODULEENTRIES_H
00016 #define GDCMNESTEDMODULEENTRIES_H
00017 
00018 #include "gdcmModuleEntry.h"
00019 #include <vector>
00020 
00021 namespace gdcm
00022 {
00028 class GDCM_EXPORT NestedModuleEntries : public ModuleEntry
00029 {
00030 public:
00031   NestedModuleEntries(const char *name = "", const char *type = "3", const char *description = ""):ModuleEntry(name,type,description) { }
00032   friend std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val);
00033 
00034   unsigned int GetNumberOfModuleEntries() { return ModuleEntriesList.size(); }
00035 
00036   const ModuleEntry &GetModuleEntry(unsigned int idx) const { return ModuleEntriesList[idx]; }
00037   ModuleEntry &GetModuleEntry(unsigned int idx) { return ModuleEntriesList[idx]; }
00038 
00039   void AddModuleEntry(const ModuleEntry &me) { ModuleEntriesList.push_back( me ); }
00040 
00041 private:
00042   std::vector<ModuleEntry> ModuleEntriesList;
00043 };
00044 //-----------------------------------------------------------------------------
00045 inline std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val)
00046 {
00047   _os << "Nested:" << _val.Name << "\t" << _val.DataElementType << "\t" << _val.DescriptionField;
00048   return _os;
00049 }
00050 
00051 typedef NestedModuleEntries NestedMacroEntries;
00052 
00053 
00054 } // end namespace gdcm
00055 
00056 #endif //GDCMNESTEDMODULEENTRIES_H

Generated on Sat Dec 4 2010 08:58:44 for GDCM by doxygen 1.7.2
SourceForge.net Logo