GDCM: gdcmNestedModuleEntries.h Source File

GDCM 3.0.25

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
20namespace gdcm
21{
27 class GDCM_EXPORT NestedModuleEntries : public ModuleEntry
28{
29public:
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
41private:
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
gdcm::ModuleEntry::Name
std::string Name
Definition gdcmModuleEntry.h:56
gdcm::ModuleEntry::DataElementType
Type DataElementType
Definition gdcmModuleEntry.h:60
gdcm::ModuleEntry::DescriptionField
Description DescriptionField
Definition gdcmModuleEntry.h:63
gdcm::ModuleEntry::ModuleEntry
ModuleEntry(const char *name="", const char *type="3", const char *description="")
Definition gdcmModuleEntry.h:32
gdcm::NestedModuleEntries
Class for representing a NestedModuleEntries.
Definition gdcmNestedModuleEntries.h:28
gdcm::NestedModuleEntries::NestedModuleEntries
NestedModuleEntries(const char *name="", const char *type="3", const char *description="")
Definition gdcmNestedModuleEntries.h:30
gdcm::NestedModuleEntries::GetModuleEntry
const ModuleEntry & GetModuleEntry(SizeType idx) const
Definition gdcmNestedModuleEntries.h:36
gdcm::NestedModuleEntries::GetModuleEntry
ModuleEntry & GetModuleEntry(SizeType idx)
Definition gdcmNestedModuleEntries.h:37
gdcm::NestedModuleEntries::AddModuleEntry
void AddModuleEntry(const ModuleEntry &me)
Definition gdcmNestedModuleEntries.h:39
gdcm::NestedModuleEntries::GetNumberOfModuleEntries
SizeType GetNumberOfModuleEntries()
Definition gdcmNestedModuleEntries.h:34
gdcm::NestedModuleEntries::SizeType
std::vector< ModuleEntry >::size_type SizeType
Definition gdcmNestedModuleEntries.h:33
gdcmModuleEntry.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::NestedMacroEntries
NestedModuleEntries NestedMacroEntries
Definition gdcmNestedModuleEntries.h:51
gdcm::operator<<
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88