inclusion_directives_repository inclusion_directives_repository_factory::make( const dynamic::repository& srp, const formatters::container& fc, const path_derivatives_repository& pdrp, const yarn::model& m) const { BOOST_LOG_SEV(lg, debug) << "Making inclusion directives repository."; const inclusion_directives_factory f(srp, fc, pdrp); generator g(f); for (const auto& pair : m.elements()) { const auto& e(*pair.second); e.accept(g); } yarn::name_factory nf; const auto n(nf.build_element_in_model(m.name(), registrar_name)); const auto o = dynamic::object(); g.generate(o, n); for (const auto& pair : m.references()) { const auto origin_type(pair.second); if (origin_type == yarn::origin_types::system) continue; const auto ref(pair.first); const auto n(nf.build_element_in_model(ref, registrar_name)); g.generate(o, n); } const auto r(g.result()); BOOST_LOG_SEV(lg, debug) << "Finished inclusion directives repository:" << r; return r; }
std::forward_list<std::shared_ptr<formattables::formattable> > workflow::from_transformer_activity(const yarn::model& m) const { BOOST_LOG_SEV(lg, debug) << "Transforming formattables."; const transformer t(m); generator g(t); for (const auto& pair : m.elements()) { const auto& e(*pair.second); e.accept(g); } BOOST_LOG_SEV(lg, debug) << "Finished transforming formattables."; return g.result(); }