Ardour
9.0-pre0-350-gf17a656217
|
#include <Userdata.h>
Public Member Functions | |
virtual | ~Userdata () |
Static Public Member Functions | |
static void * | get_ptr (lua_State *L, int index) |
template<class T > | |
static Userdata * | getExact (lua_State *L, int index) |
template<class T > | |
static T * | get (lua_State *L, int index, bool canBeConst) |
template<class T > | |
static T * | try_get (lua_State *L, int index, bool canBeConst) |
Protected Member Functions | |
void * | getPointer () const |
Protected Attributes | |
void * | m_p |
Static Private Member Functions | |
static Userdata * | getExactClass (lua_State *L, int narg, void const *classKey) |
static Userdata * | getClass (lua_State *L, int index, void const *baseClassKey, bool canBeConst, bool errorOnMismatch=true) |
Interface to a class pointer retrievable from a userdata.
Definition at line 73 of file Userdata.h.
|
inlinevirtual |
Definition at line 304 of file Userdata.h.
|
inlinestatic |
Get a pointer to the class from the Lua stack.
If the object is not the class or a subclass, or it violates the const-ness, a Lua error is raised.
Definition at line 331 of file Userdata.h.
|
inlinestatic |
Definition at line 306 of file Userdata.h.
|
inlinestaticprivate |
Validate and retrieve a Userdata on the stack.
The Userdata must be derived from or the same as the given base class, identified by the key. If canBeConst is false, generates an error if the resulting Userdata represents to a const object. We do the type check first so that the error message is informative.
Definition at line 188 of file Userdata.h.
Returns the Userdata* if the class on the Lua stack matches.
If the class does not match, a Lua error is raised.
Definition at line 318 of file Userdata.h.
|
inlinestaticprivate |
Validate and retrieve a Userdata on the stack.
The Userdata must exactly match the corresponding class table or const table, or else a Lua error is raised. This is used for the __gc metamethod.
Definition at line 96 of file Userdata.h.
|
inlineprotected |
Get an untyped pointer to the contained class.
Definition at line 82 of file Userdata.h.
|
inlinestatic |
Definition at line 341 of file Userdata.h.
|
protected |
Definition at line 76 of file Userdata.h.