Go to the source code of this file.
|
| #define | LUAMETHOD(type, name) { #name, type##name }, |
| |
| #define | LUAGETTER(type, varname) { #varname, type##GetAttr##varname }, |
| |
| #define | LUASETTER(type, varname) { #varname, type##SetAttr##varname }, |
| |
| #define | CHECK_BOOL(L, narg) (lua_toboolean((L),(narg)) > 0 ? true : false ) |
| |
| #define | LUACHECKOBJ(obj) if((obj) == NULL) { lua_pushnil(L); return 1; } |
| |
| #define | LUACORETYPEDEFINE(type, is_ref_counted) |
| |
| #define | LUACONTROLSTYPEDEFINE(type, is_ref_counted) |
| |
| #define | LUACORETYPEDECLARE(type) |
| |
| #define | LUACONTROLSTYPEDECLARE(type) |
| |
| #define CHECK_BOOL |
( |
|
L, |
|
|
|
narg |
|
) |
| (lua_toboolean((L),(narg)) > 0 ? true : false ) |
| #define LUACHECKOBJ |
( |
|
obj | ) |
if((obj) == NULL) { lua_pushnil(L); return 1; } |
| #define LUACONTROLSTYPEDECLARE |
( |
|
type | ) |
|
Value:
template<>
ROCKETLUA_API RegType<type>* GetMethodTable<type>(); \
Used to remove repetitive typing at the cost of flexibility. It creates function prototypes for getting the name of the type, method tables, and if it is reference counted. When you use this, you either must also use the LUACORETYPEDEFINE macro, or make sure that the function signatures are exact.
| #define LUACONTROLSTYPEDEFINE |
( |
|
type, |
|
|
|
is_ref_counted |
|
) |
| |
Value:template<> const char* GetTClassName<type>() { return #type; } \
template<> RegType<type>* GetMethodTable<type>() { return Rocket::Controls::Lua::type##Methods; } \
template<> luaL_Reg* GetAttrTable<type>() { return Rocket::Controls::Lua::type##Getters; } \
template<> luaL_Reg* SetAttrTable<type>() { return Rocket::Controls::Lua::type##Setters; } \
template<> bool IsReferenceCounted<type>() { return (is_ref_counted); } \
| #define LUACORETYPEDECLARE |
( |
|
type | ) |
|
Value:
template<>
ROCKETLUA_API RegType<type>* GetMethodTable<type>(); \
Used to remove repetitive typing at the cost of flexibility. It creates function prototypes for getting the name of the type, method tables, and if it is reference counted. When you use this, you either must also use the LUACORETYPEDEFINE macro, or make sure that the function signatures are exact.
| #define LUACORETYPEDEFINE |
( |
|
type, |
|
|
|
is_ref_counted |
|
) |
| |
Value:template<> const char* GetTClassName<type>() { return #type; } \
template<> RegType<type>* GetMethodTable<type>() { return type##Methods; } \
template<> luaL_Reg* GetAttrTable<type>() { return type##Getters; } \
template<> luaL_Reg* SetAttrTable<type>() { return type##Setters; } \
template<> bool IsReferenceCounted<type>() { return (is_ref_counted); } \
Used to remove repetitive typing at the cost of flexibility. When you use this, you must have functions with the same name as defined in the macro. For example, if you used Element as type, you would have to have functions named ElementMethods, ElementGetters, ElementSetters that return the appropriate types.
- Parameters
-
| #define LUAGETTER |
( |
|
type, |
|
|
|
varname |
|
) |
| { #varname, type##GetAttr##varname }, |
| #define LUAMETHOD |
( |
|
type, |
|
|
|
name |
|
) |
| { #name, type##name }, |
| #define LUASETTER |
( |
|
type, |
|
|
|
varname |
|
) |
| { #varname, type##SetAttr##varname }, |