Template Class ExternPythonHelper

Class Documentation

template<class InputType>
class ioh::problem::python::ExternPythonHelper

Unnamed Group

template<>
void call(PyObject *py_function)

Template specializations of call.

template<>
std::vector<InputType> call(PyObject *py_function)
template<>
std::string call(PyObject *py_function)
template<class R, class T>
R call(PyObject *py_function, T args)
template<class T>
void call(PyObject *py_function, T args)

Unnamed Group

template<>
PyObject *from_num(int x)

Template specializations of from_num for integer InputType(s).

template<>
PyObject *from_num(long x)
template<>
PyObject *from_num(long long x)
template<>
PyObject *from_num(unsigned long x)
template<>
PyObject *from_num(unsigned long long x)

Unnamed Group

template<>
int long_as_num(PyObject *py_value)

Template specialization of as_num.

template<>
double long_as_num(PyObject *py_value)
template<>
long long long_as_num(PyObject *py_value)
template<>
unsigned long long_as_num(PyObject *py_value)
template<>
unsigned long long long_as_num(PyObject *py_value)

Public Functions

ExternPythonHelper(std::string module_name, std::string instance_name)
~ExternPythonHelper()
PyObject *get_callable(std::string func_name)
template<class R>
R call(PyObject *py_function)

Public Members

PyObject *module

Protected Functions

PyObject *pycall(PyObject *py_callable, PyObject *py_args)
template<class T>
PyObject *as_tuple(const T &x)
template<class R>
R as_num(PyObject *py_value)
template<class R>
R float_as_num(PyObject *py_value)
template<class R>
R long_as_num(PyObject *py_value)
template<typename T>
PyObject *from_num(T x)

Protected Attributes

std::string _api_module
std::string _api_instance