X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcopy.h;h=c0a433996a9c0a14625ebf918c9c6092eac6d9e0;hb=d1eb133ab529cdae131be7b150209f03189248f3;hp=dedd0f57a0e3aa41607d67b0f6d16c10c6fa799a;hpb=9e28243c9687608ec3c32954b4031490296ae877;p=builder.git diff --git a/source/copy.h b/source/copy.h index dedd0f5..c0a4339 100644 --- a/source/copy.h +++ b/source/copy.h @@ -1,9 +1,6 @@ #ifndef COPY_H_ #define COPY_H_ -#include -#include -#include "internaltask.h" #include "tool.h" class InstalledFile; @@ -13,26 +10,14 @@ 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 ⌖ - - public: - Worker(const InstalledFile &); - private: - virtual void main(); - }; - public: - Copy(Builder &); + Copy(Builder &b): Tool(b, "CP") { } - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::vector &, const std::string &) override; + Task *run(const Target &) const override; + +private: + static bool _run(const InstalledFile &); }; #endif