blob: 404ae0dc9ea054a3a5f9d46dad8494bea50d6e16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TinyXml: TiXmlVisitor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</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>
<div class="contents">
<h1>TiXmlVisitor Class Reference</h1><!-- doxytag: class="TiXmlVisitor" -->
<p>Implements the interface to the "Visitor pattern" (see the Accept() method.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for TiXmlVisitor:</div>
<div class="dynsection">
<div class="center">
<img src="classTiXmlVisitor.png" usemap="#TiXmlVisitor_map" alt=""/>
<map id="TiXmlVisitor_map" name="TiXmlVisitor_map">
<area href="classTiXmlPrinter.html" alt="TiXmlPrinter" shape="rect" coords="0,56,81,80"/>
</map>
</div>
</div>
<p><a href="classTiXmlVisitor-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07baecb52dd7d8716ae2a48ad0956ee0"></a><!-- doxytag: member="TiXmlVisitor::VisitEnter" ref="a07baecb52dd7d8716ae2a48ad0956ee0" args="(const TiXmlDocument &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0">VisitEnter</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit a document. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0ade4f27087447e93974e975c3246ad"></a><!-- doxytag: member="TiXmlVisitor::VisitExit" ref="aa0ade4f27087447e93974e975c3246ad" args="(const TiXmlDocument &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad">VisitExit</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit a document. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6c6178ffa517bbdba95d70490875fff"></a><!-- doxytag: member="TiXmlVisitor::VisitEnter" ref="af6c6178ffa517bbdba95d70490875fff" args="(const TiXmlElement &, const TiXmlAttribute *)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff">VisitEnter</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &, const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an element. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aec2b1f8116226d52f3a1b95dafd3a32c"></a><!-- doxytag: member="TiXmlVisitor::VisitExit" ref="aec2b1f8116226d52f3a1b95dafd3a32c" args="(const TiXmlElement &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c">VisitExit</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an element. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afad71c71ce6473fb9b4b64cd92de4a19"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="afad71c71ce6473fb9b4b64cd92de4a19" args="(const TiXmlDeclaration &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19">Visit</a> (const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit a declaration. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a399b8ebca5cd14664974a32d2ce029e5"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="a399b8ebca5cd14664974a32d2ce029e5" args="(const TiXmlText &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5">Visit</a> (const <a class="el" href="classTiXmlText.html">TiXmlText</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit a text node. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a53a60e7a528627b31af3161972cc7fa2"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="a53a60e7a528627b31af3161972cc7fa2" args="(const TiXmlComment &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2">Visit</a> (const <a class="el" href="classTiXmlComment.html">TiXmlComment</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit a comment node. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e284d607d275c51dac1adb58159ce28"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="a7e284d607d275c51dac1adb58159ce28" args="(const TiXmlUnknown &)" -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28">Visit</a> (const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an unknow node. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Implements the interface to the "Visitor pattern" (see the Accept() method. </p>
<p>) If you call the Accept() method, it requires being passed a <a class="el" href="classTiXmlVisitor.html" title="Implements the interface to the "Visitor pattern" (see the Accept() method...">TiXmlVisitor</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 leaves are simply called with <a class="el" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19" title="Visit a declaration.">Visit()</a>.</p>
<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 sibilings</b> will be Visited.</p>
<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>
<p>Generally Accept() is called on the <a class="el" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>, although all nodes suppert Visiting.</p>
<p>You should never change the document from a callback.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlNode.html#acc0f88b7462c6cb73809d410a4f5bb86" title="Accept a hierchical visit the nodes in the TinyXML DOM.">TiXmlNode::Accept()</a> </dd></dl>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="tinyxml_8h_source.html">tinyxml.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>
|