knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::py::python_optional< T >::conversion Struct Reference

#include <optional.h>

Inheritance diagram for knowrob::py::python_optional< T >::conversion:
Collaboration diagram for knowrob::py::python_optional< T >::conversion:

Static Public Member Functions

static PyObject * convert (std::optional< T > const &value)
 
static PyObject * convert (std::optional< T > const &value)
 

Detailed Description

template<typename T>
struct knowrob::py::python_optional< T >::conversion

Definition at line 16 of file optional.h.

Member Function Documentation

◆ convert() [1/2]

template<typename T >
static PyObject* knowrob::py::python_optional< T >::conversion::convert ( std::optional< T > const &  value)
inlinestatic

Definition at line 17 of file optional.h.

17  {
18  using namespace boost::python;
19  return incref((value ? object(*value) : object()).ptr());
20  }

◆ convert() [2/2]

template<typename T >
static PyObject* knowrob::py::python_optional< T >::conversion::convert ( std::optional< T > const &  value)
inlinestatic

Definition at line 17 of file optional.h.

17  {
18  using namespace boost::python;
19  return incref((value ? object(*value) : object()).ptr());
20  }

The documentation for this struct was generated from the following file: