#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;
class Target
{
public:
- typedef std::list<Target *> Dependencies;
+ using Dependencies = std::vector<Target *>;
protected:
enum State
protected:
Builder &builder;
- const SourcePackage *package;
- const Component *component;
+ const SourcePackage *package = 0;
+ const Component *component = 0;
std::string name;
- Tool *tool;
- State state;
+ Tool *tool = 0;
+ State state = INIT;
std::string rebuild_reason;
- std::list<std::string> problems;
+ std::vector<std::string> problems;
Dependencies depends;
Dependencies trans_depends;
Dependencies side_effects;
- Target *primary_target;
+ Target *primary_target = 0;
Target(Builder &, const std::string &);
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; }
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. */