To run
-
run build_and_call.sh
./build_and_call.sh
Output should look like
b.f(): A::f()
super(B, b).f(): A::f()
base_ext.call_f(b): A::f()
c.f(): C::f()
super(C, c).f(): ACallback::default_f()
base_ext.call_f(c): C::f()
This code is an excerpt from <boost>/libs/python/test/polymorphism.{cpp,py}
For more info on virtual functions, see Boost's Exposing Classes
For more info on 'class', see wiki.python.org's boost.python/class