+ comp.sources.push_back(comp.pkg.get_source()/s);
+}
+
+void Component::Loader::require(const string &n)
+{
+ comp.requires.push_back(PackageRef(comp.pkg.get_builder(), n));
+}
+
+void Component::Loader::modular()
+{
+ if(comp.type!=PROGRAM)
+ throw Msp::Exception("Only programs can be modular");
+ comp.modular=true;
+}
+
+void Component::Loader::host(const string &n)
+{
+ const ComponentList &comps=comp.pkg.get_components();
+ for(ComponentList::const_iterator i=comps.begin(); i!=comps.end(); ++i)
+ if(i->get_name()==n)
+ {
+ if(i->get_type()!=PROGRAM || !i->get_modular())
+ throw Msp::Exception("Module host must be a modular program");
+ comp.module_host=&*i;
+ return;
+ }
+
+ throw Msp::Exception("Unknown component");
+}
+
+void Component::Loader::build_info()
+{
+ load_sub(comp.build_info);