mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
Task interface
This commit is contained in:
parent
84c7c16860
commit
c1ab97eb15
5 changed files with 102 additions and 28 deletions
19
src/interfaces/Task.h
Normal file
19
src/interfaces/Task.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef INTERFACES_TASK_H_
|
||||
#define INTERFACES_TASK_H_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
/// @brief Task is a finite process interface.
|
||||
/// 'work' is a metric of task progress/remaining work (jobs/bytes/something other)
|
||||
class Task {
|
||||
public:
|
||||
virtual ~Task() {}
|
||||
|
||||
virtual uint getWorkRemaining() const = 0;
|
||||
virtual uint getWorkDone() const = 0;
|
||||
virtual void update() = 0;
|
||||
virtual void terminate() = 0;
|
||||
};
|
||||
|
||||
#endif // INTERFACES_TASK_H_
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue