GDCM
2.2.0
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMNESTEDMODULEENTRIES_H 00015 #define GDCMNESTEDMODULEENTRIES_H 00016 00017 #include "gdcmModuleEntry.h" 00018 #include <vector> 00019 00020 namespace gdcm 00021 { 00027 class GDCM_EXPORT NestedModuleEntries : public ModuleEntry 00028 { 00029 public: 00030 NestedModuleEntries(const char *name = "", const char *type = "3", const char *description = ""):ModuleEntry(name,type,description) { } 00031 friend std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val); 00032 00033 typedef std::vector<ModuleEntry>::size_type SizeType; 00034 SizeType GetNumberOfModuleEntries() { return ModuleEntriesList.size(); } 00035 00036 const ModuleEntry &GetModuleEntry(SizeType idx) const { return ModuleEntriesList[idx]; } 00037 ModuleEntry &GetModuleEntry(SizeType 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