From 1497dccd63a84b7ee2b229b1ad9c5c02718f2a78 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 19 Mar 2019 23:06:27 +0800 Subject: *rename --- Source/Asura.Engine/scripting/luax.hpp | 18 ----------- Source/Asura.Engine/scripting/portable.hpp | 49 ------------------------------ Source/Asura.Engine/scripting/portable.inl | 31 ------------------- Source/Asura.Engine/scripting/type.h | 17 ----------- 4 files changed, 115 deletions(-) delete mode 100644 Source/Asura.Engine/scripting/luax.hpp delete mode 100644 Source/Asura.Engine/scripting/portable.hpp delete mode 100644 Source/Asura.Engine/scripting/portable.inl delete mode 100644 Source/Asura.Engine/scripting/type.h (limited to 'Source/Asura.Engine/scripting') diff --git a/Source/Asura.Engine/scripting/luax.hpp b/Source/Asura.Engine/scripting/luax.hpp deleted file mode 100644 index 2bb1160..0000000 --- a/Source/Asura.Engine/scripting/luax.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __ASURA_ENGINE_LUAX_H__ -#define __ASURA_ENGINE_LUAX_H__ - -/// -/// Scripting with Lua. -/// -extern "C" { -#include "Lua51/lua.h" -#include "Lua51/lauxlib.h" -} -#include "Luax/luax.h" - -/// -/// 暴露给lua的类用poartable派生 -/// -#include "Portable.h" - -#endif \ No newline at end of file diff --git a/Source/Asura.Engine/scripting/portable.hpp b/Source/Asura.Engine/scripting/portable.hpp deleted file mode 100644 index df0b878..0000000 --- a/Source/Asura.Engine/scripting/portable.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __ASURA_ENGINE_PORTABLE_H__ -#define __ASURA_ENGINE_PORTABLE_H__ - -#include "Config.h" -#include "Luax.hpp" -#include "Type.h" - -namespace AsuraEngine -{ - namespace Scripting - { - - /// - /// 向lua注册的native class需要继承此类。 - /// - template - class Portable : public Luax::LuaxNativeClass - { - public: - - Portable(); - virtual ~Portable(); -/* - /// - /// 在多个线程间 - /// - void Retain(); - void Release(); -*/ - private: -/* - /// - /// 多线程保护,lua调用gc后,如果在其他线程用了此native object,不会调用delete。 - /// - int mRefCount; - - /// - /// delete保险,继承portable的类,无法使用delete,只能使用Release。 - /// - bool mSafer; -*/ - }; - -#include "portable.inl" - - } -} - -#endif \ No newline at end of file diff --git a/Source/Asura.Engine/scripting/portable.inl b/Source/Asura.Engine/scripting/portable.inl deleted file mode 100644 index f73046a..0000000 --- a/Source/Asura.Engine/scripting/portable.inl +++ /dev/null @@ -1,31 +0,0 @@ -/* -template -Portable::Portable() - : mRefCount(1) - , mSafer(false) -{ -} - -template -Portable::~Portable() -{ - ASSERT(mSafer); -} - -template -void Portable::Retain() -{ - ++mRefCount; -} - -template -void Portable::Release() -{ - if (--mRefCount <= 0) - { - mSafer = true; - delete this; - } -} - -*/ \ No newline at end of file diff --git a/Source/Asura.Engine/scripting/type.h b/Source/Asura.Engine/scripting/type.h deleted file mode 100644 index 0665810..0000000 --- a/Source/Asura.Engine/scripting/type.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __ASURA_SCRIPTING_TYPE_H__ -#define __ASURA_SCRIPTING_TYPE_H__ - -namespace AsuraEngine -{ - namespace Scripting - { - - class Type - { - - }; - - } -} - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0