本文整理汇总了C++中Visitor::finish_bucket方法的典型用法代码示例。如果您正苦于以下问题:C++ Visitor::finish_bucket方法的具体用法?C++ Visitor::finish_bucket怎么用?C++ Visitor::finish_bucket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor::finish_bucket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bucket_traverse
void bucket_traverse(const EntitySelector &entity_selector, const RelationSelector &relation_selector, Visitor &visitor, Mesh &mesh)
{
typedef typename sierra::mesh::mesh_traits<Mesh>::bucket_key bucket_key;
typedef typename sierra::mesh::mesh_traits<Mesh>::selected_bucket_range selected_bucket_range;
typedef typename sierra::mesh::mesh_traits<Mesh>::bucket_key bucket_descriptor;
typedef typename sierra::mesh::mesh_traits<Mesh>::bucket_entity_range bucket_entity_range;
typedef typename sierra::mesh::mesh_traits<Mesh>::bucket_entity_iterator bucket_entity_iterator;
typedef typename sierra::mesh::mesh_traits<Mesh>::selected_bucket_iterator selected_bucket_iterator;
typedef typename sierra::mesh::mesh_traits<Mesh>::entity_descriptor entity_descriptor;
typedef typename sierra::mesh::mesh_traits<Mesh>::entity_descriptor_range entity_descriptor_range;
typedef typename sierra::mesh::mesh_traits<Mesh>::relation_range relation_range;
typedef typename sierra::mesh::mesh_traits<Mesh>::relation_descriptor relation_descriptor;
typedef typename sierra::mesh::mesh_traits<Mesh>::relation_iterator relation_iterator;
typedef typename sierra::mesh::mesh_traits<Mesh>::entity_rank entity_rank;
visitor.initialize(mesh);
selected_bucket_range buckets = get_buckets(entity_selector, mesh);
for (selected_bucket_iterator b_iter = boost::begin(buckets), b_end = boost::end(buckets); b_iter != b_end; ++b_iter) {
bucket_descriptor bucket = *b_iter;
visitor.discover_bucket(bucket, mesh);
bucket_entity_range entities = get_entities(*b_iter, mesh);
for (bucket_entity_iterator ent_iter = boost::begin(entities), ent_end = boost::end(entities); ent_iter != ent_end; ++ent_iter) {
entity_descriptor entity = *ent_iter;
visitor.discover_entity(entity, mesh);
relation_range entity_relations = sierra::mesh::get_relations(entity, relation_selector, mesh);
visitor.examine_relation_range(entity_relations, mesh);
for (relation_iterator rel_iter = boost::begin(entity_relations), rel_end = boost::end(entity_relations); rel_iter != rel_end; ++rel_iter) {
relation_descriptor relation = *rel_iter;
visitor.examine_relation(relation, mesh);
}
visitor.finish_entity(entity, mesh);
}
visitor.finish_bucket(bucket, mesh);
}
visitor.finalize(mesh);
}