Mantid
Loading...
Searching...
No Matches
Functions
Mantid::PythonInterface::detail Namespace Reference

Functions

template<typename ReturnType , typename... Args>
ReturnType callMethodImpl (PyObject *obj, const char *methodName, const Args &...args)
 Wrapper around boost::python::call_method. More...
 

Function Documentation

◆ callMethodImpl()

template<typename ReturnType , typename... Args>
ReturnType Mantid::PythonInterface::detail::callMethodImpl ( PyObject *  obj,
const char *  methodName,
const Args &...  args 
)

Wrapper around boost::python::call_method.

If the call raises a Python error then this is translated to a C++ exception object inheriting from std::exception or std::runtime_error depending on the type of Python error.

Note that this is an implementation method that does not hold the GIL and is only intended to be used below.

Parameters
objPointer to Python object
methodNameName of the method call
argsA list of arguments to forward to call_method

Definition at line 37 of file CallMethod.h.

References callMethodImpl(), and obj.

Referenced by Mantid::PythonInterface::callMethod(), callMethodImpl(), and Mantid::PythonInterface::callMethodNoCheck().