summaryrefslogtreecommitdiff
path: root/Source/3rdParty/Luax/luax_class.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-03-12 00:39:26 +0800
committerchai <chaifix@163.com>2019-03-12 00:39:26 +0800
commit70b82d1981c0de3c7b77670ff8abcfeb26815142 (patch)
treef69c05bcd204cc3f9bf745be37a2ba5911e52436 /Source/3rdParty/Luax/luax_class.cpp
parentc19a282e10f51ddd50d198b903f8fbd5a2238b62 (diff)
*misc
Diffstat (limited to 'Source/3rdParty/Luax/luax_class.cpp')
-rw-r--r--Source/3rdParty/Luax/luax_class.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/Source/3rdParty/Luax/luax_class.cpp b/Source/3rdParty/Luax/luax_class.cpp
index e69de29..99da697 100644
--- a/Source/3rdParty/Luax/luax_class.cpp
+++ b/Source/3rdParty/Luax/luax_class.cpp
@@ -0,0 +1,50 @@
+#include "luax_state.h"
+#include "luax_class.h"
+
+namespace Luax
+{
+
+ LuaxClass::LuaxClass()
+ : mRefCount(1) // ʱĬһ
+ {
+ }
+
+ LuaxClass::~LuaxClass()
+ {
+ }
+
+ void LuaxClass::Retain()
+ {
+ ++mRefCount;
+ }
+
+ void LuaxClass::Release()
+ {
+ if (--mRefCount <= 0)
+ delete this;
+ }
+
+ bool LuaxClass::PushLuaUserdata(LuaxState& state)
+ {
+ return true;
+ }
+
+ void LuaxClass::BindToLua(LuaxState& state)
+ {
+ assert(!mUserdata);
+
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+
+ ///
+ /// ͷŹʵ
+ ///
+ int LuaxClass::l_GC(lua_State* L)
+ {
+ LUAX_SETUP(L, "U");
+
+ return 0;
+ }
+
+} \ No newline at end of file