IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ValueAttributeHdrMacros.h
Go to the documentation of this file.
1 // ValueAttributeHdrMacros.h:
3 // --------------------------
4 //
14 
15 #ifndef __IPSDKBASEPROCESSING_VALUEATTRIBUTEHDRMACROS_H__
16 #define __IPSDKBASEPROCESSING_VALUEATTRIBUTEHDRMACROS_H__
17 
19 #include <IPSDKBaseProcessing/Attribute/Value/InOut/BaseInOutMandatoryValueAttribute.h>
20 #include <IPSDKBaseProcessing/Attribute/Value/InOut/BaseInOutOptionalValueAttribute.h>
21 #include <IPSDKBaseProcessing/Attribute/Value/Input/BaseInputMandatoryValueAttribute.h>
22 #include <IPSDKBaseProcessing/Attribute/Value/Input/BaseInputOptionalValueAttribute.h>
23 #include <IPSDKBaseProcessing/Attribute/Value/Output/BaseOutputMandatoryValueAttribute.h>
24 #include <IPSDKBaseProcessing/Attribute/Value/Output/BaseOutputOptionalValueAttribute.h>
26 #include <boost/smart_ptr/make_shared_object.hpp>
27 
30 
33 #define IPSDK_DECLARE_VALUE_ATTRIBUTE_BODY(libraryName, className, baseClassName, RuleString) \
34  IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className) \
35  IPSDK_DECLARE_TOOLTIP() \
36  IPSDK_DECLARE_ATTRIBUTE_BASE_BODY(libraryName, className, RuleString) \
37 public: \
38  typedef baseClassName BaseValueAttributeClassType; \
39 protected: \
40  className(); \
41 public: \
42  ~className();
43 
44 
47 #define IPSDK_DECLARE_VALUE_ATTRIBUTE(libraryName, className, baseClassName, RuleString) \
48 class IPSDK_LIB_API(libraryName) className : public baseClassName { \
49  IPSDK_DECLARE_VALUE_ATTRIBUTE_BODY(libraryName, className, baseClassName, RuleString) \
50 };
51 
55 #define IPSDK_DECLARE_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, baseClassName, \
56  RuleString, defaultValue) \
57 class IPSDK_LIB_API(libraryName) className : public baseClassName { \
58  IPSDK_DECLARE_VALUE_ATTRIBUTE_BODY(libraryName, className, baseClassName, RuleString) \
59 public: \
60  static inline ValueType retrieveDefaultValue() \
61  { \
62  return defaultValue; \
63  } \
64 };
65 
67 // Mandatory attributes
69 
73 #define IPSDK_DECLARE_INPUT_VALUE_ATTRIBUTE(libraryName, className, type, \
74  RuleString) \
75  IPSDK_DECLARE_VALUE_ATTRIBUTE(libraryName, className, \
76  ipsdk::processor::BaseInputMandatoryValueAttribute<type>, \
77  RuleString)
78 
82 #define IPSDK_DECLARE_INOUT_VALUE_ATTRIBUTE(libraryName, className, type, \
83  RuleString) \
84  IPSDK_DECLARE_VALUE_ATTRIBUTE(libraryName, className, \
85  ipsdk::processor::BaseInOutMandatoryValueAttribute<type>, \
86  RuleString)
87 
91 #define IPSDK_DECLARE_OUTPUT_VALUE_ATTRIBUTE(libraryName, className, type, \
92  RuleString) \
93  IPSDK_DECLARE_VALUE_ATTRIBUTE(libraryName, className, \
94  ipsdk::processor::BaseOutputMandatoryValueAttribute<type>, \
95  RuleString)
96 
98 // Optional attributes
100 
104 #define IPSDK_DECLARE_INPUT_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, type, \
105  RuleString, defaultValue) \
106  IPSDK_DECLARE_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, \
107  ipsdk::processor::BaseInputOptionalValueAttribute<type>, \
108  RuleString, defaultValue)
109 
113 #define IPSDK_DECLARE_INOUT_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, type, \
114  RuleString, defaultValue) \
115  IPSDK_DECLARE_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, \
116  ipsdk::processor::BaseInOutOptionalValueAttribute<type>, \
117  RuleString, defaultValue)
118 
122 #define IPSDK_DECLARE_OUTPUT_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, type, \
123  RuleString, defaultValue) \
124  IPSDK_DECLARE_OPTIONAL_VALUE_ATTRIBUTE(libraryName, className, \
125  ipsdk::processor::BaseOutputOptionalValueAttribute<type>, \
126  RuleString, defaultValue)
127 
130 
131 #endif // __IPSDKBASEPROCESSING_VALUEATTRIBUTEHDRMACROS_H__
Predefined operators for rules on value attributes.
Header part of macros set for attribute class declaration.