GDCM  2.2.0
gdcmNestedModuleEntries.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMNESTEDMODULEENTRIES_H
15 #define GDCMNESTEDMODULEENTRIES_H
16 
17 #include "gdcmModuleEntry.h"
18 #include <vector>
19 
20 namespace gdcm
21 {
28 {
29 public:
30  NestedModuleEntries(const char *name = "", const char *type = "3", const char *description = ""):ModuleEntry(name,type,description) { }
31  friend std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val);
32 
33  typedef std::vector<ModuleEntry>::size_type SizeType;
34  SizeType GetNumberOfModuleEntries() { return ModuleEntriesList.size(); }
35 
36  const ModuleEntry &GetModuleEntry(SizeType idx) const { return ModuleEntriesList[idx]; }
37  ModuleEntry &GetModuleEntry(SizeType idx) { return ModuleEntriesList[idx]; }
38 
39  void AddModuleEntry(const ModuleEntry &me) { ModuleEntriesList.push_back( me ); }
40 
41 private:
42  std::vector<ModuleEntry> ModuleEntriesList;
43 };
44 //-----------------------------------------------------------------------------
45 inline std::ostream& operator<<(std::ostream& _os, const NestedModuleEntries &_val)
46 {
47  _os << "Nested:" << _val.Name << "\t" << _val.DataElementType << "\t" << _val.DescriptionField;
48  return _os;
49 }
50 
52 
53 
54 } // end namespace gdcm
55 
56 #endif //GDCMNESTEDMODULEENTRIES_H

Generated on Wed Jun 13 2012 20:40:37 for GDCM by doxygen 1.8.1
SourceForge.net Logo