IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseInOutValueAttribute.h
1 // BaseInOutValueAttribute.h:
3 // --------------------------
4 //
14 
15 #ifndef __IPSDKBASEPROCESSING_BASEINOUTVALUEATTRIBUTE_H__
16 #define __IPSDKBASEPROCESSING_BASEINOUTVALUEATTRIBUTE_H__
17 
18 #include <IPSDKBaseProcessing/Attribute/Value/BaseValueAttribute.h>
19 
20 namespace ipsdk {
21 namespace processor {
22 
25 
26 template <typename T>
28 {
29  // declare serial class
31 
32  // declare in/out data
34 
35 // constructor and destructor
36 protected:
39 public:
41  virtual ~BaseInOutValueAttribute() = 0;
42 
43 // methods
44 public:
46  void init(const T& value)
47  {
48  this->initBase(value);
49  }
50 
54  const T& getValue() const
55  {
56  return this->accessValue();
57  }
58 
64  T getStorage() const
65  {
66  return this->accessValue();
67  }
68 
72  void setValue(const T& value)
73  {
74  this->accessValue() = value;
75  }
76 
77 // attributes
78 protected:
79 
80 };
81 
84 
85 } // end of namespace processor
86 } // end of namespace ipsdk
87 
88 #endif // __IPSDKBASEPROCESSING_BASEINOUTVALUEATTRIBUTE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
void setValue(const T &value)
set value associated to attribute
Definition: BaseInOutValueAttribute.h:72
const T & getValue() const
get value associated to attribute
Definition: BaseInOutValueAttribute.h:54
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
void init(const T &value)
initialize value associated to attribute
Definition: BaseInOutValueAttribute.h:46
#define IPSDK_DECLARE_INOUT_DATA()
macro allowing to declare an in/out data
Definition: DataStatusHdrMacros.h:120
Base class for in/out value attributes.
Definition: BaseInOutValueAttribute.h:27
Base class for value attributes.
Definition: BaseValueAttribute.h:33
T getStorage() const
access to storage associated to attribute
Definition: BaseInOutValueAttribute.h:64