summaryrefslogtreecommitdiff
path: root/task.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
commit19195e2bbdcd7a0db8f84732ce54b1c9d07c006c (patch)
treeb974b648ebacd645fbee000575268326f3b7bfbc /task.h
parentf6f5f31067cdee2d7003d8209361ac9e5b6975c5 (diff)
Make task an abstract class and make CC and LD versions of it.
Diffstat (limited to 'task.h')
-rw-r--r--task.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/task.h b/task.h
index bdd881b..443b6b7 100644
--- a/task.h
+++ b/task.h
@@ -3,33 +3,13 @@
#include <vector>
#include <string>
-#include <future>
-#include <filesystem>
-
-struct BuildConfiguration;
-struct Settings;
class Task
{
public:
- Task(const BuildConfiguration& config,
- const Settings& settings,
- const std::string& source);
-
- bool dirty();
-
- int run();
- int clean();
-
- std::vector<std::string> depends() const;
-
- std::string target() const;
-
-private:
- std::filesystem::path sourceFile;
- std::filesystem::path targetFile;
- std::filesystem::path depsFile;
-
- const BuildConfiguration& config;
- const Settings& settings;
+ virtual bool dirty() = 0;
+ virtual int run() = 0;
+ virtual int clean() = 0 ;
+ virtual std::vector<std::string> depends() const = 0;
+ virtual std::string target() const = 0;
};