Home | History | Annotate | Download | only in docs
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
      6 <meta name="generator" content="Doxygen 1.8.13"/>
      7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
      8 <title>TinyXML-2: tinyxml2::XMLVisitor Class Reference</title>
      9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
     10 <script type="text/javascript" src="jquery.js"></script>
     11 <script type="text/javascript" src="dynsections.js"></script>
     12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
     13 <script type="text/javascript" src="search/searchdata.js"></script>
     14 <script type="text/javascript" src="search/search.js"></script>
     15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
     16 </head>
     17 <body>
     18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     19 <div id="titlearea">
     20 <table cellspacing="0" cellpadding="0">
     21  <tbody>
     22  <tr style="height: 56px;">
     23   <td id="projectalign" style="padding-left: 0.5em;">
     24    <div id="projectname">TinyXML-2
     25    &#160;<span id="projectnumber">7.0.0</span>
     26    </div>
     27   </td>
     28  </tr>
     29  </tbody>
     30 </table>
     31 </div>
     32 <!-- end header part -->
     33 <!-- Generated by Doxygen 1.8.13 -->
     34 <script type="text/javascript">
     35 var searchBox = new SearchBox("searchBox", "search",false,'Search');
     36 </script>
     37 <script type="text/javascript" src="menudata.js"></script>
     38 <script type="text/javascript" src="menu.js"></script>
     39 <script type="text/javascript">
     40 $(function() {
     41   initMenu('',true,false,'search.php','Search');
     42   $(document).ready(function() { init_search(); });
     43 });
     44 </script>
     45 <div id="main-nav"></div>
     46 <!-- window showing the filter options -->
     47 <div id="MSearchSelectWindow"
     48      onmouseover="return searchBox.OnSearchSelectShow()"
     49      onmouseout="return searchBox.OnSearchSelectHide()"
     50      onkeydown="return searchBox.OnSearchSelectKey(event)">
     51 </div>
     52 
     53 <!-- iframe showing the search results (closed by default) -->
     54 <div id="MSearchResultsWindow">
     55 <iframe src="javascript:void(0)" frameborder="0" 
     56         name="MSearchResults" id="MSearchResults">
     57 </iframe>
     58 </div>
     59 
     60 <div id="nav-path" class="navpath">
     61   <ul>
     62 <li class="navelem"><b>tinyxml2</b></li><li class="navelem"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html">XMLVisitor</a></li>  </ul>
     63 </div>
     64 </div><!-- top -->
     65 <div class="header">
     66   <div class="summary">
     67 <a href="#pub-methods">Public Member Functions</a> &#124;
     68 <a href="classtinyxml2_1_1_x_m_l_visitor-members.html">List of all members</a>  </div>
     69   <div class="headertitle">
     70 <div class="title">tinyxml2::XMLVisitor Class Reference</div>  </div>
     71 </div><!--header-->
     72 <div class="contents">
     73 
     74 <p><code>#include &lt;<a class="el" href="tinyxml2_8h_source.html">tinyxml2.h</a>&gt;</code></p>
     75 <div class="dynheader">
     76 Inheritance diagram for tinyxml2::XMLVisitor:</div>
     77 <div class="dyncontent">
     78  <div class="center">
     79   <img src="classtinyxml2_1_1_x_m_l_visitor.png" usemap="#tinyxml2::XMLVisitor_map" alt=""/>
     80   <map id="tinyxml2::XMLVisitor_map" name="tinyxml2::XMLVisitor_map">
     81 <area href="classtinyxml2_1_1_x_m_l_printer.html" alt="tinyxml2::XMLPrinter" shape="rect" coords="0,56,128,80"/>
     82 </map>
     83  </div></div>
     84 <table class="memberdecls">
     85 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
     86 Public Member Functions</h2></td></tr>
     87 <tr class="memitem:acb3c22fc5f60eb9db98f533f2761f67d"><td class="memItemLeft" align="right" valign="top"><a id="acb3c22fc5f60eb9db98f533f2761f67d"></a>
     88 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#acb3c22fc5f60eb9db98f533f2761f67d">VisitEnter</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> &amp;)</td></tr>
     89 <tr class="memdesc:acb3c22fc5f60eb9db98f533f2761f67d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a document. <br /></td></tr>
     90 <tr class="separator:acb3c22fc5f60eb9db98f533f2761f67d"><td class="memSeparator" colspan="2">&#160;</td></tr>
     91 <tr class="memitem:a170e9989cd046ba904f302d087e07086"><td class="memItemLeft" align="right" valign="top"><a id="a170e9989cd046ba904f302d087e07086"></a>
     92 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#a170e9989cd046ba904f302d087e07086">VisitExit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a> &amp;)</td></tr>
     93 <tr class="memdesc:a170e9989cd046ba904f302d087e07086"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a document. <br /></td></tr>
     94 <tr class="separator:a170e9989cd046ba904f302d087e07086"><td class="memSeparator" colspan="2">&#160;</td></tr>
     95 <tr class="memitem:af97980a17dd4e37448b181f5ddfa92b5"><td class="memItemLeft" align="right" valign="top"><a id="af97980a17dd4e37448b181f5ddfa92b5"></a>
     96 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#af97980a17dd4e37448b181f5ddfa92b5">VisitEnter</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> &amp;, const <a class="el" href="classtinyxml2_1_1_x_m_l_attribute.html">XMLAttribute</a> *)</td></tr>
     97 <tr class="memdesc:af97980a17dd4e37448b181f5ddfa92b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an element. <br /></td></tr>
     98 <tr class="separator:af97980a17dd4e37448b181f5ddfa92b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
     99 <tr class="memitem:a772f10ddc83f881956d32628faa16eb6"><td class="memItemLeft" align="right" valign="top"><a id="a772f10ddc83f881956d32628faa16eb6"></a>
    100 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#a772f10ddc83f881956d32628faa16eb6">VisitExit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_element.html">XMLElement</a> &amp;)</td></tr>
    101 <tr class="memdesc:a772f10ddc83f881956d32628faa16eb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an element. <br /></td></tr>
    102 <tr class="separator:a772f10ddc83f881956d32628faa16eb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
    103 <tr class="memitem:adc75bd459fc7ba8223b50f0616767f9a"><td class="memItemLeft" align="right" valign="top"><a id="adc75bd459fc7ba8223b50f0616767f9a"></a>
    104 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#adc75bd459fc7ba8223b50f0616767f9a">Visit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_declaration.html">XMLDeclaration</a> &amp;)</td></tr>
    105 <tr class="memdesc:adc75bd459fc7ba8223b50f0616767f9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a declaration. <br /></td></tr>
    106 <tr class="separator:adc75bd459fc7ba8223b50f0616767f9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    107 <tr class="memitem:af30233565856480ea48b6fa0d6dec65b"><td class="memItemLeft" align="right" valign="top"><a id="af30233565856480ea48b6fa0d6dec65b"></a>
    108 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#af30233565856480ea48b6fa0d6dec65b">Visit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_text.html">XMLText</a> &amp;)</td></tr>
    109 <tr class="memdesc:af30233565856480ea48b6fa0d6dec65b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a text node. <br /></td></tr>
    110 <tr class="separator:af30233565856480ea48b6fa0d6dec65b"><td class="memSeparator" colspan="2">&#160;</td></tr>
    111 <tr class="memitem:acc8147fb5a85f6c65721654e427752d7"><td class="memItemLeft" align="right" valign="top"><a id="acc8147fb5a85f6c65721654e427752d7"></a>
    112 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#acc8147fb5a85f6c65721654e427752d7">Visit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_comment.html">XMLComment</a> &amp;)</td></tr>
    113 <tr class="memdesc:acc8147fb5a85f6c65721654e427752d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a comment node. <br /></td></tr>
    114 <tr class="separator:acc8147fb5a85f6c65721654e427752d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
    115 <tr class="memitem:a14e4748387c34bf53d24e8119bb1f292"><td class="memItemLeft" align="right" valign="top"><a id="a14e4748387c34bf53d24e8119bb1f292"></a>
    116 virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#a14e4748387c34bf53d24e8119bb1f292">Visit</a> (const <a class="el" href="classtinyxml2_1_1_x_m_l_unknown.html">XMLUnknown</a> &amp;)</td></tr>
    117 <tr class="memdesc:a14e4748387c34bf53d24e8119bb1f292"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an unknown node. <br /></td></tr>
    118 <tr class="separator:a14e4748387c34bf53d24e8119bb1f292"><td class="memSeparator" colspan="2">&#160;</td></tr>
    119 </table>
    120 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    121 <div class="textblock"><p>Implements the interface to the "Visitor pattern" (see the Accept() method.) If you call the Accept() method, it requires being passed a <a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html">XMLVisitor</a> class to handle callbacks. For nodes that contain other nodes (Document, Element) you will get called with a VisitEnter/VisitExit pair. Nodes that are always leafs are simply called with <a class="el" href="classtinyxml2_1_1_x_m_l_visitor.html#adc75bd459fc7ba8223b50f0616767f9a" title="Visit a declaration. ">Visit()</a>.</p>
    122 <p>If you return 'true' from a Visit method, recursive parsing will continue. If you return false, <b>no children of this node or its siblings</b> will be visited.</p>
    123 <p>All flavors of Visit methods have a default implementation that returns 'true' (continue visiting). You need to only override methods that are interesting to you.</p>
    124 <p>Generally Accept() is called on the <a class="el" href="classtinyxml2_1_1_x_m_l_document.html">XMLDocument</a>, although all nodes support visiting.</p>
    125 <p>You should never change the document from a callback.</p>
    126 <dl class="section see"><dt>See also</dt><dd><a class="el" href="classtinyxml2_1_1_x_m_l_node.html#a81e66df0a44c67a7af17f3b77a152785">XMLNode::Accept()</a> </dd></dl>
    127 </div><hr/>The documentation for this class was generated from the following file:<ul>
    128 <li><a class="el" href="tinyxml2_8h_source.html">tinyxml2.h</a></li>
    129 </ul>
    130 </div><!-- contents -->
    131 <!-- start footer part -->
    132 <hr class="footer"/><address class="footer"><small>
    133 Generated on Tue Nov 6 2018 09:38:26 for TinyXML-2 by &#160;<a href="http://www.doxygen.org/index.html">
    134 <img class="footer" src="doxygen.png" alt="doxygen"/>
    135 </a> 1.8.13
    136 </small></address>
    137 </body>
    138 </html>
    139