test
Go to the documentation of this file. 1 #include <boost/python/class.hpp>
2 #include <boost/python/module.hpp>
3 #include <boost/python/def.hpp>
4 #include <boost/python/init.hpp>
5 #include <boost/python/list.hpp>
7 #define PPCAT_NX(A, B) A ## B
8 #define PPCAT(A, B) PPCAT_NX(A, B)
9 #define STRINGIZE_NX(A) #A
10 #define STRINGIZE(A) STRINGIZE_NX(A)
12 #define PAYLOAD_INSPECTOR_MODULE( PAYLOAD_TYPENAME ) BOOST_PYTHON_MODULE( plugin ## PAYLOAD_TYPENAME ## _PayloadInspector )
14 #define PAYLOAD_INSPECTOR_CLASS( CLASS_NAME ) using namespace boost::python; \
15 class_< CLASS_NAME >( STRINGIZE(PPCAT(plot_,CLASS_NAME)), init<>()) \
16 .def("objectType",&CLASS_NAME::objectType ) \
17 .def("title",&CLASS_NAME::title ) \
18 .def("info",&CLASS_NAME::info ) \
19 .def("data",&CLASS_NAME::data ) \
22 #define PAYLOAD_INSPECTOR_FUNCTION( FUNCTION_NAME ) using namespace boost::python; \
23 def (STRINGIZE(PPCAT(plot_,FUNCTION_NAME)), FUNCTION_NAME)