{
add("build_info", &Loader::build_info);
add("description", &SourcePackage::description);
+ add("export", &Loader::exported);
add("feature", &Loader::feature);
add("generate", &Loader::generate);
add("install", &Loader::component<InstallComponent>);
}
}
+void SourcePackage::Loader::exported()
+{
+ ExportLoader ldr(obj);
+ load_sub_with(ldr);
+}
+
void SourcePackage::Loader::feature(const string &n, const string &d)
{
Feature feat(n);
break;
obj.interface_version = obj.version.substr(0, i);
}
+
+
+SourcePackage::ExportLoader::ExportLoader(SourcePackage &p):
+ ObjectLoader<SourcePackage>(p)
+{
+ add("build_info", &ExportLoader::build_info);
+}
+
+void SourcePackage::ExportLoader::build_info()
+{
+ BuildInfo bi;
+ load_sub(bi);
+ obj.build_info.update_from(bi);
+ obj.export_binfo.update_from(bi);
+}
private:
void finish() override;
+ void exported();
void feature(const std::string &, const std::string &);
template<typename C, typename... Args>
void component(Args..., const std::string &);
using ComponentRegistry = Msp::TypeRegistry<Loader::AddComponent, Loader &>;
private:
+ class ExportLoader: public Msp::DataFile::ObjectLoader<SourcePackage>
+ {
+ public:
+ ExportLoader(SourcePackage &);
+
+ private:
+ void build_info();
+ };
+
std::string version;
std::string interface_version;
std::string description;