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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
<!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: TiXmlBase 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>TiXmlBase Class Reference</h1><!-- doxytag: class="TiXmlBase" -->
<p><a class="el" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a> is a base class for every class in TinyXml.
<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 TiXmlBase:</div>
<div class="dynsection">
<div class="center">
<img src="classTiXmlBase.png" usemap="#TiXmlBase_map" alt=""/>
<map id="TiXmlBase_map" name="TiXmlBase_map">
<area href="classTiXmlAttribute.html" alt="TiXmlAttribute" shape="rect" coords="0,56,108,80"/>
<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="295,56,403,80"/>
<area href="classTiXmlComment.html" alt="TiXmlComment" shape="rect" coords="0,112,108,136"/>
<area href="classTiXmlDeclaration.html" alt="TiXmlDeclaration" shape="rect" coords="118,112,226,136"/>
<area href="classTiXmlDocument.html" alt="TiXmlDocument" shape="rect" coords="236,112,344,136"/>
<area href="classTiXmlElement.html" alt="TiXmlElement" shape="rect" coords="354,112,462,136"/>
<area href="classTiXmlText.html" alt="TiXmlText" shape="rect" coords="472,112,580,136"/>
<area href="classTiXmlUnknown.html" alt="TiXmlUnknown" shape="rect" coords="590,112,698,136"/>
</map>
</div>
</div>
<p><a href="classTiXmlBase-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">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512">Print</a> (FILE *cfile, int depth) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. <a href="#a0de56b3f2ef14c65091a3b916437b512"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853">Row</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the position, in the original source file, of this node or attribute. <a href="#a024bceb070188df92c2a8d8852dd0853"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab54bfb9b70fe6dd276e7b279cab7f003"></a><!-- doxytag: member="TiXmlBase::Column" ref="ab54bfb9b70fe6dd276e7b279cab7f003" args="() const " -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003">Column</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See <a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853" title="Return the position, in the original source file, of this node or attribute.">Row()</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6b3e0f790930d4970ec30764e937b5d"></a><!-- doxytag: member="TiXmlBase::SetUserData" ref="ac6b3e0f790930d4970ec30764e937b5d" args="(void *user)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d">SetUserData</a> (void *user)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a pointer to arbitrary user data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6559a530ca6763fc301a14d77ed28c17"></a><!-- doxytag: member="TiXmlBase::GetUserData" ref="a6559a530ca6763fc301a14d77ed28c17" args="()" -->
void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17">GetUserData</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to arbitrary user data. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad0120210e4680ef2088601753ce0ede4"></a><!-- doxytag: member="TiXmlBase::GetUserData" ref="ad0120210e4680ef2088601753ce0ede4" args="() const " -->
const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4">GetUserData</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to arbitrary user data. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a> (bool condense)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The world does not agree on whether white space should be kept or not. <a href="#a0f799ec645bfb8d8a969e83478f379c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4b1472531c647a25b1840a87ae42438"></a><!-- doxytag: member="TiXmlBase::IsWhiteSpaceCondensed" ref="ad4b1472531c647a25b1840a87ae42438" args="()" -->
static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the current white space setting. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a6bd8c315c1acb09e34107b8736505948">EncodeString</a> (const TIXML_STRING &str, TIXML_STRING *out)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Expands entities in a string. <a href="#a6bd8c315c1acb09e34107b8736505948"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab242c01590191f644569fa89a080d97c"></a><!-- doxytag: member="TiXmlBase::userData" ref="ab242c01590191f644569fa89a080d97c" args="" -->
void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c">userData</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Field containing a generic user pointer. <br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a218872a0d985ae30e78c55adc4bdb196"></a><!-- doxytag: member="TiXmlBase::TiXmlNode" ref="a218872a0d985ae30e78c55adc4bdb196" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a218872a0d985ae30e78c55adc4bdb196">TiXmlNode</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6592e32cb9132be517cc12a70564c4b"></a><!-- doxytag: member="TiXmlBase::TiXmlElement" ref="ab6592e32cb9132be517cc12a70564c4b" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#ab6592e32cb9132be517cc12a70564c4b">TiXmlElement</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a173617f6dfe902cf484ce5552b950475"></a><!-- doxytag: member="TiXmlBase::TiXmlDocument" ref="a173617f6dfe902cf484ce5552b950475" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a173617f6dfe902cf484ce5552b950475">TiXmlDocument</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a> is a base class for every class in TinyXml. </p>
<p>It does little except to establish that TinyXml classes can be printed and provide some utility functions.</p>
<p>In XML, the document and elements can contain other elements and other types of nodes.</p>
<div class="fragment"><pre class="fragment">
A Document can contain: Element (container or leaf)
Comment (leaf)
Unknown (leaf)
Declaration( leaf )
An Element can contain: Element (container or leaf)
Text (leaf)
Attributes (not on tree)
Comment (leaf)
Unknown (leaf)
A Decleration contains: Attributes (not on tree)
</pre></div> <hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6bd8c315c1acb09e34107b8736505948"></a><!-- doxytag: member="TiXmlBase::EncodeString" ref="a6bd8c315c1acb09e34107b8736505948" args="(const TIXML_STRING &str, TIXML_STRING *out)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void TiXmlBase::EncodeString </td>
<td>(</td>
<td class="paramtype">const TIXML_STRING & </td>
<td class="paramname"> <em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">TIXML_STRING * </td>
<td class="paramname"> <em>out</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Expands entities in a string. </p>
<p>Note this should not contian the tag's '<', '>', etc, or they will be transformed into entities! </p>
</div>
</div>
<a class="anchor" id="a0de56b3f2ef14c65091a3b916437b512"></a><!-- doxytag: member="TiXmlBase::Print" ref="a0de56b3f2ef14c65091a3b916437b512" args="(FILE *cfile, int depth) const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void TiXmlBase::Print </td>
<td>(</td>
<td class="paramtype">FILE * </td>
<td class="paramname"> <em>cfile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>depth</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. </p>
<p>) Either or both cfile and str can be null.</p>
<p>This is a formatted print, and will insert tabs and newlines.</p>
<p>(For an unformatted stream, use the << operator.) </p>
<p>Implemented in <a class="el" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a">TiXmlAttribute</a>, <a class="el" href="classTiXmlElement.html#afbf52736e70fc91ec9d760721d6f4fd2">TiXmlElement</a>, <a class="el" href="classTiXmlComment.html#a6b316527aaa8da0370cd68c22a5a0f5f">TiXmlComment</a>, <a class="el" href="classTiXmlText.html#a0cafbf6f236c7f02d12b2bffc2b7976b">TiXmlText</a>, <a class="el" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4">TiXmlDeclaration</a>, <a class="el" href="classTiXmlUnknown.html#a31ba089a40fb5a1869750fce09b0bacb">TiXmlUnknown</a>, and <a class="el" href="classTiXmlDocument.html#a8701fda1fa31b25abbc9c0df42da10e8">TiXmlDocument</a>.</p>
</div>
</div>
<a class="anchor" id="a024bceb070188df92c2a8d8852dd0853"></a><!-- doxytag: member="TiXmlBase::Row" ref="a024bceb070188df92c2a8d8852dd0853" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int TiXmlBase::Row </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the position, in the original source file, of this node or attribute. </p>
<p>The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value.</p>
<p>Generally, the row and column value will be set when the TiXmlDocument::Load(), <a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">TiXmlDocument::LoadFile()</a>, or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>.</p>
<p>The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document.</p>
<p>There is a minor performance cost to computing the row and column. Computation can be disabled if <a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">TiXmlDocument::SetTabSize()</a> is called with 0 as the value.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">TiXmlDocument::SetTabSize()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a0f799ec645bfb8d8a969e83478f379c1"></a><!-- doxytag: member="TiXmlBase::SetCondenseWhiteSpace" ref="a0f799ec645bfb8d8a969e83478f379c1" args="(bool condense)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void TiXmlBase::SetCondenseWhiteSpace </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>condense</em></td>
<td> ) </td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The world does not agree on whether white space should be kept or not. </p>
<p>In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe. </p>
</div>
</div>
<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>
|