]> git.tdb.fi Git - builder.git/blobdiff - source/tar.h
Add support for statically linking the C++ standard library
[builder.git] / source / tar.h
index 137a7ee00969af8bcaa78307e614ee511fa0b63b..9be26d9debcac1303259c766575d06e2e9ad96bf 100644 (file)
@@ -1,45 +1,33 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef TAR_H_
 #define TAR_H_
 
 #include <msp/core/thread.h>
-#include "action.h"
-#include "misc.h"
+#include "internaltask.h"
+#include "tool.h"
 
 class TarBall;
 
-class Tar: public Action
+class Tar: public Tool
 {
-public:
-       Tar(Builder &, const TarBall &);
-       ~Tar();
-
-       virtual int check();
 private:
-       class Worker: public Msp::Thread
+       class Worker: public InternalTask::Worker
        {
-       public:
-               Worker(Tar &);
-               bool get_done() const { return done; }
-               bool get_error() const { return error; }
        private:
-               Tar &tar;
-               bool done;
-               bool error;
+               const TarBall &tarball;
 
-               void main();
+       public:
+               Worker(const TarBall &);
+
+       private:
+               virtual void main();
                void store_number(char *, unsigned, unsigned);
        };
 
-       const TarBall &tarball;
-       StringList files;
-       Worker *worker;
+public:
+       Tar(Builder &);
+
+       virtual Target *create_target(const std::list<Target *> &, const std::string &);
+       virtual Task *run(const Target &) const;
 };
 
 #endif