GDCM
3.0.24
Source
InformationObjectDefinition
gdcmTable.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 GDCMTABLE_H
15
#define GDCMTABLE_H
16
17
#include "
gdcmTableEntry.h
"
18
#include "
gdcmTag.h
"
19
20
#include <map>
21
22
namespace
gdcm
23
{
24
28
class
Table
29
{
30
public
:
31
typedef
std::map<Tag, TableEntry>
MapTableEntry
;
32
Table
() =
default
;
33
~Table
() =
default
;
34
Table
&
operator=
(
const
Table
&_val) =
delete
;
35
Table
(
const
Table
&_val) =
delete
;
36
37
friend
std::ostream&
operator<<
(std::ostream& _os,
const
Table
&_val);
38
39
void
InsertEntry
(
Tag
const
&tag,
TableEntry
const
&te)
40
{
41
#ifndef NDEBUG
42
MapTableEntry::size_type s =
TableInternal
.size();
43
#endif
44
TableInternal
.insert(
45
MapTableEntry::value_type(tag, te));
46
assert( s <
TableInternal
.size() );
47
}
48
49
const
TableEntry
&
GetTableEntry
(
const
Tag
&tag)
const
50
{
51
MapTableEntry::const_iterator it =
52
TableInternal
.find(tag);
53
if
(it ==
TableInternal
.end())
54
{
55
assert( 0 &&
"Impossible"
);
56
return
GetTableEntry
(
Tag
(0,0));
57
}
58
return
it->second;
59
}
60
61
MapTableEntry
TableInternal
;
62
};
63
64
}
// end namespace gdcm
65
66
#endif
//GDCMTABLE_H
gdcm::TableEntry
TableEntry.
Definition
gdcmTableEntry.h:28
gdcm::Table
Table.
Definition
gdcmTable.h:29
gdcm::Table::~Table
~Table()=default
gdcm::Table::InsertEntry
void InsertEntry(Tag const &tag, TableEntry const &te)
Definition
gdcmTable.h:39
gdcm::Table::operator=
Table & operator=(const Table &_val)=delete
gdcm::Table::Table
Table()=default
gdcm::Table::GetTableEntry
const TableEntry & GetTableEntry(const Tag &tag) const
Definition
gdcmTable.h:49
gdcm::Table::Table
Table(const Table &_val)=delete
gdcm::Table::operator<<
friend std::ostream & operator<<(std::ostream &_os, const Table &_val)
gdcm::Table::MapTableEntry
std::map< Tag, TableEntry > MapTableEntry
Definition
gdcmTable.h:31
gdcm::Table::TableInternal
MapTableEntry TableInternal
Definition
gdcmTable.h:61
gdcm::Tag
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition
gdcmTag.h:39
gdcmTableEntry.h
gdcmTag.h
gdcm
Definition
gdcmASN1.h:21
Generated by
1.9.8