5 #include <msp/parser/loader.h>
6 #include <msp/path/path.h>
9 #include "packageref.h"
14 Components specify things to be built. Each component may build one binary (it
15 may also build none), as well as install a bunch of headers. Components inherit
16 dependencies and build info from the package they belong to, and may also add
22 /// Loads a Component from file. Used from Package::Loader.
23 class Loader: public Msp::Parser::Loader
27 Component &get_object() { return comp; }
31 void source(const std::string &);
32 void require(const std::string &);
44 Component(Package &, Type, const std::string &);
45 const Package &get_package() const { return pkg; }
46 Type get_type() const { return type; }
47 const std::string &get_name() const { return name; }
48 const PathList &get_sources() const { return sources; }
49 const BuildInfo &get_build_info() const { return build_info; }
50 bool get_install() const { return install; }
51 const std::string &get_install_headers() const { return install_headers; }
52 const PkgRefList &get_requires() const { return requires; }
54 void create_build_info();
61 std::string install_headers;
65 typedef std::list<Component> ComponentList;