[pygccxml-development] 2 Questions
Brought to you by:
mbaas,
roman_yakovenko
|
From: Allen B. <al...@vr...> - 2006-09-12 16:04:16
|
I have two questions that I am surprised I haven't run into before. I
hope that both have easy answers.
1. Base class virtual ignored, but coming in inside derived class wrappers.
I have a base class and derived class like:
struct Base
{
virtual const int* getData() const = 0;
};
struct Child : public Base
{ }
struct GrandChild : public Child
{
virtual const int* getData() const;
}
In my py++ generation script I ignore the getData decl in the Base class
(and the GrandChild). But py++ still ends up generating wrapper code
for getData for the Child class. To make matters worse, since it is not
a decl for getData in the Child class I can not ignore it there. It is
almost like Py++ is seeing the virtual method and deciding that it needs
to provide a wrapper for it in Child even though it is ignored in Base.
Is this a bug in Py++ or is there some way that I can take care of this.
2. The alternative option would be to just wrap the method correctly,
but how can I wrap returning a memory buffer (array) of arbitrary length?
Is there a way to wrap this method so it will return a const wrapper
around this data buffer to make it look like a python list? If so what
is the easiest way to do it and do I really need to wait for MB's method
transformer code to do it right?
Thanks for you help. I am sorry if either of these seems like a really
basic question, I just haven't run into this before.
-Allen
|