GDCM 2.0.17
|
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 typedef std::vector<ModuleEntry>::size_type SizeType; 00035 SizeType GetNumberOfModuleEntries() { return ModuleEntriesList.size(); } 00036 00037 const ModuleEntry &GetModuleEntry(SizeType idx) const { return ModuleEntriesList[idx]; } 00038 ModuleEntry &GetModuleEntry(SizeType idx) { return ModuleEntriesList[idx]; } 00039 00040 void AddModuleEntry(const ModuleEntry &me) { ModuleEntriesList.push_back( me ); } 00041 00042 private: 00043 std::vector<ModuleEntry> ModuleEntriesList; 00044 }; 00045 //----------------------------------------------------------------------------- 00046 inline std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val) 00047 { 00048 _os << "Nested:" << _val.Name << "\t" << _val.DataElementType << "\t" << _val.DescriptionField; 00049 return _os; 00050 } 00051 00052 typedef NestedModuleEntries NestedMacroEntries; 00053 00054 00055 } // end namespace gdcm 00056 00057 #endif //GDCMNESTEDMODULEENTRIES_H