<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>OpenVRML: openvrml::node_traverser Class Reference</title> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <link rel="icon" href="../vrml-16"> <link rel="start" href="http://openvrml.org/index" title="OpenVRML Home"> <link rel="prev" href="http://openvrml.org/discussion" title="Discussion"> <link rel="contents" href="index" title="Documentation Main Page"> <link rel="index" href="functions" title="OpenVRML Compound Members"> <link rel="appendix" href="conformance" title="Conformance Test Results"> <style type="text/css"> @import url("tabs.css"); @import url("http://openvrml.org/openvrml.css"); table { width: 100%; } h2 { border-bottom-style: solid; border-bottom-width: 1px; } /* * Doxygen as of 1.5.4-20071217 uses the class "navpath" instead of "nav". * For now, we'll do both. */ div.nav, div.navpath { background-color: transparent; text-align: left; margin-top: 1em; margin-bottom: 1em; border-color: black; border-left: none; border-right: none; padding-top: 0.5em; padding-bottom: 0.5em; } div.nav :link, div.nav :visited, div.navpath :link, div.navpath :visited { border-width: 1px; border-style: solid; border-color: silver; padding: 2px; } div.nav :link:hover, div.nav :visited:hover, div.navpath :link:hover, div.navpath :visited:hover { border-style: outset; border-color: gray; } div.nav :active, div.navpath :active { border-style: inset; border-color: gray; } .body td { background-color: transparent; } .el { text-decoration: inherit; font-weight: inherit } .elRef { font-weight: inherit } .code:link, .code:visited { text-decoration: inherit; font-weight: inherit; color: inherit; } .codeRef:link { font-weight: normal; color: inherit; } :visited { color: silver; } :link:hover { color: inherit; text-decoration: inherit; background-color: transparent; } h1 { line-height: 1.2em; } td.memItemLeft, td.memItemRight, td.memTemplParams, td.memTemplItemLeft, td.memTemplItemRight, .memtemplate, .memname td { font-family: Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Lucida Console", LucidaTypewriter, monospace; } td.memItemLeft, td.memItemRight, td.mdescLeft, td.mdescRight { background-color: rgb(95%, 95%, 95%); border-color: rgb(65%, 65%, 65%); border-width: 1px; font-size: smaller; } .memItemLeft { margin-top: 0.5em; border-top-style: solid; } .mdescLeft { border-bottom-style: solid; } .memItemRight { border-top-style: solid; margin-top: 0.5em; } .mdescRight { border-bottom-style: solid; } .mdescRight { font-style: italic; } .mdTable { background-color: rgb(95%, 95%, 95%); } .memproto td code { font-family: inherit; font-style: italic; } td.pass { background-color: rgb(50%, 100%, 50%); } td.fail { background-color: rgb(100%, 50%, 50%); } td.invalid { background-color: rgb(75%, 75%, 75%); } .memitem { padding: 0; } .memitem table { width: auto; } .memproto, .memdoc { border-width: 1px; border-color: rgb(65%, 65%, 65%); } .memproto { background-color: rgb(90%, 90%, 90%); font-weight: inherit; font-size: smaller; border-top-style: solid; border-left-style: solid; border-right-style: solid; -webkit-border-top-left-radius: 0.6em; -webkit-border-top-right-radius: 0.6em; -moz-border-radius-topleft: 0.6em; -moz-border-radius-topright: 0.6em; } .memdoc { background-color: rgb(95%, 95%, 95%); padding: 2px 5px; border-style: solid; -webkit-border-bottom-left-radius: 0.6em; -webkit-border-bottom-right-radius: 0.6em; -moz-border-radius-bottomleft: 0.6em; -moz-border-radius-bottomright: 0.6em; } .memname { font-weight: inherit; } div.tabs { background-image: url("tab_b-openvrml.png"); } div.tabs span { background-image: url("tab_l-openvrml.png"); } div.tabs a { background-image: url("tab_r-openvrml.png"); border-bottom: 1px solid #a5a5a5; } div.tabs a:link, div.tabs a:visited, div.tabs a:active, div.tabs a:hover { color: black; } table { border-collapse: collapse; border-spacing: 0; } .note { border: 1px solid rgb(65%, 65%, 65%); background-color: rgb(95%, 95%, 95%); margin-left: 10%; margin-right: 10%; } </style> </head> <body> <table class="sitenav"> <tr> <th><a href="http://openvrml.org/index" title="Home">Home</a></th> <th><a href="http://openvrml.org/download" title="Download">Download</a></th> <th><a href="http://openvrml.org/screenshots/index" title="Screen shots">Screen shots</a></th> <th><a href="http://openvrml.org/discussion" title="Mailing lists and IRC">Discussion</a></th> <th>Documentation</th> </tr> </table> <div class="body"> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceopenvrml.html">openvrml</a>::<a class="el" href="classopenvrml_1_1node__traverser.html">node_traverser</a> </div> </div> <div class="contents"> <h1>openvrml::node_traverser Class Reference</h1><!-- doxytag: class="openvrml::node_traverser" -->Traverse the children of each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> hierarchy only once. <a href="#_details">More...</a> <p> <code>#include <openvrml/node.h></code> <p> <p> <a href="classopenvrml_1_1node__traverser-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#dc0e0046161cfee8d1735d0e18e0130e">node_traverser</a> () throw ( std::bad_alloc )</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct. <a href="#dc0e0046161cfee8d1735d0e18e0130e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#3509acc835503c010bfb7cbb18abcd34">~node_traverser</a> ()=0 throw ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy. <a href="#3509acc835503c010bfb7cbb18abcd34"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#68e9729a4d5ab6ce600344ae05581975">traverse</a> (<a class="el" href="classopenvrml_1_1node.html">node</a> &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <a href="#68e9729a4d5ab6ce600344ae05581975"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#d49f752096f8f0bf942871f0ffef65b7">traverse</a> (const boost::intrusive_ptr< <a class="el" href="classopenvrml_1_1node.html">node</a> > &<a class="el" href="classopenvrml_1_1node.html">node</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <a href="#d49f752096f8f0bf942871f0ffef65b7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#34f0e49708d24783d4a106e1bb5a8afb">traverse</a> (const std::vector< boost::intrusive_ptr< <a class="el" href="classopenvrml_1_1node.html">node</a> > > &nodes)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Traverse a <code>std::vector</code> of <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>s</code>. <a href="#34f0e49708d24783d4a106e1bb5a8afb"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#5d02d42d36875e0bf1f992dae627ae42">halt_traversal</a> () throw ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Halt the traversal. <a href="#5d02d42d36875e0bf1f992dae627ae42"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#f003c2dcba3239d46ccd959358572a10">halted</a> () const throw ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Indicate whether the traversal has been halted. <a href="#f003c2dcba3239d46ccd959358572a10"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#72137b1c315ea28d21a710d55e451f6f">traversed</a> (<a class="el" href="classopenvrml_1_1node.html">node</a> &n) const throw ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check whether a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> has been traversed. <a href="#72137b1c315ea28d21a710d55e451f6f"></a><br></td></tr> <tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9">on_entering</a> (<a class="el" href="classopenvrml_1_1node.html">node</a> &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Called for each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in the traversal <em>before</em> traversing the its descendants. <a href="#9f1fde3009d0e0fed3a9625b3c3cb5d9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0">on_leaving</a> (<a class="el" href="classopenvrml_1_1node.html">node</a> &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Called for each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in the traversal <em>after</em> traversing the its descendants. <a href="#0babee4188dd51f7b5b36145ba1d45c0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#3a7353192c4fa1d19b6c4ed81a4b4446">do_traversal</a> (<a class="el" href="classopenvrml_1_1node.html">node</a> &n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <a href="#3a7353192c4fa1d19b6c4ed81a4b4446"></a><br></td></tr> <tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::set< <a class="el" href="classopenvrml_1_1node.html">node</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#9cc48fc6929255affdc298b1e1848762">traversed_nodes</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The set of <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>s</code> that have already been traversed. <a href="#9cc48fc6929255affdc298b1e1848762"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classopenvrml_1_1node__traverser.html#ad88e4f05391b3a6a3b60c35e0aa2a6c">halt</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Flag to indicate if the traversal should be halted. <a href="#ad88e4f05391b3a6a3b60c35e0aa2a6c"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Traverse the children of each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> hierarchy only once. <p> The <code><a class="el" href="classopenvrml_1_1node__traverser.html" title="Traverse the children of each node in a node hierarchy only once.">node_traverser</a></code> provides a generalized traversal mechanism that avoids redundantly traversing branches of the <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> hierarchy. If a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> occurs multiple places in a branch, <b>the children of that <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> will be visited in the traversal only once</b>.<p> For each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> encountered in the traversal, <code><a class="el" href="classopenvrml_1_1node__traverser.html" title="Traverse the children of each node in a node hierarchy only once.">node_traverser</a></code> does the following:<p> <ol type=1> <li>Call <code><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9" title="Called for each node in the traversal before traversing the its descendants.">on_entering</a></code>.</li><li>Traverse descendants, if any.</li><li>Call <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code>.</li></ol> <p> Concrete subclasses of <code><a class="el" href="classopenvrml_1_1node__traverser.html" title="Traverse the children of each node in a node hierarchy only once.">node_traverser</a></code> implement the <code><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9" title="Called for each node in the traversal before traversing the its descendants.">on_entering</a></code> and/or <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code> member functions in order to perform some operation(s) on each <a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>. The traversal can be ended prematurely by calling <code><a class="el" href="classopenvrml_1_1node__traverser.html#5d02d42d36875e0bf1f992dae627ae42" title="Halt the traversal.">halt_traversal</a></code>. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="dc0e0046161cfee8d1735d0e18e0130e"></a><!-- doxytag: member="openvrml::node_traverser::node_traverser" ref="dc0e0046161cfee8d1735d0e18e0130e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">openvrml::node_traverser::node_traverser </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> throw ( std::bad_alloc )</td> </tr> </table> </div> <div class="memdoc"> <p> Construct. <p> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>std::bad_alloc</em> </td><td>if memory allocation fails. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="3509acc835503c010bfb7cbb18abcd34"></a><!-- doxytag: member="openvrml::node_traverser::~node_traverser" ref="3509acc835503c010bfb7cbb18abcd34" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">openvrml::node_traverser::~node_traverser </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> throw ()<code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destroy. <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="68e9729a4d5ab6ce600344ae05581975"></a><!-- doxytag: member="openvrml::node_traverser::traverse" ref="68e9729a4d5ab6ce600344ae05581975" args="(node &n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::traverse </td> <td>(</td> <td class="paramtype"><a class="el" href="classopenvrml_1_1node.html">node</a> & </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <p> No guarantee is made about the state of the <code><a class="el" href="classopenvrml_1_1node__traverser.html" title="Traverse the children of each node in a node hierarchy only once.">node_traverser</a></code> instance in the event that this method throws.<p> In addition to <code>std::bad_alloc</code>, this function throws any exception thrown from <code><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9" title="Called for each node in the traversal before traversing the its descendants.">on_entering</a></code> or <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code>.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>n</em> </td><td>the root <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> of the branch to traverse.</td></tr> </table> </dl> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>std::bad_alloc</em> </td><td>if memory allocation fails. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="d49f752096f8f0bf942871f0ffef65b7"></a><!-- doxytag: member="openvrml::node_traverser::traverse" ref="d49f752096f8f0bf942871f0ffef65b7" args="(const boost::intrusive_ptr< node > &node)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::traverse </td> <td>(</td> <td class="paramtype">const boost::intrusive_ptr< <a class="el" href="classopenvrml_1_1node.html">node</a> > & </td> <td class="paramname"> <em>node</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <p> This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></em> </td><td>the root <a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a> of the branch to traverse.</td></tr> </table> </dl> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>std::bad_alloc</em> </td><td>if memory allocation fails. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="34f0e49708d24783d4a106e1bb5a8afb"></a><!-- doxytag: member="openvrml::node_traverser::traverse" ref="34f0e49708d24783d4a106e1bb5a8afb" args="(const std::vector< boost::intrusive_ptr< node > > &nodes)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::traverse </td> <td>(</td> <td class="paramtype">const std::vector< boost::intrusive_ptr< <a class="el" href="classopenvrml_1_1node.html">node</a> > > & </td> <td class="paramname"> <em>nodes</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Traverse a <code>std::vector</code> of <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>s</code>. <p> This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>nodes</em> </td><td>the root <a class="el" href="classopenvrml_1_1node.html">nodes</a> of the branch to traverse. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="5d02d42d36875e0bf1f992dae627ae42"></a><!-- doxytag: member="openvrml::node_traverser::halt_traversal" ref="5d02d42d36875e0bf1f992dae627ae42" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::halt_traversal </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> throw ()<code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Halt the traversal. <p> If this method is called during a traversal, no more descendant <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>s</code> will be traversed. Note that if <code><a class="el" href="classopenvrml_1_1node__traverser.html#5d02d42d36875e0bf1f992dae627ae42" title="Halt the traversal.">halt_traversal</a></code> is called in the implementation of <code><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9" title="Called for each node in the traversal before traversing the its descendants.">on_entering</a></code>, <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code> will still be called for the current <a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a> and any parent nodes (that is, any <a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a> for which <code><a class="el" href="classopenvrml_1_1node__traverser.html#9f1fde3009d0e0fed3a9625b3c3cb5d9" title="Called for each node in the traversal before traversing the its descendants.">on_entering</a></code> has been called). Implementations of <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code> can call <code><a class="el" href="classopenvrml_1_1node__traverser.html#f003c2dcba3239d46ccd959358572a10" title="Indicate whether the traversal has been halted.">halted</a></code> to check whether the traversal has been halted. </div> </div><p> <a class="anchor" name="f003c2dcba3239d46ccd959358572a10"></a><!-- doxytag: member="openvrml::node_traverser::halted" ref="f003c2dcba3239d46ccd959358572a10" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool openvrml::node_traverser::halted </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const throw ()<code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Indicate whether the traversal has been halted. <p> This function is useful in implementations of <code><a class="el" href="classopenvrml_1_1node__traverser.html#0babee4188dd51f7b5b36145ba1d45c0" title="Called for each node in the traversal after traversing the its descendants.">on_leaving</a></code> that need to check whether the traversal has been halted.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if the traversal has been halted; <code>false</code> otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="72137b1c315ea28d21a710d55e451f6f"></a><!-- doxytag: member="openvrml::node_traverser::traversed" ref="72137b1c315ea28d21a710d55e451f6f" args="(node &n) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool openvrml::node_traverser::traversed </td> <td>(</td> <td class="paramtype"><a class="el" href="classopenvrml_1_1node.html">node</a> & </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td> const throw ()<code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check whether a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> has been traversed. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>n</em> </td><td>the <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> to check.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if <code>n</code> has been traversed; <code>false</code> otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="9f1fde3009d0e0fed3a9625b3c3cb5d9"></a><!-- doxytag: member="openvrml::node_traverser::on_entering" ref="9f1fde3009d0e0fed3a9625b3c3cb5d9" args="(node &n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::on_entering </td> <td>(</td> <td class="paramtype"><a class="el" href="classopenvrml_1_1node.html">node</a> & </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td><code> [private, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Called for each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in the traversal <em>before</em> traversing the its descendants. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>n</em> </td><td>the <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> currently being traversed. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="0babee4188dd51f7b5b36145ba1d45c0"></a><!-- doxytag: member="openvrml::node_traverser::on_leaving" ref="0babee4188dd51f7b5b36145ba1d45c0" args="(node &n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::on_leaving </td> <td>(</td> <td class="paramtype"><a class="el" href="classopenvrml_1_1node.html">node</a> & </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td><code> [private, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Called for each <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> in the traversal <em>after</em> traversing the its descendants. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>n</em> </td><td>the <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> currently being traversed. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="3a7353192c4fa1d19b6c4ed81a4b4446"></a><!-- doxytag: member="openvrml::node_traverser::do_traversal" ref="3a7353192c4fa1d19b6c4ed81a4b4446" args="(node &n)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void openvrml::node_traverser::do_traversal </td> <td>(</td> <td class="paramtype"><a class="el" href="classopenvrml_1_1node.html">node</a> & </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Traverse a <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code>. <p> <p><b>For internal use only.</b></p> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>n</em> </td><td>the <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a></code> to traverse.</td></tr> </table> </dl> <dl compact><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>std::bad_alloc</em> </td><td>if memory allocation fails. </td></tr> </table> </dl> </p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="9cc48fc6929255affdc298b1e1848762"></a><!-- doxytag: member="openvrml::node_traverser::traversed_nodes" ref="9cc48fc6929255affdc298b1e1848762" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::set< <a class="el" href="classopenvrml_1_1node.html">openvrml::node</a> * > <a class="el" href="classopenvrml_1_1node__traverser.html#9cc48fc6929255affdc298b1e1848762">openvrml::node_traverser::traversed_nodes</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> The set of <code><a class="el" href="classopenvrml_1_1node.html" title="A node in the scene graph.">node</a>s</code> that have already been traversed. <p> <p><b>For internal use only.</b></p> <p> </p> </div> </div><p> <a class="anchor" name="ad88e4f05391b3a6a3b60c35e0aa2a6c"></a><!-- doxytag: member="openvrml::node_traverser::halt" ref="ad88e4f05391b3a6a3b60c35e0aa2a6c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classopenvrml_1_1node__traverser.html#ad88e4f05391b3a6a3b60c35e0aa2a6c">openvrml::node_traverser::halt</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Flag to indicate if the traversal should be halted. <p> <p><b>For internal use only.</b></p> <p> </p> </div> </div><p> </div> </div> <address class="footer"><span class="images"><a href="http://web3d.org/x3d/"><img src="x3d-white-on-black.png" width="43" height="32" border="0" alt="X3D"></a><a href="http://opengl.org"><img src="OGL_sm_wht.png" width="68" height="32" border="0" alt="OpenGL"></a><a href="http://sourceforge.net/projects/openvrml"><img src="http://sourceforge.net/sflogo.php?group_id=7151&type=11" width="120" height="30" border="0" alt="SourceForge.net"></a></span><a href="https://sourceforge.net/apps/trac/openvrml/newticket">Report error</a><br>Generated Thu Aug 13 02:49:21 2009 by Doxygen 1.5.8</address> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> <script type="text/javascript">_uacct = "UA-446379-2"; urchinTracker();</script> <!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://sourceforge.net/apps/piwik/openvrml/" : "http://sourceforge.net/apps/piwik/openvrml/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> piwik_action_name = ''; piwik_idsite = 1; piwik_url = pkBaseURL + "piwik.php"; piwik_log(piwik_action_name, piwik_idsite, piwik_url); </script> <object><noscript><p><img src="http://sourceforge.net/apps/piwik/openvrml/piwik.php?idsite=1" alt="piwik"/></p></noscript></object> <!-- End Piwik Tag --> </body> </html>