]> git.tdb.fi Git - builder.git/blobdiff - source/tar.h
Redesign how tools are run
[builder.git] / source / tar.h
index 9be26d9debcac1303259c766575d06e2e9ad96bf..befebb814db6f7e95dd5f58a94ffa66c562e11dc 100644 (file)
@@ -1,33 +1,20 @@
 #ifndef TAR_H_
 #define TAR_H_
 
-#include <msp/core/thread.h>
-#include "internaltask.h"
 #include "tool.h"
 
 class TarBall;
 
 class Tar: public Tool
 {
-private:
-       class Worker: public InternalTask::Worker
-       {
-       private:
-               const TarBall &tarball;
-
-       public:
-               Worker(const TarBall &);
-
-       private:
-               virtual void main();
-               void store_number(char *, unsigned, unsigned);
-       };
-
 public:
        Tar(Builder &);
 
-       virtual Target *create_target(const std::list<Target *> &, const std::string &);
-       virtual Task *run(const Target &) const;
+       Target *create_target(const std::vector<Target *> &, const std::string &) override;
+
+private:
+       static bool _run(const TarBall &);
+       static void store_number(char *, unsigned, unsigned);
 };
 
 #endif