6 #ifndef KNOWROB_PY_CONVERTER_PAIR_H
7 #define KNOWROB_PY_CONVERTER_PAIR_H
9 #include <boost/python.hpp>
10 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
15 struct PairToTupleConverter {
17 convert(
const std::pair<std::basic_string_view<
char, std::char_traits<char> >
const, std::pair<std::shared_ptr<knowrob::Variable>, std::shared_ptr<knowrob::Term> > > &pair) {
18 return boost::python::incref(
19 boost::python::make_tuple(pair.first, pair.second.first, pair.second.second).ptr());
25 boost::python::to_python_converter<std::pair<std::basic_string_view<char, std::char_traits<char> >
const, std::pair<std::shared_ptr<knowrob::Variable>, std::shared_ptr<knowrob::Term> > >, PairToTupleConverter>();
void register_pair_converter()
static PyObject * convert(const std::pair< std::basic_string_view< char, std::char_traits< char > > const, std::pair< std::shared_ptr< knowrob::Variable >, std::shared_ptr< knowrob::Term > > > &pair)