2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 08:32:11 +00:00
Files
graph/docs/EventVisitor.html
Jeremy Siek 19fd88d2e6 updating visitor documentation
[SVN r7726]
2000-09-18 17:58:30 +00:00

116 lines
2.9 KiB
HTML

<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
-->
<Head>
<Title>Boost Graph Library: EventVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost">
<BR Clear>
<H1>EventVisitor Concept</H1>
This concept defines the interface for single-event visitors. The
visitor has a single apply member function (<tt>operator()</tt>).
This function is invoked within the graph algorithm at the event-point
specified by the <tt>event_filter</tt> typedef within the
EventVisitor. 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 <a
href="./BFSVisitor.html">BFSVisitor</a> of <a
href="./breadth_first_search.html"><tt>breadth_first_search()</tt></a>
has a <tt>cycle_edge()</tt> member function. The corresponding tag is
<tt>on_cycle_edge</tt>.
<pre>
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
</pre>
<h3>Refinement of</h3>
none
<p>
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of <a href="./Graph.html">Graph</a>.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>x</tt></TD>
<TD>An object of type
<tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>
or <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
<Table border>
<TR>
<TD>Event Filter </TD>
<TD><TT>V::event_filter</TT></TD>
<TD>
A tag struct to specify on which event the visitor should be invoked.
</TD>
</TR>
</table>
<h3>Valid Expressions</h3>
<Table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Apply Visitor</td>
<td><TT>operator(x, g)</TT></TD>
<TD><TT>void</TT></TD>
<TD>
Invokes the visitor operation on object <tt>x</tt>, which is
either a vertex or edge descriptor of the graph.
</TD>
</TR>
</table>