std::unordered_map<
    std::string,
    inclusion_directives_settings_factory::field_definitions
    >
inclusion_directives_settings_factory::
make_field_definitions(const dynamic::repository& rp,
    const formatters::container& fc) const {
    std::unordered_map<std::string, field_definitions> r;

    for (const auto f : fc.all_external_formatters()) {
        const auto& oh(f->ownership_hierarchy());
        const auto fn(oh.formatter_name());

        if (fn.empty()) {
            BOOST_LOG_SEV(lg, error) << empty_formatter_name;
            BOOST_THROW_EXCEPTION(building_error(empty_formatter_name));
        }

        if (f->file_type() != formatters::file_types::cpp_header) {
            BOOST_LOG_SEV(lg, debug) << "Skipping formatter: " << fn;
            continue;
        }

        r[oh.formatter_name()] = make_field_definitions(rp, fn);
    }
    return r;
}
Пример #2
0
std::unordered_map<std::string, settings::path_settings>
workflow::create_path_settings_activity(const dynamic::repository& rp,
    const dynamic::object& root_object,
    const formatters::container& fc) const {

    BOOST_LOG_SEV(lg, debug) << "Creating path settings for root object.";
    settings::path_settings_factory f(rp, fc.all_external_formatters());
    const auto r(f.make(root_object));
    BOOST_LOG_SEV(lg, debug) << "Created path settings for root object.";
    return r;
}