Explain how to wrap complex c++ inheritance tree