Defines convenience utilities to wrap pybind11 methods and classes.
|
template<typename Func > |
auto | WrapCallbacks (Func &&func) |
| Ensures that any std::function<> arguments are wrapped such that any T& (which can infer for T = const U ) is wrapped as U* (and conversely unwrapped when returned). More...
|
|
template<typename PyClass , typename Class , typename T > |
void | DefReadWriteKeepAlive (PyClass *cls, const char *name, T Class::*member, const char *doc="") |
| Idempotent to pybind11's def_readwrite() , with the exception that the setter is protected with keep_alive on a member variable that is a bare pointer. More...
|
|
template<typename PyClass , typename Class , typename T > |
void | DefReadUniquePtr (PyClass *cls, const char *name, const std::unique_ptr< T > Class::*member, const char *doc="") |
| Idempotent to pybind11's def_readonly() , which works for unique_ptr elements; the getter is protected with keep_alive on a member variable that is a unique_ptr. More...
|
|
template<typename PyClass , typename Class , typename T > |
void | DefReadUniquePtr (PyClass *cls, const char *name, const copyable_unique_ptr< T > Class::*member, const char *doc="") |
|