3 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
10 <Title>Boost Graph Library: EventVisitor
</Title>
11 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
13 <IMG SRC=
"../../../boost.png"
14 ALT=
"C++ Boost" width=
"277" height=
"86">
18 <H1>EventVisitor Concept
</H1>
20 This concept defines the interface for single-event visitors. An
21 EventVisitor has an apply member function (
<tt>operator()
</tt>) which
22 is invoked within the graph algorithm at the event-point specified by
23 the
<tt>event_filter
</tt> typedef within the
24 EventVisitor. EventVisitor's can be combined into an
<a
25 href=
"./EventVisitorList.html">EventVistorList
</a>.
28 The following is the list of event tags that can be invoked in BGL
29 algorithms. Each tag corresponds to a member function of the visitor
30 for an algorithm. For example, the
<a
31 href=
"./BFSVisitor.html">BFSVisitor
</a> of
<a
32 href=
"./breadth_first_search.html"><tt>breadth_first_search()
</tt></a>
33 has a
<tt>cycle_edge()
</tt> member function. The corresponding tag is
34 <tt>on_cycle_edge
</tt>. The first argument is the event visitor's
35 <tt>operator()
</tt> must be either an edge or vertex descriptor
36 depending on the event tag.
40 struct on_initialize_vertex { };
41 struct on_start_vertex { };
42 struct on_discover_vertex { };
43 struct on_examine_edge { };
44 struct on_tree_edge { };
45 struct on_cycle_edge { };
46 struct on_finish_vertex { };
47 struct on_forward_or_cross_edge { };
48 struct on_back_edge { };
49 struct on_edge_relaxed { };
50 struct on_edge_not_relaxed { };
51 struct on_edge_minimized { };
52 struct on_edge_not_minimized { };
57 <h3>Refinement of
</h3>
59 <a href=
"../../utility/CopyConstructible.html">Copy Constructible
</a>
60 (copying a visitor should be a lightweight operation).
67 <TD>A type that is a model of
<a href=
"./Graph.html">Graph
</a>.
</TD>
72 <TD>An object of type
<tt>G
</tt>.
</TD>
77 <TD>A type that is a model of EventVisitor.
</TD>
82 <TD>An object of type
<tt>V
</tt>.
</TD>
88 <tt>boost::graph_traits
<G
>::vertex_descriptor
</tt>
89 or
<tt>boost::graph_traits
<G
>::edge_descriptor
</tt>.
</TD>
94 <h3>Associated Types
</h3>
99 <TD>Event Filter
</TD>
100 <TD><TT>V::event_filter
</TT></TD>
102 A tag struct to specify on which event the visitor should be invoked.
108 <h3>Valid Expressions
</h3>
113 <th>Name
</th><th>Expression
</th><th>Return Type
</th><th>Description
</th>
117 <td>Apply Visitor
</td>
118 <td><TT>vis(x, g)
</TT></TD>
119 <TD><TT>void
</TT></TD>
121 Invokes the visitor operation on object
<tt>x
</tt>, which is
122 either a vertex or edge descriptor of the graph.
134 href=
"./predecessor_recorder.html"><tt>predecessor_recorder
</tt></a>
135 <li><a href=
"./distance_recorder.html"><tt>distance_recorder
</tt></a>
136 <li><a href=
"./time_stamper.html"><tt>time_stamper
</tt></a>
137 <li><a href=
"./property_writer.html"><tt>property_writer
</tt></a>
138 <li><a href=
"./null_visitor.html"><tt>null_visitor
</tt></a>
143 <a href=
"./EventVisitorList.html">EventVisitorList
</a>,
144 <a href=
"./visitor_concepts.html">Visitor concepts
</a>
150 <TD nowrap
>Copyright
© 2000-
2001</TD><TD>
151 <A HREF=
"http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek
</A>,
152 Indiana University (
<A
153 HREF=
"mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu
</A>)
<br>
154 <A HREF=
"http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee
</A>, Indiana University (
<A HREF=
"mailto:llee@cs.indiana.edu">llee@cs.indiana.edu
</A>)
<br>
155 <A HREF=
"http://www.osl.iu.edu/~lums">Andrew Lumsdaine
</A>,
156 Indiana University (
<A
157 HREF=
"mailto:lums@osl.iu.edu">lums@osl.iu.edu
</A>)