diff options
Diffstat (limited to 'source/3rd-party/Luax/luax_class.hpp')
-rw-r--r-- | source/3rd-party/Luax/luax_class.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/3rd-party/Luax/luax_class.hpp b/source/3rd-party/Luax/luax_class.hpp index 08b4e3f..e056b75 100644 --- a/source/3rd-party/Luax/luax_class.hpp +++ b/source/3rd-party/Luax/luax_class.hpp @@ -44,7 +44,7 @@ namespace Luax #define LUAX_DECL_METHOD(mtd) static int mtd(lua_State* L) -#define LUAX_DECL_ENUM(e) +#define LUAX_DECL_ENUM(e, under_line_index) static void _luax_decl_enum_##e() /// /// ʵֵĺꡣһL @@ -62,6 +62,7 @@ namespace Luax /// #define LUAX_REGISTER_FACTORY(state, type) state.RegisterFactory<type>() #define LUAX_REGISTER_SINGLETON(state, type) state.RegisterSingleton<type>() +#define LUAX_REGISTER_ABSTRACT_FACTORY(state, type) type::RegisterLuaxPostprocess(state) #define LUAX_REGISTER_METHODS(state, ...) \ do{ \ luaL_Reg __m[] = {__VA_ARGS__,{0, 0}}; \ @@ -77,6 +78,8 @@ namespace Luax LUAX_STATE(L); \ T* self = state.GetUserdata<T>(1); +#define LUAX_INHERIT(state, type) type::RegisterLuaxClass(state) + /// /// ࣬Ϊʵֶ̬ҪЩӿڵⲿҪ̳д֮࣬оͻ /// öӦʵķע̳дʱʵķʵLuaxNativeClassУʵֻ |