22 #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_
23 #define SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_
25 #include <boost/iterator/iterator_facade.hpp>
37 template<
typename MapIteratorType,
typename ReturnType>
39 Blocker_iterator_internal<MapIteratorType, ReturnType>,
41 boost::forward_traversal_tag,
45 MapIteratorType current_position;
46 MapIteratorType end_of_map;
52 current_position(position), end_of_map(end_of_map_) { }
55 return current_position == other.current_position;
62 ReturnType dereference()
const {
63 return (current_position->second);
72 void goto_next_blocker() {
75 }
while (!(current_position == end_of_map) && !first_time_blocker_is_seen());
78 bool first_time_blocker_is_seen()
const {
79 return current_position->first == current_position->second->first_vertex();
89 template<
typename MapIteratorType,
typename ReturnType>
91 Blocker_iterator_around_vertex_internal<MapIteratorType, ReturnType>,
93 boost::forward_traversal_tag,
97 MapIteratorType current_position_;
103 current_position_(position) { }
106 this->current_position_ = other.current_position_;
111 return current_position_ == other.current_position_;
118 ReturnType dereference()
const {
119 return (current_position_->second);
122 MapIteratorType current_position() {
123 return this->current_position_;
131 #endif // SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_
Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:38
Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:90