From 19195e2bbdcd7a0db8f84732ce54b1c9d07c006c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 13 Jun 2021 18:24:16 +0200 Subject: Make task an abstract class and make CC and LD versions of it. --- task.h | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'task.h') diff --git a/task.h b/task.h index bdd881b..443b6b7 100644 --- a/task.h +++ b/task.h @@ -3,33 +3,13 @@ #include #include -#include -#include - -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 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 depends() const = 0; + virtual std::string target() const = 0; }; -- cgit v1.2.3