Wrapper for native Cpp objects.
Wrapper base class for native Cpp objects.
Initialization should mainly store the wrapped object, and future calls to the wrapper will be forwarded to it. A static wrap method is provided to be more explicit. Wrappers should always be constructed using the new method, which construct the Cpp object using the provided arguments, then wrap it. Classes that inherit from this class should preferably type check the wrapped object during calls to init, and reimplement the new method if the class is meant to be constructed.
__init__(cpp_obj)
cpp()
Return the Cpp wrapped object.
new(*args, **kwargs)
Create a new wrapper by building the underlying object with a specific set of arguments.
wrap(cpp_obj) → WrapperCpp
Wrap the Cpp object into a Python object.
Args:
cpp_obj
: object to wrap
Returns:
WrapperCpp
: wrapper