38 #include <boost/shared_ptr.hpp>
40 #define WF_NORMALIZER_RESOURCE(RESOURCECLASS)\
41 struct macro__WF_NORMALIZER_RESOURCE__ ## RESOURCECLASS\
43 static const boost::shared_ptr<RESOURCECLASS>& get()\
45 static boost::shared_ptr<RESOURCECLASS> rt;\
48 rt.reset( new RESOURCECLASS());\
54 #define WF_NORMALIZER(NAME,NORMALIZERCLASS)\
59 static _Wolframe::types::NormalizeFunction* create( _Wolframe::types::NormalizeResourceHandle*, const std::vector<_Wolframe::types::Variant>& arg)\
61 return new NORMALIZERCLASS( arg);\
63 static _Wolframe::module::BuilderBase* impl()\
65 return new _Wolframe::module::NormalizeFunctionBuilder( "NormalizeFunction_" #NAME, NAME, create);\
68 (*this)(&Constructor ::impl);\
72 #define WF_NORMALIZER_WITH_RESOURCE(NAME,NORMALIZERCLASS,RESOURCECLASS)\
76 static _Wolframe::types::NormalizeFunction* create( _Wolframe::types::NormalizeResourceHandle* reshnd, const std::vector<_Wolframe::types::Variant>& arg)\
78 return new NORMALIZERCLASS( reshnd, arg);\
80 static _Wolframe::module::BuilderBase* impl()\
82 return new _Wolframe::module::NormalizeFunctionBuilder( "NormalizeFunction_" #NAME, NAME, create, macro__WF_NORMALIZER_RESOURCE__ ## RESOURCECLASS::get());\
85 (*this)(&Constructor ::impl);\
Normalize function definition.
Interface template for object builder of normalize functions from a description.