1 #include <boost/python.hpp>
2 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
9 using namespace boost::python;
11 class_<What>(
"What",init<>());
18 template<
typename Wrapper>
20 using namespace boost::python;
21 typedef typename Wrapper::Extractor Extractor;
22 typedef typename Extractor::What What;
24 condPython::defineWhat<typename Extractor::Class>();
26 class_<Extractor>(
"Extractor", init<>())
28 .def(
"what",Extractor::what)
32 class_<Wrapper>(
"Object",init<>())
33 .def(init<cond::CondDB>())
40 .def(
"trend_plot",&Wrapper::trend_plot)
41 .def(
"summary_adv",&Wrapper::summary_adv)
42 .def(
"dumpFile", &Wrapper::dumpFile)
48 #define PYTHON_WRAPPER(_class,_name) \
49 namespace { typedef cond::PayLoadInspector< _class > PythonWrapper;} \
50 BOOST_PYTHON_MODULE(plugin ## _name ## PyInterface) { define<PythonWrapper>(); } \
51 namespace { const char * pluginName_="plugin" #_name "PyInterface"; }\
52 PYTHON_ID(PythonWrapper::Class, pluginName_, _name)
int extract(std::vector< int > *output, const std::string &dati)