|
static bool | addFunctionsToLib (lua_State *L, const Common::String &libName, const luaL_reg *functions) |
|
static bool | addConstantsToLib (lua_State *L, const Common::String &libName, const lua_constant_reg *constants) |
|
static bool | addMethodsToClass (lua_State *L, const Common::String &className, const luaL_reg *methods) |
|
static bool | setClassGCHandler (lua_State *L, const Common::String &className, lua_CFunction GCHandler) |
|
static Common::String | stackDump (lua_State *L) |
|
static Common::String | tableDump (lua_State *L) |
|
static bool | getMetatable (lua_State *L, const Common::String &tableName) |
|
static void * | my_checkudata (lua_State *L, int ud, const char *tname) |
|
◆ addFunctionsToLib()
static bool Sword25::LuaBindhelper::addFunctionsToLib |
( |
lua_State * |
L, |
|
|
const Common::String & |
libName, |
|
|
const luaL_reg * |
functions |
|
) |
| |
|
static |
Registers a set of functions into a Lua library.
- Parameters
-
L | A pointer to the Lua VM |
LibName | The name of the library. If this is an empty string, the functions will be added to the global namespace. |
Functions | An array of function pointers along with their names. The array must be terminated with the enry (0, 0) |
- Returns
- Returns true if successful, otherwise false.
◆ addConstantsToLib()
Adds a set of constants to the Lua library
- Parameters
-
L | A pointer to the Lua VM |
LibName | The name of the library. If this is an empty string, the functions will be added to the global namespace. |
Constants | An array of the constant values along with their names. The array must be terminated with the enry (0, 0) |
- Returns
- Returns true if successful, otherwise false.
◆ addMethodsToClass()
static bool Sword25::LuaBindhelper::addMethodsToClass |
( |
lua_State * |
L, |
|
|
const Common::String & |
className, |
|
|
const luaL_reg * |
methods |
|
) |
| |
|
static |
Adds a set of methods to a Lua class
- Parameters
-
L | A pointer to the Lua VM |
ClassName | The name of the class When the class name specified does not exist, it is created. |
Methods | An array of function pointers along with their method names. The array must be terminated with the enry (0, 0) |
- Returns
- Returns true if successful, otherwise false.
◆ setClassGCHandler()
static bool Sword25::LuaBindhelper::setClassGCHandler |
( |
lua_State * |
L, |
|
|
const Common::String & |
className, |
|
|
lua_CFunction |
GCHandler |
|
) |
| |
|
static |
Sets the garbage collector callback method when items of a particular class are deleted
- Parameters
-
L | A pointer to the Lua VM |
ClassName | The name of the class When the class name specified does not exist, it is created. |
GCHandler | A function pointer |
- Returns
- Returns true if successful, otherwise false.
◆ stackDump()
Returns a string containing a stack dump of the Lua stack
- Parameters
-
◆ tableDump()
Returns a string that describes the contents of a table
- Parameters
-
The documentation for this class was generated from the following file: