GDCM 3.0.24
gdcmPDBElement.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 GDCMPDBELEMENT_H
15#define GDCMPDBELEMENT_H
16
17#include "gdcmTag.h"
18#include "gdcmVM.h"
19#include "gdcmVR.h"
20#include "gdcmByteValue.h"
21#include "gdcmSmartPointer.h"
22
23namespace gdcm
24{
30{
31public:
32 PDBElement() = default;
33
34 friend std::ostream& operator<<(std::ostream &os, const PDBElement &val);
35
37 const char *GetName() const { return NameField.c_str(); }
38 void SetName(const char *name) { NameField = name; }
39
41 const char *GetValue() const { return ValueField.c_str(); }
42 void SetValue(const char *value) { ValueField = value; }
43
44 bool operator==(const PDBElement &de) const
45 {
46 return ValueField == de.ValueField
47 && NameField == de.NameField;
48 }
49
50protected:
51 std::string NameField;
52 std::string ValueField;
53};
54//-----------------------------------------------------------------------------
55inline std::ostream& operator<<(std::ostream &os, const PDBElement &val)
56{
57 os << val.NameField;
58 os << " \"";
59 os << val.ValueField;
60 os << "\"";
61
62 return os;
63}
64
65} // end namespace gdcm
66
67#endif //GDCMPDBELEMENT_H
Class to represent a PDB Element.
Definition gdcmPDBElement.h:30
void SetValue(const char *value)
Definition gdcmPDBElement.h:42
bool operator==(const PDBElement &de) const
Definition gdcmPDBElement.h:44
const char * GetValue() const
Set/Get Value.
Definition gdcmPDBElement.h:41
std::string NameField
Definition gdcmPDBElement.h:51
void SetName(const char *name)
Definition gdcmPDBElement.h:38
const char * GetName() const
Set/Get Name.
Definition gdcmPDBElement.h:37
PDBElement()=default
std::string ValueField
Definition gdcmPDBElement.h:52
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88