Re: [C++-sig] How to wrap reference to abstract base class to get C++ polymorphism

2010-05-24 Thread Nicolas Colombe
2010/5/20 Kun Hong > > > class B > { > public: >virtual const char *getName() const = 0; > }; > > BOOST_PYTHON_MODULE(Test) > { > >class_ >("B", no_init) >.def("getName", pure_virtual(&B::getName)) >; > >def("getB", &getB, > return_value

[C++-sig] Boost.Python to_python_indirect and intrusive_ptr.

2010-04-03 Thread Nicolas Colombe
Hi everyone. I'm trying to use Boost.Python to expose some of my C++ classes and I encountered an odd behaviour of the to_python_indirect result converter for intrusive_ptr with specific classes. Here is the deal: I'm using a component-based design for my classes, meaning an aggregation of object