From 03b3b8ae80559745f98ef94569b421adddeb441f Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Mar 2019 23:46:59 +0800 Subject: *misc --- source/libs/asura-lib-core/application.h | 4 +- .../asura-lib-core/graphics/binding/_canvas.cpp | 0 .../asura-lib-core/graphics/binding/_color.cpp | 0 .../libs/asura-lib-core/graphics/binding/_gif.cpp | 0 .../asura-lib-core/graphics/binding/_image.cpp | 0 .../graphics/binding/_image_data.cpp | 62 +++++++++++ .../asura-lib-core/graphics/binding/_mesh2d.cpp | 0 .../graphics/binding/_mesh2d_data.cpp | 9 ++ .../asura-lib-core/graphics/binding/_shader.cpp | 114 +++++++++++++++++++++ .../graphics/binding/_sprite_batch.cpp | 0 .../asura-lib-core/graphics/binding/_window.cpp | 11 ++ .../graphics/binding/canvas.binding.cpp | 0 .../graphics/binding/color.binding.cpp | 0 .../graphics/binding/gif.binding.cpp | 0 .../graphics/binding/image.binding.cpp | 0 .../graphics/binding/image_data.binding.cpp | 62 ----------- .../graphics/binding/mesh2d.binding.cpp | 0 .../graphics/binding/mesh2d_data.binding.cpp | 9 -- .../graphics/binding/shader.binding.cpp | 114 --------------------- .../graphics/binding/sprite_batch.binding.cpp | 0 .../graphics/binding/window.binding.cpp | 11 -- source/libs/asura-lib-core/graphics/image.h | 4 +- .../libs/asura-lib-core/graphics/stb_decoder.cpp | 4 +- source/libs/asura-lib-core/input/cursor.h | 23 ++--- source/libs/asura-lib-core/input/event.h | 45 ++++++++ source/libs/asura-lib-core/input/input_device.hpp | 9 +- source/libs/asura-lib-core/input/joypad.h | 0 source/libs/asura-lib-core/input/mouse.defs | 7 ++ source/libs/asura-lib-core/manager.hpp | 14 --- source/libs/asura-lib-core/singleton.hpp | 59 ----------- source/libs/asura-lib-core/stringmap.cpp | 0 source/libs/asura-lib-core/stringmap.hpp | 29 ------ .../threading/binding/_coroutine.cpp | 0 .../asura-lib-core/threading/binding/_thread.cpp | 0 source/libs/asura-lib-core/threading/coroutine.cpp | 0 source/libs/asura-lib-core/threading/coroutine.h | 27 +++++ source/libs/asura-lib-core/threading/thread.cpp | 0 source/libs/asura-lib-core/threading/thread.h | 0 38 files changed, 295 insertions(+), 322 deletions(-) create mode 100644 source/libs/asura-lib-core/graphics/binding/_canvas.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_color.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_gif.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_image.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_image_data.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_mesh2d_data.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_shader.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp create mode 100644 source/libs/asura-lib-core/graphics/binding/_window.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/canvas.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/color.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/gif.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/image.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/mesh2d.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/mesh2d_data.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/shader.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/sprite_batch.binding.cpp delete mode 100644 source/libs/asura-lib-core/graphics/binding/window.binding.cpp create mode 100644 source/libs/asura-lib-core/input/event.h create mode 100644 source/libs/asura-lib-core/input/joypad.h create mode 100644 source/libs/asura-lib-core/input/mouse.defs delete mode 100644 source/libs/asura-lib-core/manager.hpp delete mode 100644 source/libs/asura-lib-core/singleton.hpp delete mode 100644 source/libs/asura-lib-core/stringmap.cpp delete mode 100644 source/libs/asura-lib-core/stringmap.hpp create mode 100644 source/libs/asura-lib-core/threading/binding/_coroutine.cpp create mode 100644 source/libs/asura-lib-core/threading/binding/_thread.cpp create mode 100644 source/libs/asura-lib-core/threading/coroutine.cpp create mode 100644 source/libs/asura-lib-core/threading/coroutine.h create mode 100644 source/libs/asura-lib-core/threading/thread.cpp create mode 100644 source/libs/asura-lib-core/threading/thread.h (limited to 'source/libs/asura-lib-core') diff --git a/source/libs/asura-lib-core/application.h b/source/libs/asura-lib-core/application.h index 983dbce..b61154d 100644 --- a/source/libs/asura-lib-core/application.h +++ b/source/libs/asura-lib-core/application.h @@ -65,9 +65,9 @@ namespace AsuraEngine private: /// - /// Lua state. + /// 主线程的lua state,应用主循环在这里运行。 /// - lua_State* mLuaState; + lua_State* mMainLuaState; /// /// 载入的Asura libs,会按照队列顺序初始化,并在退出时执行退出函数。 diff --git a/source/libs/asura-lib-core/graphics/binding/_canvas.cpp b/source/libs/asura-lib-core/graphics/binding/_canvas.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_color.cpp b/source/libs/asura-lib-core/graphics/binding/_color.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_gif.cpp b/source/libs/asura-lib-core/graphics/binding/_gif.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_image.cpp b/source/libs/asura-lib-core/graphics/binding/_image.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_image_data.cpp b/source/libs/asura-lib-core/graphics/binding/_image_data.cpp new file mode 100644 index 0000000..72e33da --- /dev/null +++ b/source/libs/asura-lib-core/graphics/binding/_image_data.cpp @@ -0,0 +1,62 @@ +#include "../image_data.h" + +using namespace Luax; + +namespace AsuraEngine +{ + namespace Graphics + { + + LUAX_REGISTRY(ImageData) + { + + } + + LUAX_POSTPROCESS(ImageData) + { + LUAX_REGISTER_ENUM(state, "EBlendMode", + { "Additive", 1 } + ); + LUAX_REGISTER_ENUM(state, "EPixelFormat", + { "RGBA32", 1 } + ); + } + + // imagedata = ImageData.New(databuffer) + LUAX_IMPL_METHOD(ImageData, _New) + { + LUAX_STATE(L); + + Filesystem::DataBuffer* db = state.CheckUserdata(1); + ImageData* image = new ImageData(*db); + image->PushLuaxUserdata(state); + return 1; + } + + LUAX_IMPL_METHOD(ImageData, _GetPixel) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetSize) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetWidth) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetHeight) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetPixelFormat) + { + + } + + } +} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp b/source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_mesh2d_data.cpp b/source/libs/asura-lib-core/graphics/binding/_mesh2d_data.cpp new file mode 100644 index 0000000..6e15052 --- /dev/null +++ b/source/libs/asura-lib-core/graphics/binding/_mesh2d_data.cpp @@ -0,0 +1,9 @@ +namespace AsuraEngine +{ + namespace Graphics + { + + + + } +} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/_shader.cpp b/source/libs/asura-lib-core/graphics/binding/_shader.cpp new file mode 100644 index 0000000..2f2f507 --- /dev/null +++ b/source/libs/asura-lib-core/graphics/binding/_shader.cpp @@ -0,0 +1,114 @@ +#include "../shader.h" + +using namespace Luax; + +namespace AsuraEngine +{ + namespace Graphics + { + + void Shader::RegisterLuaxClass(LuaxState& state) + { + + LuaxEnum EBuiltIn[] = { + {0, 0} + }; + + state.RegisterEnum("EBuiltIn", EBuiltIn); + + } + + void Shader::RegisterLuaxPostprocess(LuaxState& state) + { + + } + + /// + /// 将此shader设置为活动。 + /// + int Shader::l_Use(lua_State* L) + { + LUAX_STATE(L); + + } + + /// + /// 将此shader设置为非活动。 + /// + int Shader::l_Unuse(lua_State* L) + { + LUAX_STATE(L); + + } + + /// + /// 从着色器代码中构建shader程序。如果成功返回true,失败返回false。 + /// + int Shader::l_Load(lua_State* L) + { + LUAX_STATE(L); + + } + + /// + /// 判断shader是否有这个uniform,如果有返回true,否则返回false + /// + int Shader::l_HasUniform(lua_State* L) + { + LUAX_STATE(L); + + } + + /// + /// 后的uniforms的location,如果没有这个uniform,返回nil,否则返回对应的loc + /// + int Shader::l_GetUniformLocation(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetBuiltInUniforms(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformFloat(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformTexture(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformVector2(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformVector3(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformVector4(lua_State* L) + { + LUAX_STATE(L); + + } + + int Shader::l_SetUniformColor(lua_State* L) + { + LUAX_STATE(L); + + } + + } +} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp b/source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/graphics/binding/_window.cpp b/source/libs/asura-lib-core/graphics/binding/_window.cpp new file mode 100644 index 0000000..3befc8c --- /dev/null +++ b/source/libs/asura-lib-core/graphics/binding/_window.cpp @@ -0,0 +1,11 @@ +#include "../Window.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + + + } +} diff --git a/source/libs/asura-lib-core/graphics/binding/canvas.binding.cpp b/source/libs/asura-lib-core/graphics/binding/canvas.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/color.binding.cpp b/source/libs/asura-lib-core/graphics/binding/color.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/gif.binding.cpp b/source/libs/asura-lib-core/graphics/binding/gif.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/image.binding.cpp b/source/libs/asura-lib-core/graphics/binding/image.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp b/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp deleted file mode 100644 index 72e33da..0000000 --- a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "../image_data.h" - -using namespace Luax; - -namespace AsuraEngine -{ - namespace Graphics - { - - LUAX_REGISTRY(ImageData) - { - - } - - LUAX_POSTPROCESS(ImageData) - { - LUAX_REGISTER_ENUM(state, "EBlendMode", - { "Additive", 1 } - ); - LUAX_REGISTER_ENUM(state, "EPixelFormat", - { "RGBA32", 1 } - ); - } - - // imagedata = ImageData.New(databuffer) - LUAX_IMPL_METHOD(ImageData, _New) - { - LUAX_STATE(L); - - Filesystem::DataBuffer* db = state.CheckUserdata(1); - ImageData* image = new ImageData(*db); - image->PushLuaxUserdata(state); - return 1; - } - - LUAX_IMPL_METHOD(ImageData, _GetPixel) - { - - } - - LUAX_IMPL_METHOD(ImageData, _GetSize) - { - - } - - LUAX_IMPL_METHOD(ImageData, _GetWidth) - { - - } - - LUAX_IMPL_METHOD(ImageData, _GetHeight) - { - - } - - LUAX_IMPL_METHOD(ImageData, _GetPixelFormat) - { - - } - - } -} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/mesh2d.binding.cpp b/source/libs/asura-lib-core/graphics/binding/mesh2d.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/mesh2d_data.binding.cpp b/source/libs/asura-lib-core/graphics/binding/mesh2d_data.binding.cpp deleted file mode 100644 index 6e15052..0000000 --- a/source/libs/asura-lib-core/graphics/binding/mesh2d_data.binding.cpp +++ /dev/null @@ -1,9 +0,0 @@ -namespace AsuraEngine -{ - namespace Graphics - { - - - - } -} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/shader.binding.cpp b/source/libs/asura-lib-core/graphics/binding/shader.binding.cpp deleted file mode 100644 index 2f2f507..0000000 --- a/source/libs/asura-lib-core/graphics/binding/shader.binding.cpp +++ /dev/null @@ -1,114 +0,0 @@ -#include "../shader.h" - -using namespace Luax; - -namespace AsuraEngine -{ - namespace Graphics - { - - void Shader::RegisterLuaxClass(LuaxState& state) - { - - LuaxEnum EBuiltIn[] = { - {0, 0} - }; - - state.RegisterEnum("EBuiltIn", EBuiltIn); - - } - - void Shader::RegisterLuaxPostprocess(LuaxState& state) - { - - } - - /// - /// 将此shader设置为活动。 - /// - int Shader::l_Use(lua_State* L) - { - LUAX_STATE(L); - - } - - /// - /// 将此shader设置为非活动。 - /// - int Shader::l_Unuse(lua_State* L) - { - LUAX_STATE(L); - - } - - /// - /// 从着色器代码中构建shader程序。如果成功返回true,失败返回false。 - /// - int Shader::l_Load(lua_State* L) - { - LUAX_STATE(L); - - } - - /// - /// 判断shader是否有这个uniform,如果有返回true,否则返回false - /// - int Shader::l_HasUniform(lua_State* L) - { - LUAX_STATE(L); - - } - - /// - /// 后的uniforms的location,如果没有这个uniform,返回nil,否则返回对应的loc - /// - int Shader::l_GetUniformLocation(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetBuiltInUniforms(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformFloat(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformTexture(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformVector2(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformVector3(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformVector4(lua_State* L) - { - LUAX_STATE(L); - - } - - int Shader::l_SetUniformColor(lua_State* L) - { - LUAX_STATE(L); - - } - - } -} \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/binding/sprite_batch.binding.cpp b/source/libs/asura-lib-core/graphics/binding/sprite_batch.binding.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/graphics/binding/window.binding.cpp b/source/libs/asura-lib-core/graphics/binding/window.binding.cpp deleted file mode 100644 index 3befc8c..0000000 --- a/source/libs/asura-lib-core/graphics/binding/window.binding.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "../Window.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - - - } -} diff --git a/source/libs/asura-lib-core/graphics/image.h b/source/libs/asura-lib-core/graphics/image.h index 2dd3a4a..d8577ad 100644 --- a/source/libs/asura-lib-core/graphics/image.h +++ b/source/libs/asura-lib-core/graphics/image.h @@ -69,8 +69,10 @@ namespace AsuraEngine LUAX_DECL_METHOD(l_GetSize); }; - + } } +namespace AEGraphics = AsuraEngine::Graphics; + #endif \ No newline at end of file diff --git a/source/libs/asura-lib-core/graphics/stb_decoder.cpp b/source/libs/asura-lib-core/graphics/stb_decoder.cpp index b14d0f3..a13d6b8 100644 --- a/source/libs/asura-lib-core/graphics/stb_decoder.cpp +++ b/source/libs/asura-lib-core/graphics/stb_decoder.cpp @@ -1,6 +1,6 @@ -#include "STBDecoder.h" +#include -#include "Exceptions/Exception.h" +#include "stb_decoder.h" #include "stb/stb_image.h" namespace AsuraEngine diff --git a/source/libs/asura-lib-core/input/cursor.h b/source/libs/asura-lib-core/input/cursor.h index da4a765..a8e53a6 100644 --- a/source/libs/asura-lib-core/input/cursor.h +++ b/source/libs/asura-lib-core/input/cursor.h @@ -4,16 +4,18 @@ #include -#include "Scripting/Portable.h" -#include "Graphics/ImageData.h" -#include "InputDevice.hpp" +#include + +#include "../graphics/image_data.h" + +#include "input_device.hpp" namespace AsuraEngine { namespace Input { - class Cursor : public Scripting::Portable + class Cursor ASURA_FINAL : public AEScripting::Portable { public: @@ -29,6 +31,8 @@ namespace AsuraEngine CursorType GetType() const; SystemCursor GetSystemType() const; + LUAX_DECL_FACTORY(Cursor); + private: SDL_Cursor* mCursorHandle; @@ -36,17 +40,6 @@ namespace AsuraEngine CursorType mType; SystemCursor mSystemType; - public: - - //---------------------------------------------------------------------------------------------------------- - - LUAX_DECL_FACTORY(Cursor); - - LUAX_DECL_ENUM(EnumCursorType); - LUAX_DECL_ENUM(EnumSystemCursor); - - //---------------------------------------------------------------------------------------------------------- - }; } diff --git a/source/libs/asura-lib-core/input/event.h b/source/libs/asura-lib-core/input/event.h new file mode 100644 index 0000000..a24e806 --- /dev/null +++ b/source/libs/asura-lib-core/input/event.h @@ -0,0 +1,45 @@ +#ifndef __ASURA_ENGINE_EVENT_H__ +#define __ASURA_ENGINE_EVENT_H__ + +namespace AsuraEngine +{ + namespace Input + { + + enum EventType + { + EVENT_BEGIN_MOUSE__ , + EVENT_LEFT_DOWN , + EVENT_LEFT_UP , + EVENT_LEFT_DCLICK , + EVENT_MIDDLE_DOWN , + EVENT_MIDDLE_UP , + EVENT_MIDDLE_DCLICK , + EVENT_RIGHT_DOWN , + EVENT_RIGHT_UP , + EVENT_RIGHT_DCLICK , + EVENT_MOTION , + EVENT_END_MOUSE__ , + EVENT_ENTER_WINDOW , + EVENT_LEAVE_WINDOW , + EVENT_MOUSEWHEEL + }; + + struct Event + { + int type; + union + { + // 鼠标按键事件 + struct { + int id; + } button; + }; + }; + + } +} + +namespace AEInput = AsuraEngine::Input; + +#endif \ No newline at end of file diff --git a/source/libs/asura-lib-core/input/input_device.hpp b/source/libs/asura-lib-core/input/input_device.hpp index eb0b7a3..46f5be8 100644 --- a/source/libs/asura-lib-core/input/input_device.hpp +++ b/source/libs/asura-lib-core/input/input_device.hpp @@ -1,9 +1,10 @@ #ifndef __ASURA_ENGINE_INPUT_BASE_H__ #define __ASURA_ENGINE_INPUT_BASE_H__ -#include "Scripting/Portable.h" -#include "Config.h" -#include "Singleton.hpp" +#include + +#include "../core_config.h" +#include "../singleton.hpp" namespace AsuraEngine { @@ -15,7 +16,7 @@ namespace AsuraEngine /// template ASURA_ABSTRACT class InputDevice - : virtual public Scripting::Portable + : virtual public Scripting::Portable , virtual public Singleton { public: diff --git a/source/libs/asura-lib-core/input/joypad.h b/source/libs/asura-lib-core/input/joypad.h new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/input/mouse.defs b/source/libs/asura-lib-core/input/mouse.defs new file mode 100644 index 0000000..de1d117 --- /dev/null +++ b/source/libs/asura-lib-core/input/mouse.defs @@ -0,0 +1,7 @@ + +enum MouseButton +{ + MOUSE_BUTTON_LEFT, + MOUSE_BUTTON_MIDDLE, + MOUSE_BUTTON_RIGHT, +}; diff --git a/source/libs/asura-lib-core/manager.hpp b/source/libs/asura-lib-core/manager.hpp deleted file mode 100644 index 7b4e272..0000000 --- a/source/libs/asura-lib-core/manager.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __ASURA_ENGINE_MANAGER_H__ -#define __ASURA_ENGINE_MANAGER_H__ - -namespace AsuraEngine -{ - - class Manager - { - - }; - -} - -#endif \ No newline at end of file diff --git a/source/libs/asura-lib-core/singleton.hpp b/source/libs/asura-lib-core/singleton.hpp deleted file mode 100644 index 756209a..0000000 --- a/source/libs/asura-lib-core/singleton.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __ASURA_SINGLETON_H__ -#define __ASURA_SINGLETON_H__ - -#include "Config.h" - -namespace AsuraEngine -{ - - /// - /// 继承Singleton的类在第一次实例化时保存实例,之后如果再次实例化会报错。 - /// - template - class Singleton - { - public: - - static T* Get() - { - // 如果之前没有创建,在这里立即创建一个并保存 - if (!instance) instance = new T; - // 返回实例 - return instance; - } - - static void Destroy() - { - delete instance; - instance = nullptr; - } - - protected: - - Singleton() - { - // 如果有instance,意味着又创建了一个实例,这是错误的。 - ASSERT(!instance); - // 否则,将本实体作为实例 - instance = static_cast(this); - }; - - virtual ~Singleton() {}; - - static T* instance; - - private: - - Singleton(const Singleton& singleton); - - Singleton& operator = (const Singleton& singleton); - - }; - - // 实例初始化为空 - template - T* Singleton::instance = nullptr; - -} - -#endif // __ASURA_SINGLETON_H__ \ No newline at end of file diff --git a/source/libs/asura-lib-core/stringmap.cpp b/source/libs/asura-lib-core/stringmap.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/source/libs/asura-lib-core/stringmap.hpp b/source/libs/asura-lib-core/stringmap.hpp deleted file mode 100644 index ddba128..0000000 --- a/source/libs/asura-lib-core/stringmap.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __ASURA_ENGINE_STRINGMAP_H__ -#define __ASURA_ENGINE_STRINGMAP_H__ - -#include - -namespace AsuraEngine -{ - - /// - /// 一个双向一一对应的映射,用来储存shader uniforms、statemathine state parameter的ID。 - /// - template - class StringMap - { - public: - - bool ContainsKey(const key_type& key); - - bool ContainsString(const String& str); - - std::string GetStringByKey(const key_type& key); - - key_type GetKeyByString(const String& str); - - }; - -} - -#endif \ No newline at end of file diff --git a/source/libs/asura-lib-core/threading/binding/_coroutine.cpp b/source/libs/asura-lib-core/threading/binding/_coroutine.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/threading/binding/_thread.cpp b/source/libs/asura-lib-core/threading/binding/_thread.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/threading/coroutine.cpp b/source/libs/asura-lib-core/threading/coroutine.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/threading/coroutine.h b/source/libs/asura-lib-core/threading/coroutine.h new file mode 100644 index 0000000..f511e48 --- /dev/null +++ b/source/libs/asura-lib-core/threading/coroutine.h @@ -0,0 +1,27 @@ +#ifndef __ASURA_COROUTINE_H__ +#define __ASURA_COROUTINE_H__ + +#include + +namespace AsuraEngine +{ + namespace Threading + { + + class Coroutine ASURA_FINAL + : public AEScripting::Portable + { + public: + + LUAX_DECL_FACTORY(Coroutine); + + private: + + + + }; + + } +} + +#endif \ No newline at end of file diff --git a/source/libs/asura-lib-core/threading/thread.cpp b/source/libs/asura-lib-core/threading/thread.cpp new file mode 100644 index 0000000..e69de29 diff --git a/source/libs/asura-lib-core/threading/thread.h b/source/libs/asura-lib-core/threading/thread.h new file mode 100644 index 0000000..e69de29 -- cgit v1.1-26-g67d0