]> git.tdb.fi Git - builder.git/blobdiff - source/compilecommandsgenerator.h
Refactor InternalTask to take a functor
[builder.git] / source / compilecommandsgenerator.h
index 519cad03e7f58f8ebbf479b0910f6e24c9bea5d7..e3116f9c839312e5930c56d0c5342c9ea2805a03 100644 (file)
@@ -1,31 +1,20 @@
 #ifndef COMPILECOMMANDSGENERATOR_H_
 #define COMPILECOMMANDSGENERATOR_H_
 
-#include "internaltask.h"
 #include "tool.h"
 
 class CompileCommandsJson;
 
 class CompileCommandsGenerator: public Tool
 {
-private:
-       class Worker: public InternalTask::Worker
-       {
-       private:
-               const CompileCommandsJson ⌖
-
-       public:
-               Worker(const CompileCommandsJson &);
-
-       private:
-               void main() override;
-       };
-
 public:
-       CompileCommandsGenerator(Builder &);
+       CompileCommandsGenerator(Builder &b): Tool(b, "CCJG") { }
 
        Target *create_target(const std::vector<Target *> &, const std::string &) override;
        Task *run(const Target &) const override;
+
+private:
+       static bool _run(const CompileCommandsJson &);
 };
 
 #endif