Public Member Functions | |
MyVirtualData (MyVirtualClass const &) | |
Public Member Functions inherited from MyVirtualData | |
MyVirtualData (MyVirtualClass const &) | |
virtual | ~MyVirtualData () |
This "trampoline class" does nothing but is ABSOLUTELY required to ensure downcasting works properly with non-smart ptr signatures. Otherwise, there is no handle to the original Python object ( PyObject
*). Every single polymorphic type exposed to Python should be exposed through such a trampoline. Users can also create their own wrapper classes by taking inspiration from boost::python::wrapper<T>.
Definition at line 93 of file bind_virtual_factory.cpp.
|
inline |
we have to use-declare non-defaulted constructors (see https://en.cppreference.com/w/cpp/language/default_constructor) or define them manually.
Definition at line 27 of file bind_virtual_factory.cpp.