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/python/exposing.html#python.virtual_functions_with_default_implementations

Regards,
Ravi

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to