6 #ifndef KNOWROB_PY_CONVERTER_LIST_H
7 #define KNOWROB_PY_CONVERTER_LIST_H
9 #include <boost/python.hpp>
11 #include "knowrob/DataSource.h"
18 static PyObject*
convert(
const std::list<T>& list)
20 boost::python::list result;
21 for(
const auto& elem : list)
23 result.append(boost::python::object(elem));
25 return boost::python::incref(result.ptr());
30 boost::python::to_python_converter<std::list<std::shared_ptr<knowrob::DataSource>>, list_to_pylist<std::shared_ptr<knowrob::DataSource>>>();
void register_list_converter()
static PyObject * convert(const std::list< T > &list)