2024-08-04 10:24:11 +03:00

22 lines
520 B
C++

#ifndef INTERFACES_TASK_HPP_
#define INTERFACES_TASK_HPP_
#include <typedefs.hpp>
/// @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_