EventVisitor Concept
This concept defines the interface for single-event visitors. An
EventVisitor has an apply member function (operator()) which is
invoked within the graph algorithm at the event-point specified by the
event_filter typedef within the EventVisitor. EventVisitor’s can
be combined into an EventVistorList.
The following is the list of event tags that can be invoked in BGL
algorithms. Each tag corresponds to a member function of the visitor for
an algorithm. For example, the BFSVisitor of
breadth_first_search() has a
cycle_edge() member function. The corresponding tag is
on_cycle_edge. The first argument is the event visitor’s
operator() must be either an edge or vertex descriptor depending on
the event tag.
namespace boost {
struct on_initialize_vertex { };
struct on_start_vertex { };
struct on_discover_vertex { };
struct on_examine_edge { };
struct on_tree_edge { };
struct on_cycle_edge { };
struct on_finish_vertex { };
struct on_forward_or_cross_edge { };
struct on_back_edge { };
struct on_edge_relaxed { };
struct on_edge_not_relaxed { };
struct on_edge_minimized { };
struct on_edge_not_minimized { };
} // namespace boost
Notation
G |
A type that is a model of Graph. |
|---|---|
|
An object of type |
|
A type that is a model of EventVisitor. |
|
An object of type |
|
An object of type
|
Associated Types
Event Filter |
|
A tag struct to specify on which event the visitor should be invoked. |