[C++-sig] Can boost python do these 2 things automatically?
Chang_Chen at sonic.com
Thu Oct 11 07:44:52 CEST 2007
I am new to boost python. I have 2 questions for using boost python to
wrap C++ API
Our C++ API looks like this:
Error CreateB(B& bObj);
Our error handle strategy is returning an error code other than throwing
exception. This is because throwing an exception across the DLL boundary
is not safe.
I want to wrap A and B with same C++ public interface in python, but
#1 I want to return real object rather than return an error code. i.e.
aObject = A()
*bObject = aObject.CreateB()*
#2 I want to throw an *python* exception rather than return an error
code like c++.
I do not know how to do it in Boost Python.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cplusplus-sig