PlanarFaceVisitor.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <HTML>
  2. <!-- Copyright 2007 Aaron Windsor
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. -->
  7. <HEAD>
  8. <TITLE>Planar Face Visitor Concept</TITLE>
  9. </HEAD>
  10. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  11. ALINK="#ff0000">
  12. <IMG SRC="../../../boost.png"
  13. ALT="C++ Boost" width="277" height="86">
  14. <BR Clear>
  15. <H1>Planar Face Visitor Concept</H1>
  16. This concept defines the visitor interface for
  17. <a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>.
  18. Users can define a class with the Planar Face Visitor interface and pass an
  19. object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the
  20. actions taken during the traversal. Note that objects passed to
  21. <tt>planar_face_traversal</tt> are passed by reference.
  22. <h3>Notation</h3>
  23. <table>
  24. <tbody><tr>
  25. <td><tt>V</tt></td>
  26. <td>A type that is a model of Planar Face Visitor.</td>
  27. </tr>
  28. <tr>
  29. <td><tt>vis</tt></td>
  30. <td>An object of type <tt>V</tt>.</td>
  31. </tr>
  32. <tr>
  33. <td><tt>G</tt></td>
  34. <td>A type that is a model of Graph.</td>
  35. </tr>
  36. <tr>
  37. <td><tt>e</tt></td>
  38. <td>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.
  39. </td>
  40. </tr>
  41. <tr>
  42. <td><tt>v</tt></td>
  43. <td>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.
  44. </td>
  45. </tr>
  46. </tbody></table>
  47. <h3>Valid Expressions</h3>
  48. <table border="1">
  49. <tbody><tr>
  50. <th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
  51. </tr>
  52. <tr>
  53. <td>Begin Traversal</td>
  54. <td><tt>vis.begin_traversal()</tt></td>
  55. <td><tt>void</tt></td>
  56. <td>
  57. This is invoked once per traversal, before the traversal begins.
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>Begin Face</td>
  62. <td><tt>vis.begin_face()</tt></td>
  63. <td><tt>void</tt></td>
  64. <td>
  65. This is invoked once for each face, before any vertices or edges on the face
  66. are visited.
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>Next Vertex</td>
  71. <td><tt>vis.next_vertex(v)</tt></td>
  72. <td><tt>void</tt></td>
  73. <td>
  74. This is invoked when a vertex is encountered while traversing a face.
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>Next Edge</td>
  79. <td><tt>vis.next_edge(e)</tt></td>
  80. <td><tt>void</tt></td>
  81. <td>
  82. This is invoked when an edge is encountered while traversing a face.
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>End Face</td>
  87. <td><tt>vis.end_face()</tt></td>
  88. <td><tt>void</tt></td>
  89. <td>
  90. This is invoked once for each face, after all vertices and edges on the face
  91. are visited.
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>End Traversal</td>
  96. <td><tt>vis.end_traversal()</tt></td>
  97. <td><tt>void</tt></td>
  98. <td>
  99. This is invoked once per traversal, after the traversal ends.
  100. </td>
  101. </tr>
  102. </tbody></table>
  103. <h3>Models</h3>
  104. <ul>
  105. <li> The file <a href="../../../boost/graph/planar_face_traversal.hpp">
  106. <tt>planar_face_traversal.hpp</tt></a> contains a class
  107. <tt>planar_face_traversal_visitor</tt> that implements empty actions for
  108. all event points of a Planar Face Visitor. In the case where only a few of the
  109. event points of Planar Face Visitor need to be implemented, one can derive from
  110. <tt>planar_face_traversal_visitor</tt> and only implement the necessary event
  111. points. <li> The implementation of <a href="./make_maximal_planar.html">
  112. <tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
  113. a model of Planar Face Visitor.
  114. </li>
  115. </ul>
  116. <br>
  117. <HR>
  118. Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
  119. aaron.windsor@gmail.com</a>)
  120. </BODY>
  121. </HTML>