Re: [C++-sig] can these exports be avoided

2008-11-10 Thread David Abrahams
on Mon Nov 10 2008, Gennadiy Rozental wrote: > Simple scenario: > > class IObject {}; > > class Base : public IObject { > public: >virtual void foo() {} > }; > > class Derived : public Base { >virtual void foo() {} > }; > > Both IObject and Base are exported into Python: > > bp::class_(

Re: [C++-sig] can these exports be avoided

2008-11-10 Thread Gennadiy Rozental
Hans Meine informatik.uni-hamburg.de> writes: > > On Monday 10 November 2008 08:56:14 Gennadiy Rozental wrote: > > It can be resolved with additional export for class Derived: > > > > bp::class_,noncopyable> > > ( "Derived", bp::no_init ); > > > > In which case above print statement starts >

Re: [C++-sig] can these exports be avoided

2008-11-10 Thread Gennadiy Rozental
Patrick Atambo gmail.com> writes: > > > I'd say you have 2 options depending > > Containment. This would require an API class that you export to Python with methods that call your implementation and it's my favorite since from here you can control what is used when calling your implementat

Re: [C++-sig] can these exports be avoided

2008-11-10 Thread Hans Meine
On Monday 10 November 2008 08:56:14 Gennadiy Rozental wrote: > It can be resolved with additional export for class Derived: > > bp::class_,noncopyable>( "Derived", bp::no_init ); > > In which case above print statement starts to show mymodule.Derived. AFAICS that's the proper solution. > But I >

Re: [C++-sig] can these exports be avoided

2008-11-10 Thread Patrick Atambo
I'd say you have 2 options depending 1. Containment. This would require an API class that you export to Python with methods that call your implementation and it's my favorite since from here you can control what is used when calling your implementation methods/objects. 2. Use Pr