i have wrapped a simple c++ interface / class using pybind11
py::class_<IBaseObject, SmartPtr<IBaseObject>>(m, "BaseObject")
.def(py::init([]()
{
return BaseObject_Create();
}))
)
IBaseObject is interface, SmartPtr is custom holder type and BaseObject_Create is factory function which returns IBaseObject*.
Instatiating class from python works fine, however i also want to instantiate python wrapper class from C++ while passing IBaseObject* as parameter. Is this possible?