16 #ifndef __IPSDKBASEPROCESSING_DATAITEMATTRIBUTEHDRMACROS_H__ 17 #define __IPSDKBASEPROCESSING_DATAITEMATTRIBUTEHDRMACROS_H__ 20 #include <IPSDKBaseProcessing/Attribute/DataItem/InOut/BaseInOutMandatoryDataItemAttribute.h> 21 #include <IPSDKBaseProcessing/Attribute/DataItem/InOut/BaseInOutOptionalDataItemAttribute.h> 22 #include <IPSDKBaseProcessing/Attribute/DataItem/Input/BaseInputMandatoryDataItemAttribute.h> 23 #include <IPSDKBaseProcessing/Attribute/DataItem/Input/BaseInputOptionalDataItemAttribute.h> 24 #include <IPSDKBaseProcessing/Attribute/DataItem/Output/BaseOutputMandatoryDataItemAttribute.h> 25 #include <IPSDKBaseProcessing/Attribute/DataItem/Output/BaseOutputOptionalDataItemAttribute.h> 35 #define IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, baseClassName, \ 37 IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className) \ 38 IPSDK_DECLARE_TOOLTIP() \ 39 IPSDK_DECLARE_ATTRIBUTE_BASE_BODY(libraryName, className, RuleString) \ 41 typedef baseClassName BaseDataItemAttributeClassType; \ 46 const std::string& getNodeType() const; \ 47 static const std::string& getNodeTypeStr(); \ 48 void init(const ValueType& dataItemNode); \ 49 void init(const StorageType& pDataItemNode); 59 #define IPSDK_DECLARE_INPUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 60 dataItemClassName, RuleString) \ 61 class IPSDK_LIB_API(libraryName) className : \ 62 public ipsdk::processor::BaseInputMandatoryDataItemAttribute { \ 64 typedef dataItemClassName ValueType; \ 65 typedef dataItemClassName NodeType; \ 66 typedef boost::shared_ptr<const ValueType> StorageType; \ 67 StorageType getStorage() const \ 69 return boost::static_pointer_cast<const ValueType, \ 70 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 72 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 73 ipsdk::processor::BaseInputMandatoryDataItemAttribute, \ 75 const ValueType& getNode() const \ 77 return static_cast<const ValueType&>(getDataItemNode()); \ 79 static StorageType retrieveDefaultValue() { \ 80 return StorageType(); \ 87 #define IPSDK_DECLARE_INPUT_DATAITEM_ATTRIBUTE(libraryName, className, RuleString, childSeq) \ 88 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 89 IPSDK_DECLARE_INPUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 90 BOOST_PP_CAT(className, Node), RuleString) 100 #define IPSDK_DECLARE_INOUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 101 dataItemClassName, RuleString) \ 102 class IPSDK_LIB_API(libraryName) className : \ 103 public ipsdk::processor::BaseInOutMandatoryDataItemAttribute { \ 105 typedef dataItemClassName ValueType; \ 106 typedef dataItemClassName NodeType; \ 107 typedef boost::shared_ptr<ValueType> StorageType; \ 108 typedef boost::shared_ptr<const ValueType> ConstStorageType; \ 109 ConstStorageType getStorage() const \ 111 return boost::static_pointer_cast<const ValueType, \ 112 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 114 StorageType getStorage() \ 116 return boost::static_pointer_cast<ValueType, \ 117 ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 119 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 120 ipsdk::processor::BaseInOutMandatoryDataItemAttribute, \ 122 const ValueType& getNode() const \ 124 return static_cast<const ValueType&>(getDataItemNode()); \ 126 ValueType& getNode() \ 128 return static_cast<ValueType&>(getDataItemNode()); \ 130 static StorageType retrieveDefaultValue() { \ 131 return StorageType(); \ 138 #define IPSDK_DECLARE_INOUT_DATAITEM_ATTRIBUTE(libraryName, className, RuleString, childSeq) \ 139 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 140 IPSDK_DECLARE_INOUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 141 BOOST_PP_CAT(className, Node), RuleString) 151 #define IPSDK_DECLARE_OUTPUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 152 dataItemClassName, RuleString) \ 153 class IPSDK_LIB_API(libraryName) className : \ 154 public ipsdk::processor::BaseOutputMandatoryDataItemAttribute { \ 156 typedef dataItemClassName ValueType; \ 157 typedef dataItemClassName NodeType; \ 158 typedef boost::shared_ptr<ValueType> StorageType; \ 159 typedef boost::shared_ptr<const ValueType> ConstStorageType; \ 160 ConstStorageType getStorage() const \ 162 return boost::static_pointer_cast<const ValueType, \ 163 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 165 StorageType getStorage() \ 167 return boost::static_pointer_cast<ValueType, \ 168 ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 170 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 171 ipsdk::processor::BaseOutputMandatoryDataItemAttribute, \ 173 const ValueType& getNode() const \ 175 return static_cast<const ValueType&>(getDataItemNode()); \ 177 ValueType& getNode() \ 179 return static_cast<ValueType&>(getDataItemNode()); \ 181 static StorageType retrieveDefaultValue() { \ 182 return StorageType(); \ 189 #define IPSDK_DECLARE_OUTPUT_DATAITEM_ATTRIBUTE(libraryName, className, RuleString, childSeq) \ 190 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 191 IPSDK_DECLARE_OUTPUT_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 192 BOOST_PP_CAT(className, Node), RuleString) 203 #define IPSDK_DECLARE_INPUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 205 RuleString, defaultValue) \ 206 class IPSDK_LIB_API(libraryName) className : \ 207 public ipsdk::processor::BaseInputOptionalDataItemAttribute { \ 209 typedef dataItemClassName ValueType; \ 210 typedef dataItemClassName NodeType; \ 211 typedef boost::shared_ptr<const ValueType> StorageType; \ 212 StorageType getStorage() const \ 214 return boost::static_pointer_cast<const ValueType, \ 215 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 217 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 218 ipsdk::processor::BaseInputOptionalDataItemAttribute, \ 220 const ValueType& getNode() const \ 222 return static_cast<const ValueType&>(getDataItemNode()); \ 224 static StorageType retrieveDefaultValue() { \ 225 return defaultValue; \ 233 #define IPSDK_DECLARE_INPUT_OPTIONAL_DATAITEM_ATTRIBUTE(libraryName, className, \ 234 RuleString, childSeq, defaultValue) \ 235 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 236 IPSDK_DECLARE_INPUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 237 BOOST_PP_CAT(className, Node), \ 238 RuleString, defaultValue) 249 #define IPSDK_DECLARE_INOUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 251 RuleString, defaultValue) \ 252 class IPSDK_LIB_API(libraryName) className : \ 253 public ipsdk::processor::BaseInOutOptionalDataItemAttribute { \ 255 typedef dataItemClassName ValueType; \ 256 typedef dataItemClassName NodeType; \ 257 typedef boost::shared_ptr<ValueType> StorageType; \ 258 typedef boost::shared_ptr<const ValueType> ConstStorageType; \ 259 ConstStorageType getStorage() const \ 261 return boost::static_pointer_cast<const ValueType, \ 262 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 264 StorageType getStorage() \ 266 return boost::static_pointer_cast<ValueType, \ 267 ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 269 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 270 ipsdk::processor::BaseInOutOptionalDataItemAttribute, \ 272 const ValueType& getNode() const \ 274 return static_cast<const ValueType&>(getDataItemNode()); \ 276 ValueType& getNode() \ 278 return static_cast<ValueType&>(getDataItemNode()); \ 280 static StorageType retrieveDefaultValue() { \ 281 return defaultValue; \ 289 #define IPSDK_DECLARE_INOUT_OPTIONAL_DATAITEM_ATTRIBUTE(libraryName, className, \ 290 RuleString, childSeq, defaultValue) \ 291 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 292 IPSDK_DECLARE_INOUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 293 BOOST_PP_CAT(className, Node), \ 294 RuleString, defaultValue) 305 #define IPSDK_DECLARE_OUTPUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 307 RuleString, defaultValue) \ 308 class IPSDK_LIB_API(libraryName) className : \ 309 public ipsdk::processor::BaseOutputOptionalDataItemAttribute { \ 311 typedef dataItemClassName ValueType; \ 312 typedef dataItemClassName NodeType; \ 313 typedef boost::shared_ptr<ValueType> StorageType; \ 314 typedef boost::shared_ptr<const ValueType> ConstStorageType; \ 315 ConstStorageType getStorage() const \ 317 return boost::static_pointer_cast<const ValueType, \ 318 const ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 320 StorageType getStorage() \ 322 return boost::static_pointer_cast<ValueType, \ 323 ipsdk::BaseDataItemNode>(accessDataItemNodePtr()); \ 325 IPSDK_DECLARE_DATAITEM_ATTRIBUTE_BODY(libraryName, className, \ 326 ipsdk::processor::BaseOutputOptionalDataItemAttribute, \ 328 const ValueType& getNode() const \ 330 return static_cast<const ValueType&>(getDataItemNode()); \ 332 ValueType& getNode() \ 334 return static_cast<ValueType&>(getDataItemNode()); \ 336 static StorageType retrieveDefaultValue() { \ 337 return defaultValue; \ 345 #define IPSDK_DECLARE_OUTPUT_OPTIONAL_DATAITEM_ATTRIBUTE(libraryName, className, \ 346 RuleString, childSeq, defaultValue) \ 347 IPSDK_DECLARE_NODE_DATA(libraryName, BOOST_PP_CAT(className, Node), childSeq) }; \ 348 IPSDK_DECLARE_OUTPUT_OPTIONAL_FROM_EXISTING_DATAITEM_ATTRIBUTE(libraryName, className, \ 349 BOOST_PP_CAT(className, Node), \ 350 RuleString, defaultValue) 355 #endif // __IPSDKBASEPROCESSING_DATAITEMATTRIBUTEHDRMACROS_H__ Header part of data item node declaration macros.
Header part of macros set for attribute class declaration.
Predefined operators for rules on data item attributes.