diff options
author | chai <chaifix@163.com> | 2019-03-27 22:18:14 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-27 22:18:14 +0800 |
commit | 69f7d1bd745ed5680b9bc4e3cfdd882ff2a5ad26 (patch) | |
tree | 729e563da8fea6cf8c5455f3afdb3c6ce0aecde4 /source/libs/asura-lib-utils/io/binding/_io_task.cpp | |
parent | 66c5fdc564dd892ed265132d6c1378dbe3cebcee (diff) |
+threading
Diffstat (limited to 'source/libs/asura-lib-utils/io/binding/_io_task.cpp')
-rw-r--r-- | source/libs/asura-lib-utils/io/binding/_io_task.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/libs/asura-lib-utils/io/binding/_io_task.cpp b/source/libs/asura-lib-utils/io/binding/_io_task.cpp new file mode 100644 index 0000000..c03ff2a --- /dev/null +++ b/source/libs/asura-lib-utils/io/binding/_io_task.cpp @@ -0,0 +1,36 @@ +#include "../io_task.h" + +using namespace std; + +namespace AsuraEngine +{ + namespace IO + { + + LUAX_REGISTRY(IOTask) + { + LUAX_REGISTER_METHODS(state, + { "New", _New } + ); + } + + LUAX_POSTPROCESS(IOTask) + { + + } + + // task = IOTask.New(path, dst) + LUAX_IMPL_METHOD(IOTask, _New) + { + LUAX_STATE(L); + + cc8* path = state.CheckParam<cc8*>(1); + DataBuffer* db = state.CheckUserdata<DataBuffer>(2); + IOTask* task = new IOTask(path, db); + task->PushLuaxUserdata(state); + task->SetLuaxMemberRef(state, task->mDstRef, 2); + return 1; + } + + } +} |