|
CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
|
#include <th_lua_internal.h>
Public Member Functions | |
| lua_class_binding ()=delete | |
| lua_class_binding (const lua_class_binding &)=delete | |
| lua_class_binding (lua_class_binding &&)=delete | |
| lua_class_binding & | operator= (const lua_class_binding &)=delete |
| lua_class_binding | operator= (lua_class_binding &&)=delete |
| lua_class_binding (const lua_register_state *pState, const char *name, lua_CFunction new_fn, lua_metatable mt) | |
| void | set_superclass (lua_metatable super_mt) |
| template<typename V > | |
| void | add_constant (const char *name, V value) |
| template<typename... Args> | |
| void | add_metamethod (lua_CFunction fn, const char *name, Args... args) |
| template<typename... Args> | |
| void | add_function (lua_CFunction fn, const char *name, Args... args) |
| ~lua_class_binding () | |
Create a lua 'class' bound to a C++ class.
This class should be immediately destructed after adding all of it's functions, metamethods and constants to complete the creation of the bind.
|
delete |
|
delete |
|
delete |
|
inline |
Initiate class bindings for lua.
| pState | The lua environment to bind to. |
| name | The name to give this lua 'class'. |
| new_fn | The function to call when a new class is created. |
| mt | The metatable id for the class |
|
inline |
Destructor which finalizes the lua binding
|
inline |
Add a named constant to the lua interface.
| name | (string literal) Name of the constant. |
| value | (tested with int) Value of the constant. |
|
inline |
Add a C++ function to the lua class.
| fn | The C++ function. |
| name | The name of the function in lua. |
| args | The upvalues for the function |
|
inline |
Add a C++ metamethod to the lua class.
| fn | The C++ function to call. |
| name | The name of the metamethod (without the __ prefix). |
| args | The upvalues for the function. |
|
delete |
|
delete |
|
inline |
Set another class as the superclass of this class.
| super_mt | The metatable id of the super class. |