knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::py::PyObj_wrap Class Reference

#include <utils.h>

Public Member Functions

 PyObj_wrap (boost::python::object self)
 
 ~PyObj_wrap ()
 
void operator() ()
 
 PyObj_wrap (boost::python::object self)
 
 ~PyObj_wrap ()
 
void operator() ()
 

Protected Attributes

boost::python::object self_
 

Detailed Description

A wrapper class to call a Python object.

Definition at line 49 of file utils.h.

Constructor & Destructor Documentation

◆ PyObj_wrap() [1/2]

knowrob::py::PyObj_wrap::PyObj_wrap ( boost::python::object  self)
inlineexplicit

Definition at line 51 of file utils.h.

52  : self_(std::move(self)) {}
boost::python::object self_
Definition: utils.h:65

◆ ~PyObj_wrap() [1/2]

knowrob::py::PyObj_wrap::~PyObj_wrap ( )
inline

Definition at line 54 of file utils.h.

54  {
55  gil_lock _lock;
56  self_ = boost::python::object();
57  }

◆ PyObj_wrap() [2/2]

knowrob::py::PyObj_wrap::PyObj_wrap ( boost::python::object  self)
inlineexplicit

Definition at line 51 of file utils.h.

52  : self_(std::move(self)) {}

◆ ~PyObj_wrap() [2/2]

knowrob::py::PyObj_wrap::~PyObj_wrap ( )
inline

Definition at line 54 of file utils.h.

54  {
55  gil_lock _lock;
56  self_ = boost::python::object();
57  }

Member Function Documentation

◆ operator()() [1/2]

void knowrob::py::PyObj_wrap::operator() ( )
inline

Definition at line 59 of file utils.h.

59  {
60  gil_lock _lock;
61  self_();
62  }

◆ operator()() [2/2]

void knowrob::py::PyObj_wrap::operator() ( )
inline

Definition at line 59 of file utils.h.

59  {
60  gil_lock _lock;
61  self_();
62  }

Member Data Documentation

◆ self_

boost::python::object knowrob::py::PyObj_wrap::self_
protected

Definition at line 65 of file utils.h.


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