bundle_repository bundle_repository_factory:: make(const dynamic::repository& rp, const dynamic::object& root_object, const dogen::formatters::general_settings_factory& gsf, const opaque_settings_builder& osb, const sml::model& m) const { BOOST_LOG_SEV(lg, debug) << "Creating settings bundle repository."; const bundle_factory f(rp, root_object, gsf, osb); generator g(f); sml::all_model_items_traversal(m, g); auto r(g.result()); // FIXME: hack to handle registars. sml::qname qn; qn.simple_name(registrar_name); qn.model_name(m.name().model_name()); qn.external_module_path(m.name().external_module_path()); const auto pair(std::make_pair(qn, f.make())); auto& deps(r.bundles_by_qname()); const auto res(deps.insert(pair)); if (!res.second) { const auto n(sml::string_converter::convert(qn)); BOOST_LOG_SEV(lg, error) << duplicate_qname << n; BOOST_THROW_EXCEPTION(building_error(duplicate_qname + n)); } BOOST_LOG_SEV(lg, debug) << "Finished creating settings bundle repository." << r; return r; }
std::list<content_descriptor> content_descriptor_factory::create(const sml::model& m) const { std::list<content_descriptor> r; using config::cpp_facet_types; const auto ft(cpp_facet_types::types); const auto at(aspect_types::main); const auto header(file_types::header); const auto ct(content_types::namespace_doc); r.push_back(content_descriptor(header, ft, at, m.name(), ct)); return r; }