[pygccxml-development] questions about inheritance
Brought to you by:
mbaas,
roman_yakovenko
From: Kevin W. <kev...@gm...> - 2008-02-28 17:33:03
|
I'm using Py++ with a complex class hierarchy with lots of virtual methods. As one example, wxWindow inherits from wxObject. But Py++ is generating class wrappers which don't reflect any inheritance at all. The class declaration for wxWindow looks like bp::class_< wxWindow, boost::noncopyable >( "Window" ) .def( bp::init< >() ) .def( bp::init< wxWindow *, wxWindowID, bp::optional< wxPoint const &, wxSize const &, long int, wxString const & > >(( bp::arg("parent"), bp::arg("winid"), bp::arg("pos")=wxDefaultPosition, bp::arg("size")=wxDefaultSize, bp::arg("style")=(long int)(0), bp::arg("name")=wxString(wxPanelNameStr) )) ) Note the missing bp::bases. Oddly enough, if I load up a module builder in a console and query wxWindow for its bases with the "recursive_bases" property, I see that pygccxml has successively pulled out a chain of classes that looks correct: "wxWindow -> wxCocoaNSView -> wxWindowBase -> wxEvtHandler -> wxTrackable -> wxObject" By which criteria does Py++ decide to expose inhertiance? Do I need to "include" each of the classes listed in wxWindow's recursive_bases property? What if I want just the wxObject methods to be exposed? (For reference, my code generator is at http://code.google.com/p/wxpy/source/browse/trunk/generate_code.py) Any help is much appreciated! |