IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseValueAttribute.h
1 // BaseValueAttribute.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKBASEPROCESSING_BASEVALUEATTRIBUTE_H__
16 #define __IPSDKBASEPROCESSING_BASEVALUEATTRIBUTE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::processor::BaseValueAttribute<T>::_value' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'ipsdk::processor::BaseValueAttribute<T>'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKBaseProcessing/Attribute/Base/BaseAttribute.h>
25 
26 namespace ipsdk {
27 namespace processor {
28 
31 
32 template <typename T>
34 {
35  // declare dynamic serializable class
37 
38 // predefined public types
39 public:
41  typedef T ValueType;
42 
44  typedef T StorageType;
45 
47  static const eAttributeType::domain g_attributeType = eAttributeType::eAT_Value;
48 
49 // constructor and destructor
50 protected:
53 public:
55  virtual ~BaseValueAttribute() = 0;
56 
57 // methods
58 public:
60  eAttributeType getAttributeType() const;
61 
65  virtual const T& getValue() const = 0;
66 
67 protected:
69  void initBase(const T& value);
70 
74  const T& accessValue() const;
75  T& accessValue();
77 
78 // attributes
79 private:
81  T _value;
82 };
83 
86 
87 } // end of namespace processor
88 } // end of namespace ipsdk
89 
90 #pragma warning (pop)
91 
92 #endif // __IPSDKBASEPROCESSING_BASEVALUEATTRIBUTE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
#define IPSDKBASEPROCESSING_API
Import/Export macro for library IPSDKBaseProcessing.
Definition: IPSDKBaseProcessingExports.h:27
T StorageType
storage type associated to object
Definition: BaseValueAttribute.h:44
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
Header part of macros set for class serialization.
Base class for processing attributes.
Definition: BaseAttribute.h:43
Base class for value attributes.
Definition: BaseValueAttribute.h:33
T ValueType
value type associated to object
Definition: BaseValueAttribute.h:41
Attribute associated to simple value.
Definition: AttributeTypes.h:38
eAttributeType
Enumerate describing attributes type.
Definition: AttributeTypes.h:36