From 62085e1b49ce2d8a630373e410812d5c4a9eecc2 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 08:56:55 +0800 Subject: *luax --- source/3rd-party/Luax/luax_runtime.h | 64 ------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 source/3rd-party/Luax/luax_runtime.h (limited to 'source/3rd-party/Luax/luax_runtime.h') diff --git a/source/3rd-party/Luax/luax_runtime.h b/source/3rd-party/Luax/luax_runtime.h deleted file mode 100644 index 27c9af4..0000000 --- a/source/3rd-party/Luax/luax_runtime.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __LUAX_RUNTIME_H__ -#define __LUAX_RUNTIME_H__ - -#include - -#include "luax_ref.h" -#include "luax_config.h" -#include "luax_state.h" -#include "luax_vm.h" - -namespace Luax -{ - - /// - /// 统一管理程序所有的lua states。 - /// - class LuaxRuntime - { - public: - - static LuaxRuntime& Get(); - - /// - /// 创建一个新的lua虚拟机和此虚拟机的主线程并保存下来。返回的lua_State*是一个8\4字节的key。 - /// - lua_State* Open(); -/* - /// - /// 从主线程创建一个子线程。并添加到context的映射。主要是为了方便访问context,类似主线程那样访问。 - /// - lua_State* CreateThread(lua_State* mainThread); -*/ - /// - /// 关闭lua_State并将其从runtime中删除。 - /// - void Close(lua_State* L); - - bool HasLuaxState(lua_State* L); - LuaxState& GetLuaxState(lua_State* L); - LuaxRefTable& GetStrongRefTable(lua_State* L); - LuaxRefTable& GetWeaksRefTable(lua_State* L); - - LuaxVM& operator[](lua_State* L); - - private: - - LuaxRuntime(); - ~LuaxRuntime(); - - static LuaxRuntime* mRuntime; - - /// - /// 从lua_State handle到context的映射 - /// - std::map mContexts; - - }; - -#define LUAX_RUNTIME() \ - LuaxRuntime& runtime = LuaxRuntime::Get() - -} - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0