Hi,
> [...]
> // expose to python
> BOOST_PYTHON_MODULE(grids)
> {
> class_ , boost::noncopyable >("A2")
>.def("ret",pure_virtual(&A2::ret));
>
> class_,bases>("B2");
> def("f1",f1);
> }
>
>
> I get the following result on execution :
>
> >import grids
> >>> a = grids.f1()
>
> T
> I'm not top posting.
I have an abstract class A2, with derived class B2.
I want to map a function returning a boost::shared_ptr of A.
This abstract class is wrapped :
struct A2{
virtual ~A2(){}
virtual int ret() =0;
};
struct B2: public A2{
virtual ~B2(){}
int ret() { return 1; }
};