From c302f5ae5f9e30a28e487e8a764d9cc31546bbea Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 22:51:04 +0800 Subject: *rename --- .../libs/asura-lib-utils/io/binding/_io_task.cpp | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 source/libs/asura-lib-utils/io/binding/_io_task.cpp (limited to 'source/libs/asura-lib-utils/io/binding/_io_task.cpp') diff --git a/source/libs/asura-lib-utils/io/binding/_io_task.cpp b/source/libs/asura-lib-utils/io/binding/_io_task.cpp deleted file mode 100644 index b3c5988..0000000 --- a/source/libs/asura-lib-utils/io/binding/_io_task.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "../io_task.h" - -using namespace std; - -namespace AsuraEngine -{ - namespace IO - { - - LUAX_REGISTRY(IOTask) - { - LUAX_REGISTER_METHODS(state, - { "New", _New } - ); - } - - LUAX_POSTPROCESS(IOTask) - { - LUAX_REGISTER_ENUM(state, "EIOTaskType", - { "READ", IOTASK_TYPE_READ }, - { "WRITE", IOTASK_TYPE_WRITE }, - { "APPEND", IOTASK_TYPE_APPEND } - ); - - } - - // task = IOTask.New(path, buffer, type, callback) - LUAX_IMPL_METHOD(IOTask, _New) - { - LUAX_STATE(L); - - cc8* path = state.CheckValue(1); - DataBuffer* db = state.CheckUserdata(2); - IOTaskType type = (IOTaskType)state.CheckValue(3); - bool cbk = state.GetTop() >= 4 && state.IsType(4, LUA_TFUNCTION); - - IOTask* task = new IOTask(path, db, type); - task->SetLuaxMemberRef(state, task->mBufferRef, 2); - if(cbk) - task->SetLuaxMemberRef(state, task->mCallback, 4); - task->PushLuaxUserdata(state); - return 1; - } - - } -} -- cgit v1.1-26-g67d0