19 lines
373 B
C
19 lines
373 B
C
|
|
#ifndef CONTROLLABLETASK_H
|
|||
|
|
#define CONTROLLABLETASK_H
|
|||
|
|
/** From answer by Hatter
|
|||
|
|
*
|
|||
|
|
* https://stackoverflow.com/questions/5423058/qfuture-that-can-be-cancelled-and-report-progress
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include "TaskControl.h"
|
|||
|
|
|
|||
|
|
template <class T>
|
|||
|
|
class ControllableTask
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
virtual ~ControllableTask() {}
|
|||
|
|
virtual T run(TaskControl& control) = 0;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // CONTROLLABLETASK_H
|