Task interface

This commit is contained in:
MihailRis
2024-04-05 14:19:02 +03:00
parent 84c7c16860
commit c1ab97eb15
5 changed files with 102 additions and 28 deletions
+19
View 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_