On 5/5/07, Gustavo Carneiro <gjc...@gm...> wrote:
> On 05/05/07, Roman Yakovenko <rom...@gm...> wrote:
> > On 5/5/07, Gustavo Carneiro <gjc...@gm...> wrote:
> > > Is it possible to wrap a C++ class that has pure virtual functions? I
> am
> > > getting a compilation error below; what should I do?
> > >
> > > PS: those pure virtual methods are being exclud()ed by me.
> >
> > If you exclude them, than I guess you don't want Python user to create
> > instances of the class and derive from it. If I am right, than you
> > should use no_init:
> >
> > http://boost.org/libs/python/doc/v2/class.html.
> >
> > The only way to tweak Py++ to generate no_init for the class is to
> > exclude all class constructors.
>
> Well, assuming the code below is correct, it doesn't seem to make any
> difference:
>
> for meth in Queue.constructors():
> meth.exclude()
>
> But, anyway, I just white-listed the pure virtual methods and now it
> compiles. They won't work in runtime because they handle unregistered
> parameters, but that is a lesser evil.
If you had some free time, could you submit a complete example that
show a problem?
Thanks
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|