diff options
author | chai <chaifix@163.com> | 2019-08-08 08:56:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-08 08:56:51 +0800 |
commit | 6a065c913e9308cc72e1ad0723b6167048f439b6 (patch) | |
tree | 58cb4f28113949469c56584e32a510713ddbc2c1 /Source/modules/asura-base/FileSystem/IOTask.h | |
parent | 0c391fdbce5a079cf03e483eb6174dd47806163d (diff) |
*misc
Diffstat (limited to 'Source/modules/asura-base/FileSystem/IOTask.h')
-rw-r--r-- | Source/modules/asura-base/FileSystem/IOTask.h | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/Source/modules/asura-base/FileSystem/IOTask.h b/Source/modules/asura-base/FileSystem/IOTask.h index da54fdc..c2a22ba 100644 --- a/Source/modules/asura-base/FileSystem/IOTask.h +++ b/Source/modules/asura-base/FileSystem/IOTask.h @@ -8,49 +8,47 @@ #include "DataBuffer.h" -namespace AsuraEngine -{ - namespace FileSystem - { - - enum IOTaskType - { - IOTASK_TYPE_READ, - IOTASK_TYPE_WRITE, - IOTASK_TYPE_APPEND, - }; +namespace_begin(AsuraEngine) +namespace_begin(FileSystem) - /// - /// ȡļ - /// - class IOTask ASURA_FINAL - : public AEScripting::Portable<IOTask, AEThreading::Task> - { - public: +enum IOTaskType +{ + IOTASK_TYPE_READ, + IOTASK_TYPE_WRITE, + IOTASK_TYPE_APPEND, +}; + +/// +/// ȡļ +/// +class IOTask ASURA_FINAL + : public AEScripting::Portable<IOTask, AEThreading::Task> +{ +public: - LUAX_DECL_FACTORY(IOTask); + LUAX_DECL_FACTORY(IOTask); - IOTask(const std::string& path, DataBuffer* buffer, IOTaskType type); - ~IOTask(); + IOTask(const std::string& path, DataBuffer* buffer, IOTaskType type); + ~IOTask(); - bool Execute() override ; - void Invoke(lua_State* invokeThreaad) override; + bool Execute() override ; + void Invoke(lua_State* invokeThreaad) override; - private: +private: - LUAX_DECL_ENUM(IOTaskType); + LUAX_DECL_ENUM(IOTaskType); - LUAX_DECL_METHOD(_New); + LUAX_DECL_METHOD(_New); - std::string m_Path; - IOTaskType m_Type; + std::string m_Path; + IOTaskType m_Type; - DataBuffer* m_Buffer; - Luax::LuaxMemberRef m_BufferRef; + DataBuffer* m_Buffer; + Luax::LuaxMemberRef m_BufferRef; - }; +}; - } -} +namespace_end +namespace_end #endif
\ No newline at end of file |