7 #include "libbuilder_api.h"
12 A container for tools. Performs lookup based on tag or filename extension.
14 class LIBBUILDER_API Toolchain
19 std::map<std::string, Tool *> tools;
20 std::vector<Toolchain *> chains;
23 Toolchain(const std::string &n, unsigned p): name(n), priority(p) { }
25 Toolchain() = default;
28 const std::string &get_name() const { return name; }
29 int get_priority() const { return priority; }
30 void add_tool(Tool *);
31 void add_toolchain(Toolchain *);
32 bool has_tool(const std::string &) const;
33 Tool &get_tool(const std::string &) const;
34 Tool *get_tool_for_suffix(const std::string &, bool = false) const;
35 const std::vector<Toolchain *> &get_toolchains() { return chains; }