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;
}
Exemple #2
0
model workflow::
make_model(const formatters::repository& frp, const yarn::model& m) const {
    model r;
    r.name(m.name());

    transformer t;
    r.formattables(t.transform(frp, m));

    return r;
}
Exemple #3
0
model workflow::execute(
    const options::knitting_options& ko,
    const annotations::type_repository& atrp,
    const annotations::annotation& ra,
    const dogen::formatters::decoration_properties_factory& dpf,
    const formatters::repository& frp, const bool enable_kernel_directories,
    const yarn::model& m) const {

    auto r(make_model(frp, m));
    const auto odp(ko.output_directory_path());
    const auto rkd(enable_kernel_directories);
    const locator l(odp, atrp, frp, ra, m.name(), m.module_ids(), rkd);
    expand_model(atrp, ra, dpf, frp, l, r);

    return r;
}