GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

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 {
27 class GDCM_EXPORT NestedModuleEntries : public ModuleEntry
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
51 typedef NestedModuleEntries NestedMacroEntries;
52
53
54 } // end namespace gdcm
55
56 #endif //GDCMNESTEDMODULEENTRIES_H