[pygccxml-development] Howto wrap "out" arguments of a methode
Brought to you by:
mbaas,
roman_yakovenko
From: Alexander E. <new...@st...> - 2007-06-04 10:04:38
|
How to wrap methode Get with Boost.Python? class MyClass { public: MyClass(); void GetX(double pos_x); [...] Py++ generates following code: [...] .def( bp::init< >() ) .def( "Get" , &::MyClass::Get , ( bp::arg("pos_x")) ) [...] It seems that it (or gccxml) cannot distinguish between in and out parameter. I'v tried it with: .def( "GetX" , &::MyClass::GetX , bp::arg("") , bp::return_value_policy<bp::return_arg<1>() >() But when I try it in python: Boost.Python.ArgumentError: Python argument types in MyClass.GetX(MyClass, int) did not match C++ signature: GetX(class MyClass::LedPosition_C {lvalue}, int {lvalue} ) Thanks Alexander |