This commit is contained in:
MihailRis
2024-04-23 18:43:02 +03:00
parent 67f34ceb8c
commit 051f0b8c6a
35 changed files with 61 additions and 62 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef INTERFACES_TASK_HPP_
#define INTERFACES_TASK_HPP_
#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 bool isActive() const = 0;
virtual uint getWorkTotal() const = 0;
virtual uint getWorkDone() const = 0;
virtual void update() = 0;
virtual void waitForEnd() = 0;
virtual void terminate() = 0;
};
#endif // INTERFACES_TASK_HPP_