Re: [pygccxml-development] Printing declarations...
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-03-19 19:50:54
|
On 3/19/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > >> Should the fix for the copy constructor also be available yet? (they a= re > >> still not wrapped automatically) > > > > I am doing something wrong with constructors. I do not know what :-(. > > What's wrong with the other constructors? For me, it's only the copy > constructor that doesn't get wrapped, all other constructors have been > fine so far. I don't know exactly. I have take into account constructor for wrapper, artificial constructors, private and protected and ... . > Ahem, I forgot that I was explicitly ignoring it..... > The actual problem is that the generated code won't compile on Windows > (using VC7.1). pyplusplus generates the following code: > > MVector_exposer.def( "__call__" > , (double ( ::MVector::* )( unsigned int ) > const)(&MVector::operator()) > , ( bp::arg("i") ) > , bp::default_call_policies() ); > > When I try to compile this I get a syntax error because of the > "operator()" (VC7.1 gets confused by the brackets). Whereas when I > create the following typedef > > typedef double (::MVector::*bracket_op)(unsigned int i) const; > > and then rewrite the above as > > MVector_exposer.def( "__call__" > , (bracket_op)(&MVector::operator()) > , ( bp::arg("i") ) > , bp::default_call_policies() ); > > then it compiles fine. Could this scheme be incorporated in pyplusplus? Yes. I need it also for template functions too. Do you think we need to implement this before release or after? > Almost, the signature is there but the actual method name is missing. Okay, I give up :-). I understand what you want, but I don't understand the format. Also, why do you need this from framework. You have all tools to create almost any format by your own? > - Matthias - -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |