+ /** Associate the task with a file. */
+ void set_file(const Msp::FS::Path &);
+
+ /** If set to true, the associated file is removed before the task is
+ started. */
+ void set_unlink(bool = true);
+
+ /** Returns the command being executed for this task. Only makes sense if
+ an external command is involved. */
+ virtual std::string get_command() const = 0;
+
+ /// Starts the task.
+ virtual void start() = 0;
+
+protected:
+ /** Ensures that the output directory exists and removes the file if
+ necessary. */
+ void prepare();
+
+public:
+ /// Checks the status of the task and immediately returns.