GDCM  2.2.6
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 
23 namespace gdcm
24 {
30 {
31 public:
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 
50 protected:
51  std::string NameField;
52  std::string ValueField;
53 };
54 //-----------------------------------------------------------------------------
55 inline 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
void SetName(const char *name)
Definition: gdcmPDBElement.h:38
std::string ValueField
Definition: gdcmPDBElement.h:52
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
const char * GetName() const
Set/Get Name.
Definition: gdcmPDBElement.h:37
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:92
Class to represent a PDB Element.
Definition: gdcmPDBElement.h:29
const char * GetValue() const
Set/Get Value.
Definition: gdcmPDBElement.h:41
void SetValue(const char *value)
Definition: gdcmPDBElement.h:42
PDBElement()
Definition: gdcmPDBElement.h:32
std::string NameField
Definition: gdcmPDBElement.h:51
bool operator==(const PDBElement &de) const
Definition: gdcmPDBElement.h:44

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo