本文整理汇总了C++中intermediate_model::origin_type方法的典型用法代码示例。如果您正苦于以下问题:C++ intermediate_model::origin_type方法的具体用法?C++ intermediate_model::origin_type怎么用?C++ intermediate_model::origin_type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类intermediate_model
的用法示例。
在下文中一共展示了intermediate_model::origin_type方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: inject_global_module
void containment_expander::inject_global_module(intermediate_model& im) {
BOOST_LOG_SEV(lg, debug) << "Injecting global module for: "
<< im.name().id();
const auto gm(create_global_module(im.origin_type()));
const auto gmn(gm.name());
const auto i(im.modules().find(gmn.id()));
if (i != im.modules().end()) {
const auto id(im.name().id());
BOOST_LOG_SEV(lg, error) << model_already_has_global_module << id;
BOOST_THROW_EXCEPTION(
injection_error(model_already_has_global_module + id));
}
im.modules().insert(std::make_pair(gmn.id(), gm));
add_containing_module_to_non_contained_entities(gmn, im.modules());
add_containing_module_to_non_contained_entities(gmn, im.concepts());
add_containing_module_to_non_contained_entities(gmn, im.primitives());
add_containing_module_to_non_contained_entities(gmn, im.enumerations());
add_containing_module_to_non_contained_entities(gmn, im.objects());
add_containing_module_to_non_contained_entities(gmn, im.exceptions());
add_containing_module_to_non_contained_entities(gmn, im.visitors());
BOOST_LOG_SEV(lg, debug) << "Done injecting global module";
}
示例2: hash
std::size_t intermediate_model_hasher::hash(const intermediate_model& v) {
std::size_t seed(0);
combine(seed, v.name());
combine(seed, v.origin_type());
combine(seed, v.original_model_name());
combine(seed, v.generation_type());
combine(seed, hash_std_unordered_map_dogen_yarn_name_dogen_yarn_origin_types(v.references()));
combine(seed, hash_std_unordered_set_dogen_yarn_name(v.leaves()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_module(v.modules()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_concept(v.concepts()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_primitive(v.primitives()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_enumeration(v.enumerations()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_object(v.objects()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_exception(v.exceptions()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_visitor(v.visitors()));
combine(seed, v.is_target());
combine(seed, v.has_generatable_types());
return seed;
}
示例3: hash
std::size_t intermediate_model_hasher::hash(const intermediate_model& v) {
std::size_t seed(0);
combine(seed, v.name());
combine(seed, v.origin_type());
combine(seed, hash_std_unordered_map_dogen_yarn_name_dogen_yarn_origin_types(v.references()));
combine(seed, hash_std_unordered_set_dogen_yarn_name(v.leaves()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_module(v.modules()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_concept(v.concepts()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_primitive(v.primitives()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_enumeration(v.enumerations()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_object(v.objects()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_exception(v.exceptions()));
combine(seed, hash_std_unordered_map_std_string_dogen_yarn_visitor(v.visitors()));
combine(seed, hash_std_unordered_map_std_string_boost_shared_ptr_dogen_yarn_element(v.injected_elements()));
combine(seed, v.has_generatable_types());
combine(seed, v.indices());
combine(seed, v.root_module());
combine(seed, v.language());
return seed;
}