golib
0.5
|
The namespace goPython contains wrappers and helpers to simplify setting/getting, amongst others, SWIG wrapped objects to and from an embedded interpreter. goPython::init()
initialises the interpreter, goPython::final()
ends it. There are several set and get functions to enable cooperation between C++ and the python interpreter by sharing variables. All SWIG wrapped variables are shared over their pointers, so there is no deep copying involved. More set/get function pairs can be easily added for other swig wrapped objects by using the provided macros or the setSwigPointer()
and getSwigPointer()
template functions.
More...
Namespaces | |
goPython | |
Python embedding. Make sure there exists only one python interpreter. Possibly there can be one per thread, but that is not tested. This is all quite new. | |
Macros | |
#define | GOPYTHON_GETSET_DEFINITION(type_spec, py_type_spec, spec) |
Macro to add a definition of a get/set pair to goPython. More... | |
The namespace goPython contains wrappers and helpers to simplify setting/getting, amongst others, SWIG wrapped objects to and from an embedded interpreter. goPython::init()
initialises the interpreter, goPython::final()
ends it. There are several set and get functions to enable cooperation between C++ and the python interpreter by sharing variables. All SWIG wrapped variables are shared over their pointers, so there is no deep copying involved. More set/get function pairs can be easily added for other swig wrapped objects by using the provided macros or the setSwigPointer()
and getSwigPointer()
template functions.
#define GOPYTHON_GETSET_DEFINITION | ( | type_spec, | |
py_type_spec, | |||
spec | |||
) |
Macro to add a definition of a get/set pair to goPython.
adds void goPython::set (const char* name, type_spec* o, bool own_it)
and type_spec* goPython::get##spec (const char* name, bool own_it)
type_spec | c++ Type name |
py_type_spec | python type identifier (used in getSwigPointer()). |
spec | Name extension for the get function. |