15 #ifndef __IPSDKBASEPROCESSING_ATTRIBUTESRCMACROS_H__ 16 #define __IPSDKBASEPROCESSING_ATTRIBUTESRCMACROS_H__ 20 #include <IPSDKBaseProcessing/Attribute/Base/AttributeFactory.h> 21 #include <boost/make_shared.hpp> 28 #define IPSDK_IMPLEMENT_ATTRIBUTE_BASE_BODY(className, eMsgEnum) \ 29 ipsdk::processor::AttributePtr className::createBaseAttribute() { \ 30 return boost::make_shared<className>(); \ 32 boost::shared_ptr<className> className::createAttribute() { \ 33 return boost::make_shared<className>(); \ 35 ipsdk::processor::RulePtr className::createRule(const ipsdk::processor::AttributePtr& pBaseThis) const \ 37 boost::shared_ptr<className> pThis = \ 38 boost::static_pointer_cast<className,ipsdk::processor::BaseAttribute>(pBaseThis); \ 39 return className::createRule(pThis); \ 42 namespace processor { \ 43 template <typename T> \ 44 struct AttributeRegistrator; \ 46 struct AttributeRegistrator<className> { \ 47 AttributeRegistrator() \ 49 MessageMapRegistrator<eMsgEnum>::process(); \ 50 AttributeFactory& factory = AttributeFactory::getInstance(); \ 51 factory.registerAttribute<className>(); \ 53 ~AttributeRegistrator() \ 55 AttributeFactory& factory = AttributeFactory::getInstance(); \ 56 factory.unRegisterAttribute<className>(); \ 58 static AttributeRegistrator<className> g_bAttributeRegistrator; \ 60 AttributeRegistrator<className> AttributeRegistrator<className>::g_bAttributeRegistrator; \ 67 #endif // __IPSDKBASEPROCESSING_ATTRIBUTESRCMACROS_H__ Source part of macros set for ToolTip class declaration.
Source part of macros set for class serialization.