本文整理汇总了C++中model::concepts方法的典型用法代码示例。如果您正苦于以下问题:C++ model::concepts方法的具体用法?C++ model::concepts怎么用?C++ model::concepts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model::concepts方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: index_concepts
void property_indexer::index_concepts(model& m) {
BOOST_LOG_SEV(lg, debug) << "Indexing concepts: " << m.concepts().size();
std::unordered_set<sml::qname> processed_qnames;
for (auto& pair : m.concepts()) {
auto& c(pair.second);
if (c.generation_type() == generation_types::no_generation)
continue;
index_concept(c, m, processed_qnames);
}
}
示例2: post_process
void json_hydrator::post_process(model& m) const {
update_containing_module(m, m.objects());
update_containing_module(m, m.primitives());
update_containing_module(m, m.enumerations());
update_containing_module(m, m.concepts());
update_containing_module(m, m.modules());
}
示例3: expand_containing_module
void modules_expander::expand_containing_module(model& m) const {
update_containing_module(m, m.objects());
update_containing_module(m, m.primitives());
update_containing_module(m, m.enumerations());
update_containing_module(m, m.concepts());
update_containing_module(m, m.modules());
}
示例4: merge_model
void merger::merge_model(const model& m) {
BOOST_LOG_SEV(lg, info) << "Merging model: '"
<< m.name().qualified()
<< " modules: " << m.modules().size()
<< " concepts: " << m.concepts().size()
<< " primitives: " << m.primitives().size()
<< " enumerations: " << m.enumerations().size()
<< " objects: " << m.objects().size();
const auto mn(m.name().location().original_model_name());
for (const auto& c : m.concepts()) {
check_name(mn, c.first, c.second.name());
merged_model_.concepts().insert(c);
}
for (const auto& pair : m.primitives()) {
// FIXME: mega hack to handle primitive model.
const auto pmn(mn == hardware_model_name ? empty : mn);
check_name(pmn, pair.first, pair.second.name());
merged_model_.primitives().insert(pair);
}
for (const auto& pair : m.enumerations()) {
check_name(mn, pair.first, pair.second.name());
merged_model_.enumerations().insert(pair);
}
for (const auto& pair : m.objects()) {
check_name(mn, pair.first, pair.second.name());
merged_model_.objects().insert(pair);
}
for (const auto& pair : m.modules()) {
if (!pair.first.simple().empty())
check_name(mn, pair.first, pair.second.name());
merged_model_.modules().insert(pair);
}
}
示例5: hash
std::size_t model_hasher::hash(const model& v) {
std::size_t seed(0);
combine(seed, v.documentation());
combine(seed, v.extensions());
combine(seed, v.name());
combine(seed, v.generation_type());
combine(seed, v.origin_type());
combine(seed, hash_boost_optional_dogen_tack_name(v.containing_module()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_origin_types(v.references()));
combine(seed, hash_std_unordered_set_dogen_tack_name(v.leaves()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_module(v.modules()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_concept(v.concepts()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_primitive(v.primitives()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_enumeration(v.enumerations()));
combine(seed, hash_std_unordered_map_dogen_tack_name_dogen_tack_object(v.objects()));
combine(seed, v.is_target());
combine(seed, v.has_generatable_types());
return seed;
}