Go to the source code of this file.
|
#define | DEFINE_LUA_PARTIAL_PUSH(partial, type, call) DEFINE_LUA_PRIMITIVE_OPCASE(push, partial, type, void, type val, call) |
|
#define | DEFINE_LUA_FULL_PUSH(type, call) DEFINE_LUA_PARTIAL_PUSH(, type, call) |
|
#define | DEFINE_LUA_SIMPLE_PUSH(type, name) DEFINE_LUA_FULL_PUSH(type, lua_push##name(L, val)) |
|
| ugdk::script::lua::DEFINE_LUA_PRIMITIVE_OP (push) |
|
| ugdk::script::lua::DEFINE_LUA_PARTIAL_PUSH (class T, T *, lua_pushlightuserdata(L, AsUData< T >(val))) |
|
| ugdk::script::lua::DEFINE_LUA_FULL_PUSH (lua_CFunction, lua_pushcclosure(L, val, 0)) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_PUSH (const char *, string) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_PUSH (bool, boolean) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_PUSH (int, integer) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_PUSH (double, number) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_PUSH (UData, lightuserdata) |
|
|
#define | DEFINE_LUA_TO(type, call) DEFINE_LUA_PRIMITIVE_OPCASE(to, , type, type, int index, return (call)) |
|
#define | DEFINE_LUA_SIMPLE_TO(type, name) DEFINE_LUA_TO(type, static_cast<type>(lua_to##name(L, index))) |
|
| ugdk::script::lua::DEFINE_LUA_PRIMITIVE_OP (to) |
|
| ugdk::script::lua::DEFINE_LUA_TO (const char *, lua_tolstring(L, index, nullptr)) |
|
| ugdk::script::lua::DEFINE_LUA_TO (bool,!!(lua_toboolean(L, index))) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_TO (int, integer) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_TO (double, number) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_TO (UData, userdata) |
|
|
#define | DEFINE_LUA_IS(type, check) DEFINE_LUA_PRIMITIVE_OPCASE(is, , type, bool, int index, return !!(check)) |
|
#define | DEFINE_LUA_SIMPLE_IS(type, name) DEFINE_LUA_IS(type, lua_is##name(L, index)) |
|
| ugdk::script::lua::DEFINE_LUA_PRIMITIVE_OP (is) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_IS (const char *, string) |
|
| ugdk::script::lua::DEFINE_LUA_IS (bool,!lua_isnone(L, index)) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_IS (int, number) |
|
| ugdk::script::lua::DEFINE_LUA_SIMPLE_IS (double, number) |
|
#define CHECK_LUA_TYPE |
( |
|
name, |
|
|
|
type |
|
) |
| (defined name) && (name == type) |
#define DEFINE_LUA_PRIMITIVE_OP |
( |
|
name | ) |
|
Value:template <class T> \
void primitive(); \
}
#define LUA_OPNAME(name)
Generates a Lua operation name.
Definition: primitive.h:14
Defines a Lua primitive operation.
Note that just defining does not make much. One has to define operation cases for it to have any meaning.
- Parameters
-
name | - used to generate the operation name. |
- See also
- DEFINE_LUA_PRIMITIVE_OPCASE
#define DEFINE_LUA_PRIMITIVE_OPCASE |
( |
|
name, |
|
|
|
partial, |
|
|
|
type, |
|
|
|
ret, |
|
|
|
arg, |
|
|
|
exp |
|
) |
| |
Value:template <partial> \
public: \
exp; \
} \
}
#define LUA_OPNAME(name)
Generates a Lua operation name.
Definition: primitive.h:14
struct lua_State lua_State
Definition: defs.h:8
#define DEFINE_LUA_SIMPLE_IS |
( |
|
type, |
|
|
|
name |
|
) |
| DEFINE_LUA_IS(type, lua_is##name(L, index)) |
#define DEFINE_LUA_SIMPLE_TO |
( |
|
type, |
|
|
|
name |
|
) |
| DEFINE_LUA_TO(type, static_cast<type>(lua_to##name(L, index))) |
#define LUA_OPNAME |
( |
|
name | ) |
lua_##name |
Generates a Lua operation name.