diff options
author | chai <chaifix@163.com> | 2020-11-15 09:59:32 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-15 09:59:32 +0800 |
commit | d2e4b2839bc7ce874370ff4c52dcfdadf666ff52 (patch) | |
tree | b83e34c2d66cf80b94af5c9a420b6c9c206c138c /Runtime/Scripting/LuaBindMemberRef.h | |
parent | 64f89347883d519b202711a11d2ea175bd80be37 (diff) |
+lua binding
Diffstat (limited to 'Runtime/Scripting/LuaBindMemberRef.h')
-rw-r--r-- | Runtime/Scripting/LuaBindMemberRef.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Runtime/Scripting/LuaBindMemberRef.h b/Runtime/Scripting/LuaBindMemberRef.h new file mode 100644 index 0000000..ea60633 --- /dev/null +++ b/Runtime/Scripting/LuaBindMemberRef.h @@ -0,0 +1,27 @@ +#ifndef __LUA_BIND_MEMBER_REF_H__ +#define __LUA_BIND_MEMBER_REF_H__ + +#include "LuaBindConfig.h" + +namespace LuaBind +{ + + /// + /// 实例的ref table保存的member ref。由luax class做具体的管理。实例的ref table是强引用,用来管理里面member的生命周期。 + /// 用来在lua和native之间进行数据沟通。 + /// + class LuaBindMemberRef + { + public: + LuaBindMemberRef(); + ~LuaBindMemberRef(); + + inline operator bool() { return refID != LUA_NOREF; }; + + int refID; + + }; + +} + +#endif
\ No newline at end of file |