[pygccxml-development] Implicit virtual functions in derived classes
Brought to you by:
mbaas,
roman_yakovenko
|
From: Julian S. <jul...@rs...> - 2008-02-15 01:23:22
|
Hi,
I ran into the following problem with Py++ 0.9.0. Consider this class
hierarchy:
class A
{
public:
virtual void foo() {}
};
class B: public A
{
};
This will not generate a wrapper for B even though B inherits A's
virtual function. Now if I have the following Python code:
class C(B):
def foo(self):
print "C.foo"
... then when foo() is invoked on this instance on the C++ side of
things, the Python code won't be executed as the wrapper is missing.
I managed to force generation of a wrapper for B, but even then it won't
generate the necessary override code (virtual void foo, void
default_foo, and the registration code.)
My workaround is currently to manually add any implicit virtual
functions that I need to override, but this is cumbersome and
error-prone. Is there a way to configure or patch Py++ so that this is
not necessary?
Thanks in advance,
.Julian
|