13#include <boost/python/call_method.hpp>
14#include <boost/python/class.hpp>
17namespace PythonInterface {
36template <
typename ReturnType,
typename... Args>
39 return boost::python::call_method<ReturnType, Args...>(
obj, methodName, args...);
40 }
catch (boost::python::error_already_set &) {
55template <
typename ReturnType,
typename... Args>
70template <
typename ReturnType,
typename... Args>
71ReturnType
callMethodNoCheck(
const boost::python::object &
obj,
const char *methodName,
const Args &...args) {
86template <
typename ReturnType,
typename... Args>
87ReturnType
callMethod(PyObject *
obj,
const char *methodName,
const Args &...args) {
double obj
the value of the quadratic function
Defines a structure for acquiring/releasing the Python GIL using the RAII pattern.
Exception type that captures the current Python error state as a generic C++ exception for any genera...
ReturnType callMethodImpl(PyObject *obj, const char *methodName, const Args &...args)
Wrapper around boost::python::call_method.
ReturnType callMethod(PyObject *obj, const char *methodName, const Args &...args)
Wrapper around boost::python::call_method to acquire GIL for duration of call.
bool MANTID_PYTHONINTERFACE_CORE_DLL typeHasAttribute(PyObject *obj, const char *attr)
This namespace contains helper functions for classes that are overridden in Python.
ReturnType callMethodNoCheck(PyObject *obj, const char *methodName, const Args &...args)
Wrapper around boost::python::call_method to acquire GIL for duration of call.
Helper class which provides the Collimation Length for SANS instruments.
Defines an exception for an undefined attribute.
virtual ~UndefinedAttributeError()=default