summaryrefslogtreecommitdiff
path: root/Runtime/FileSystem/FileJobs.h
blob: 1fe49f1362d31f2cf7c76d0ee9a6f31ea81ff4d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <vector>
#include "Runtime/Threading/Job.h"
#include "Runtime/Lua/LuaHelper.h"
#include "Runtime/Threading/JobSystem.h"

class ReadFilesJob : public Job
{
public:
	ReadFilesJob(LuaBind::VM* vm) 
        : callback(vm), cur(0) 
    {
    }
	~ReadFilesJob() {}

	void Dispacth(void* param) override;
	void Process() override;
	bool IsFinished() override;

	int cur = 0; //当前处理的文件
	std::vector<std::string> files; // 文件路径
	LuaBind::StrongRef callback; // 完成后的回调函数

};