From 8d4e45c9a85175d0fc37d7d5c49ff90abb01fe4f Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Nov 2018 12:24:22 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9lua=20bind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/common/je_lua_proxy.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/lua/common/je_lua_proxy.cpp (limited to 'src/lua/common/je_lua_proxy.cpp') diff --git a/src/lua/common/je_lua_proxy.cpp b/src/lua/common/je_lua_proxy.cpp new file mode 100644 index 0000000..dc6df30 --- /dev/null +++ b/src/lua/common/je_lua_proxy.cpp @@ -0,0 +1,32 @@ +#include "je_lua.h" +#include "je_lua_proxy.h" + +namespace JinEngine +{ + namespace Lua + { + + void Proxy::bind(SharedBase* s) + { + if (s == nullptr) + return; + shared = s; + shared->retain(); + } + + void Proxy::release() + { + if (shared != nullptr) + { + shared->release(); + shared = nullptr; + } + } + + const char* Proxy::getObjectType() + { + return shared->type; + } + + } +} \ No newline at end of file -- cgit v1.1-26-g67d0