]> git.tdb.fi Git - builder.git/blobdiff - source/copy.h
Redesign how tools are run
[builder.git] / source / copy.h
index dedd0f57a0e3aa41607d67b0f6d16c10c6fa799a..d65bb05a0c70e62b87382cea20fb16950b8b5061 100644 (file)
@@ -1,9 +1,6 @@
 #ifndef COPY_H_
 #define COPY_H_
 
-#include <msp/core/thread.h>
-#include <msp/fs/path.h>
-#include "internaltask.h"
 #include "tool.h"
 
 class InstalledFile;
@@ -13,26 +10,13 @@ Copies a file to another place.  Used by the InstalledFile target.
 */
 class Copy: public Tool
 {
-private:
-       /**
-       A worker thread that actually does the data transfer.
-       */
-       class Worker: public InternalTask::Worker
-       {
-       private:
-               const InstalledFile &target;
-
-       public:
-               Worker(const InstalledFile &);
-       private:
-               virtual void main();
-       };
-
 public:
        Copy(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 InstalledFile &);
 };
 
 #endif