]> git.tdb.fi Git - builder.git/blobdiff - source/target.h
Convert all list containers to vectors
[builder.git] / source / target.h
index 64a132c9f13a0460f8608695cb632b88f3ed5522..2824e2a806589c4ce4c948b90dcf37a89fe18c36 100644 (file)
@@ -1,14 +1,15 @@
 #ifndef TARGET_H_
 #define TARGET_H_
 
-#include <list>
 #include <map>
 #include <set>
 #include <string>
+#include <vector>
 #include <sigc++/signal.h>
 #include <msp/time/timestamp.h>
 
 class Builder;
+class BuildInfo;
 class Component;
 class SourcePackage;
 class Task;
@@ -26,7 +27,7 @@ dependencies can be used by other targets further down the chain.
 class Target
 {
 public:
-       typedef std::list<Target *> Dependencies;
+       using Dependencies = std::vector<Target *>;
 
 protected:
        enum State
@@ -41,6 +42,7 @@ protected:
 
 public:
        sigc::signal<void> signal_bubble_rebuild;
+       sigc::signal<void> signal_modified;
 
 protected:
        Builder &builder;
@@ -51,7 +53,7 @@ protected:
        Tool *tool;
        State state;
        std::string rebuild_reason;
-       std::list<std::string> problems;
+       std::vector<std::string> problems;
 
        Dependencies depends;
        Dependencies trans_depends;
@@ -113,6 +115,8 @@ public:
        the build() function. */
        const Tool *get_tool() const { return tool; }
 
+       virtual void collect_build_info(BuildInfo &) const;
+
        /** Indicates if it's possible to build this target. */
        bool is_buildable() const { return tool!=0; }
 
@@ -137,7 +141,7 @@ protected:
 public:
        bool is_broken() const { return state==BROKEN; }
 
-       const std::list<std::string> &get_problems() const { return problems; }
+       const std::vector<std::string> &get_problems() const { return problems; }
 
        /** Prepares the target by finding dependencies, recursively preparing them
        and then checking whether rebuilding is needed. */