mirror of
https://github.com/triqs/dft_tools
synced 2024-12-27 06:43:40 +01:00
f2c7d449cc
for earlier commits, see TRIQS0.x repository.
19 lines
443 B
ReStructuredText
19 lines
443 B
ReStructuredText
.. highlight:: c
|
|
|
|
::
|
|
|
|
namespace Py_to_C {
|
|
template<typename T> struct convert{
|
|
static bool possible (boost::python::object x); // returns true iif the conversion of x into a T is possible
|
|
static T invoke(boost::python::object x); // do it !
|
|
};
|
|
}
|
|
|
|
namespace C_to_Py {
|
|
template<typename T> struct convert {
|
|
static boost::python::object invoke (T const & x); // convert T into a python object
|
|
};
|
|
}
|
|
|
|
|