]> git.tdb.fi Git - builder.git/blobdiff - source/install.h
Rework the Target class hierarchy
[builder.git] / source / install.h
index b81ac9ba4f482be92cca29c399d130476a5a1424..764d9a19bc20f8547ed484e281974eb840c32931 100644 (file)
@@ -1,17 +1,33 @@
+/* $Id$
+
+This file is part of builder
+Copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #ifndef INSTALL_H_
 #define INSTALL_H_
 
-#include "target.h"
+#include "sourcepackage.h"
+#include "filetarget.h"
 
-class Install: public Target
+/**
+Represents the installation of a file.
+*/
+class Install: public FileTarget
 {
+private:
+       FileTarget &source;
+
 public:
-       Install(Builder &, const Package &, Target &, const std::string &);
-       const char *get_type() const { return "Install"; }
-       void find_depends() { }
-       void check_rebuild();
-       Action *build();
+       Install(Builder &, const SourcePackage &, FileTarget &);
+       virtual const char *get_type() const { return "Install"; }
+       FileTarget &get_source() const { return source; }
 private:
+       virtual void check_rebuild();
+       virtual Action *create_action();
+
+       static Msp::FS::Path generate_target_path(const FileTarget &);
 };
 
 #endif