IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PlanIndexedAttributeHdrMacros.h
Go to the documentation of this file.
1 // PlanIndexedAttributeHdrMacros.h:
3 // --------------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_PLANINDEXEDATTRIBUTEHDRMACROS_H__
17 #define __IPSDKIMAGEPROCESSING_PLANINDEXEDATTRIBUTEHDRMACROS_H__
18 
20 #include <IPSDKImageProcessing/Attribute/PlanIndexed/BasePlanIndexedAttribute.h>
22 
25 
28 #define IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
29  IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className) \
30  IPSDK_DECLARE_TOOLTIP() \
31  IPSDK_DECLARE_ATTRIBUTE_BASE_BODY(libraryName, className, RuleString) \
32 public: \
33  typedef collType ValueType; \
34  typedef boost::shared_ptr<ValueType> MutableStorageType; \
35  typedef boost::shared_ptr<const ValueType> ConstStorageType; \
36  typedef collType::ValueType PlanValueType; \
37  typedef collType::StorageType PlanStorageType; \
38  typedef collType::ConstStorageType PlanConstStorageType; \
39 protected: \
40  className(); \
41 public: \
42  ~className(); \
43  const ValueType& getColl() const { \
44  return static_cast<const ValueType&>(*accessStorage()); \
45  } \
46  ConstStorageType getStorage() const { \
47  return boost::static_pointer_cast<const ValueType>(accessStorage()); \
48  } \
49  const PlanValueType& getPlanValue(const ipsdk::PlanIndex& planIndex) const; \
50  const PlanValueType& getPlanValue(const ipsdk::ipUInt64 zPlanIdx, const ipsdk::ipUInt64 cPlanIdx, \
51  const ipsdk::ipUInt64 tPlanIdx) const; \
52  PlanConstStorageType getPlanStorage(const ipsdk::PlanIndex& planIndex) const; \
53  PlanConstStorageType getPlanStorage(const ipsdk::ipUInt64 zPlanIdx, \
54  const ipsdk::ipUInt64 cPlanIdx, \
55  const ipsdk::ipUInt64 tPlanIdx) const; \
56  void insert(const ipsdk::PlanIndex& planIndex, const PlanStorageType& pObject); \
57  void insert(const ipsdk::ipUInt64 zPlanIdx, const ipsdk::ipUInt64 cPlanIdx, \
58  const ipsdk::ipUInt64 tPlanIdx, const PlanStorageType& pObject);
59 
61 // Mandatory attributes
63 
66 #define IPSDK_DECLARE_INPUT_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
67 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
68  IPSDK_DECLARE_INPUT_DATA(); \
69  IPSDK_DECLARE_MANDATORY_DATA(); \
70  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
71 public: \
72  typedef ConstStorageType StorageType; \
73  typedef ipsdk::PlanIndexedCollConstPtr BaseStorageType; \
74  void init(const StorageType& pPlanIndexedColl); \
75 };
76 
77 
80 #define IPSDK_DECLARE_INOUT_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
81 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
82  IPSDK_DECLARE_INOUT_DATA(); \
83  IPSDK_DECLARE_MANDATORY_DATA(); \
84  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
85 public: \
86  typedef MutableStorageType StorageType; \
87  typedef ipsdk::PlanIndexedCollPtr BaseStorageType; \
88  void init(const StorageType& pPlanIndexedColl); \
89  StorageType getStorage() { \
90  return boost::static_pointer_cast<ValueType>(accessStorage()); \
91  } \
92 };
93 
96 #define IPSDK_DECLARE_OUTPUT_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
97 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
98  IPSDK_DECLARE_OUTPUT_DATA(); \
99  IPSDK_DECLARE_MANDATORY_DATA(); \
100  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
101 public: \
102  typedef MutableStorageType StorageType; \
103  typedef ipsdk::PlanIndexedCollPtr BaseStorageType; \
104  void init(const StorageType& pPlanIndexedColl); \
105  StorageType getStorage() { \
106  return boost::static_pointer_cast<ValueType>(accessStorage()); \
107  } \
108 };
109 
111 // Optional attributes
113 
116 #define IPSDK_DECLARE_INPUT_OPTIONAL_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
117 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
118  IPSDK_DECLARE_INPUT_DATA(); \
119  IPSDK_DECLARE_OPTIONAL_DATA(); \
120  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
121 public: \
122  typedef ConstStorageType StorageType; \
123  typedef ipsdk::PlanIndexedCollConstPtr BaseStorageType; \
124  void init(const StorageType& pPlanIndexedColl); \
125 };
126 
129 #define IPSDK_DECLARE_INOUT_OPTIONAL_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
130 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
131  IPSDK_DECLARE_INOUT_DATA(); \
132  IPSDK_DECLARE_OPTIONAL_DATA(); \
133  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
134 public: \
135  typedef MutableStorageType StorageType; \
136  typedef ipsdk::PlanIndexedCollPtr BaseStorageType; \
137  void init(const StorageType& pPlanIndexedColl); \
138  StorageType getStorage() { \
139  return boost::static_pointer_cast<ValueType>(accessStorage()); \
140  } \
141 };
142 
145 #define IPSDK_DECLARE_OUTPUT_OPTIONAL_PLANINDEXED_ATTRIBUTE(libraryName, className, collType, RuleString) \
146 class IPSDK_LIB_API(libraryName) className : public ipsdk::imaproc::BasePlanIndexedAttribute { \
147  IPSDK_DECLARE_OUTPUT_DATA(); \
148  IPSDK_DECLARE_OPTIONAL_DATA(); \
149  IPSDK_DECLARE_PLANINDEXED_ATTRIBUTE_BODY(libraryName, className, collType, RuleString) \
150 public: \
151  typedef MutableStorageType StorageType; \
152  typedef ipsdk::PlanIndexedCollPtr BaseStorageType; \
153  void init(const StorageType& pPlanIndexedColl); \
154  StorageType getStorage() { \
155  return boost::static_pointer_cast<ValueType>(accessStorage()); \
156  } \
157 };
158 
161 
162 #endif // __IPSDKIMAGEPROCESSING_PLANINDEXEDATTRIBUTEHDRMACROS_H__
Operators used to enable rules on plan indexed attributes.
Header part of macros set for attribute class declaration.