Ardour
9.0-pre0-582-g084a23a80d
|
#include <Userdata.h>
Static Public Member Functions | |
static void | push (lua_State *L, T const &t) |
static std::conditional_t< passByValueNotEnum, T const &, T > | get (lua_State *L, int index) |
Static Private Attributes | |
static constexpr bool | passByContainer = TypeTraits::isContainer<T>::value |
static constexpr bool | passByValueNotEnum = !passByContainer && !std::is_enum_v<T> |
static constexpr bool | passByValueEnum = !passByContainer && std::is_enum_v<T> |
Lua stack conversions for class objects passed by value.
Definition at line 617 of file Userdata.h.
|
inlinestatic |
Definition at line 667 of file Userdata.h.
Definition at line 646 of file Userdata.h.
|
staticconstexprprivate |
Pass by container.
The container controls the object lifetime. Typically this will be a lifetime shared by C++ and Lua using a reference count. Because of type erasure, containers like std::shared_ptr will not work. Containers must either be of the intrusive variety, or in the style of the RefCountedPtr type provided by LuaBridge (that uses a global hash table).
Definition at line 631 of file Userdata.h.
|
staticconstexprprivate |
Definition at line 642 of file Userdata.h.
|
staticconstexprprivate |
Pass by value.
Lifetime is managed by Lua. A C++ function which accesses a pointer or reference to an object outside the activation record in which it was retrieved may result in undefined behavior if Lua garbage collected it.
Definition at line 641 of file Userdata.h.