[C++-sig] pyplusplus ui / API
roman.yakovenko at gmail.com
Wed Feb 15 11:42:44 CET 2006
> I'm quite interested in this effort. I have one small concern.
> Usually, when wrapping some c++ code, I may need a small amount of c++
> interface code as well. For example, suppose I have Function A which is in
> A.H. Typically, A might use STL iterator-style interface. To expose to
> python, I write the function a_wrapper, which accepts a boost::range
> interface. Then boost::python directly interfaces with this layer.
> My only concern is that with pyplusplus, to wrap A.H I will need a c++ file
> a_wrapper.cpp as well as a python file? I don't know how to avoid this.
If I understand you right. ...
python file you mean boost.python file that exports your class A right?
a_wrapper is the class that contains few convenience function for
class A, right?
If your class already has class wrapper then there is an easy way to avoid it:
You need to create 2 custom_text_t code creators. The first one with
you add to class wrapper code creator instance, the second you add to
class code creator
instance. So in this case you don't need a_wrapper.cpp
In any other case the answer is yes. In future this could be changed.
C++ Python language binding
More information about the Cplusplus-sig