summaryrefslogtreecommitdiff
path: root/Runtime/Scripting/luax_enum.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-19 09:13:58 +0800
committerchai <chaifix@163.com>2020-10-19 09:13:58 +0800
commitf0807fc44dde14531759306317611bab87c8fccf (patch)
tree6e78fed61c16a70cda5fa732635f89f9faac9720 /Runtime/Scripting/luax_enum.h
parent639b34294ffc20721c66db46e59e07d9100ac4b8 (diff)
+gamelab proj
Diffstat (limited to 'Runtime/Scripting/luax_enum.h')
-rw-r--r--Runtime/Scripting/luax_enum.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/Runtime/Scripting/luax_enum.h b/Runtime/Scripting/luax_enum.h
new file mode 100644
index 0000000..9afece2
--- /dev/null
+++ b/Runtime/Scripting/luax_enum.h
@@ -0,0 +1,39 @@
+#ifndef __LUAX_ENUM_H__
+#define __LUAX_ENUM_H__
+
+#include "luax_config.h"
+
+namespace Luax
+{
+
+ ///
+ /// 导出枚举,枚举是一类不可修改整型集合,枚举的值在
+ ///
+ struct LuaxEnum
+ {
+ cc8* name;
+ int value;
+ };
+
+ extern int _rmt__index(lua_State* L);
+
+ extern int _rmt__newindex(lua_State* L);
+
+ //--------------------------------------------------------------------------------//
+
+#if LUAX_ENABLE_PLAIN_ENUM
+ ///
+ /// 纯lua的枚举,创建不可修改的table
+ ///
+ class LuaxPlainEnum
+ {
+ public:
+
+ static int registry(lua_State* L);
+
+ };
+#endif
+
+}
+
+#endif \ No newline at end of file