July 24, 2011
2:48 a.m.
On Wednesday 13 July 2011 07:19:44 Manuela Kaelberer wrote:
I have to wrap a C++ API for Python. There are a couplt of difficulties: - The C++ classes have private constructors.
Use boost:python::no_init in class_<...>.
- pointers to class instances are parameters for functions
This is not a problem since boost.python handles pointers and references in function parameter lists automatically.
- callbacks that are initiated by the C++ side, but call functions implemented on the Python side.
This is a little tricky but is well-covered in the documentation: http://www.boost.org/doc/libs/1_47_0/libs/python/doc/tutorial/doc/html/pytho... Regards, Ravi