summaryrefslogtreecommitdiff
path: root/Runtime/FileSystem/FileJobs.h
blob: cae5341597d1c4a057449c51137589044af159dc (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
26
#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; // 完成后的回调函数

};