OpenDaVINCI  4.15.3
Field.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_REFLECTION_FIELD_H_
21 #define OPENDAVINCI_CORE_REFLECTION_FIELD_H_
22 
24 
25 #include "opendavinci/GeneratedHeaders_OpenDaVINCI.h"
26 
27 namespace odcore {
28  namespace reflection {
29 
30  using namespace std;
31 
35  template<typename T>
37  public:
38  Field() : m_value() {}
39 
45  Field(T v) : m_value(v) {}
46 
52  Field(const Field<T> &obj) :
53  odcore::data::reflection::AbstractField(obj),
54  m_value(obj.m_value) {}
55 
56  virtual ~Field() {}
57 
64  Field& operator=(const Field<T> &obj) {
65  m_value = obj.getValue();
66  return *this;
67  }
68 
74  void setValue(const T &val) {
75  m_value = val;
76  }
77 
83  T getValue() const {
84  return m_value;
85  }
86 
87  private:
88  T m_value;
89  };
90 
91  }
92 } // odcore::reflection
93 
94 #endif /*OPENDAVINCI_CORE_REFLECTION_FIELD_H*/
virtual ~Field()
Definition: Field.h:56
Field()
Definition: Field.h:38
Field(const Field< T > &obj)
Definition: Field.h:52
T getValue() const
Definition: Field.h:83
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Field(T v)
Definition: Field.h:45
Field & operator=(const Field< T > &obj)
Definition: Field.h:64
void setValue(const T &val)
Definition: Field.h:74
Definition: Field.h:36