28 #ifndef ROCKETCORELUAUTILITIES_H
29 #define ROCKETCORELUAUTILITIES_H
55 template<
typename ToType>
68 int top = lua_gettop(L);
69 lua_getglobal(L,
"Element");
70 lua_getfield(L,-1,
"As");
71 if(!lua_isnoneornil(L,-1))
73 lua_pushcfunction(L,CastFromElementTo<T>);
74 lua_setfield(L,-2,GetTClassName<T>());
#define NULL
Definition: Types.h:33
#define LUACHECKOBJ(obj)
Definition: LuaType.h:53
Definition: Clipboard.h:33
void AddTypeToElementAsTable(lua_State *L)
Definition: Utilities.h:66
int CastFromElementTo(lua_State *L)
Definition: Utilities.h:56
static T * check(lua_State *L, int narg)
static int push(lua_State *L, T *obj, bool gc=false)