diff options
Diffstat (limited to 'src/libjin-lua/common/je_lua.h')
-rw-r--r-- | src/libjin-lua/common/je_lua.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/libjin-lua/common/je_lua.h b/src/libjin-lua/common/je_lua.h new file mode 100644 index 0000000..74f9819 --- /dev/null +++ b/src/libjin-lua/common/je_lua.h @@ -0,0 +1,83 @@ +#ifndef __JE_LUA_H__ +#define __JE_LUA_H__ + +#include <vector> + +#include "LuaJIT/lua.hpp" +#include "luax/luax.h" + +#include "je_lua_shared.hpp" +#include "je_lua_object.h" +#include "je_lua_reference.h" + +namespace JinEngine +{ + namespace Lua + { + + // Extends luax.h library. + + /// + /// + /// + LuaObject* luax_newinstance(lua_State* L, const char* type, Shared* shared); + + /// + /// Copy instance to another lua state. + /// + LuaObject* luax_copyinstance(lua_State* to, LuaObject* src); + + /// + /// + /// + LuaObject* luax_checkobject(lua_State* L, int idx, const char* type); + + /// + /// Access lua object by object pointer. + /// + int luax_getobject(lua_State* L, LuaObject* obj); + + /// + /// Get object's reference table. + /// + void luax_getreference(lua_State* L, LuaObject* obj); + + /// + /// + /// + bool luax_addreference(lua_State* L, LuaObject* obj, LuaObject* dep); + + /// + /// + /// + void luax_removereference(lua_State* L, LuaObject* obj); + + /// + /// + /// + void luax_removereference(lua_State* L, LuaObject* obj, LuaObject* dep); + + /// + /// + /// + void luax_removeobject(lua_State* L, LuaObject* obj); + + /// + /// + /// + int luax_getobjectstable(lua_State* L); + + /// + /// + /// + int luax_getmodulestable(lua_State* L); + + /// + /// + /// + int luax_getreferencestable(lua_State* L); + + } +} + +#endif
\ No newline at end of file |