diff options
Diffstat (limited to 'Runtime/Scripting/LuaBindRefTable.h')
-rw-r--r-- | Runtime/Scripting/LuaBindRefTable.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Runtime/Scripting/LuaBindRefTable.h b/Runtime/Scripting/LuaBindRefTable.h index 95a21f9..1cc2af3 100644 --- a/Runtime/Scripting/LuaBindRefTable.h +++ b/Runtime/Scripting/LuaBindRefTable.h @@ -6,12 +6,12 @@ namespace LuaBind { - class LuaBindState; + class State; /// /// ref table 管理,对strong ref table和weak ref table两个table的代理。 /// - class LuaBindRefTable + class RefTable { public: @@ -21,12 +21,12 @@ namespace LuaBind WEAK_VALUE = 1 << 1 }; - LuaBindRefTable(); - ~LuaBindRefTable(); + RefTable(); + ~RefTable(); inline operator bool() { return mState; }; - void Init(LuaBindState& state, cc8* name, cc8* mode = nullptr); + void Init(State& state, cc8* name, cc8* mode = nullptr); bool IsKeyWeak(); bool IsValueWeak(); @@ -34,27 +34,27 @@ namespace LuaBind /// /// 对stack[idx]的实体在此ref table中增加一个引用,并返回refID /// - int Ref(LuaBindState& state, int idx); - void Unref(LuaBindState& state, int refID); + int Ref(State& state, int idx); + void Unref(State& state, int refID); /// /// 将此 ref table 放在栈顶 /// - void PushRefTable(LuaBindState& state); + void PushRefTable(State& state); /// /// 将 reftable[refID] 放在栈顶 /// - void PushRef(LuaBindState& state, int refID); + void PushRef(State& state, int refID); /// /// 清空 ref table,表还留在LUA_REGISTRYINDEX[mName] /// - void Clear(LuaBindState& state); + void Clear(State& state); private: - friend class LuaBindState; + friend class State; lua_State* mState; // 用来做一些确认工作 cc8* mName; // ref table的名称 |