Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Python::Conversion< T > Struct Template Reference

Conversion of C type T from and to PyObject*. More...

#include <dune/fufem/python/common.hh>

Static Public Member Functions

static void toC (PyObject *x, T &y)
 
static PyObject * toPy (const T &x)
 

Detailed Description

template<class T>
struct Python::Conversion< T >

Conversion of C type T from and to PyObject*.

Only to be used if you want to extend the interface using the python api. As user you should use

Reference makeObject(const T &t)
Create python object from C++ object.
Definition common.hh:351
std::enable_if< Conversion< T >::useDefaultConstructorConversion, T >::type toC() const
Convert to C object.
Definition reference.hh:192

to convert a C object to a python object or vice versa.

For implementors:

Template Parameters
TC type to convert

Specialize this to implement conversion for a type T.

Member Function Documentation

◆ toC()

template<class T >
static void Python::Conversion< T >::toC ( PyObject *  x,
T &  y 
)
inlinestatic

◆ toPy()

template<class T >
static PyObject * Python::Conversion< T >::toPy ( const T &  x)
inlinestatic

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