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/LuaBindEnum.h | |
parent | 64f89347883d519b202711a11d2ea175bd80be37 (diff) |
+lua binding
Diffstat (limited to 'Runtime/Scripting/LuaBindEnum.h')
-rw-r--r-- | Runtime/Scripting/LuaBindEnum.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Runtime/Scripting/LuaBindEnum.h b/Runtime/Scripting/LuaBindEnum.h new file mode 100644 index 0000000..b52f2c3 --- /dev/null +++ b/Runtime/Scripting/LuaBindEnum.h @@ -0,0 +1,39 @@ +#ifndef __LUA_BIND_ENUM_H__ +#define __LUA_BIND_ENUM_H__ + +#include "LuaBindConfig.h" + +namespace LuaBind +{ + + /// + /// 导出枚举,枚举是一类不可修改整型集合,枚举的值在 + /// + struct LuaBindEnum + { + cc8* name; + int value; + }; + + extern int _rmt__index(lua_State* L); + + extern int _rmt__newindex(lua_State* L); + + //--------------------------------------------------------------------------------// + +#if LUA_BIND_ENABLE_PLAIN_ENUM + /// + /// 纯lua的枚举,创建不可修改的table + /// + class LuaBindPlainEnum + { + public: + + static int registry(lua_State* L); + + }; +#endif + +} + +#endif
\ No newline at end of file |