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
|
<!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: TiXmlDeclaration 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>TiXmlDeclaration Class Reference</h1><!-- doxytag: class="TiXmlDeclaration" --><!-- doxytag: inherits="TiXmlNode" -->
<p>In correct XML the declaration is the first entry in the file.
<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 TiXmlDeclaration:</div>
<div class="dynsection">
<div class="center">
<img src="classTiXmlDeclaration.png" usemap="#TiXmlDeclaration_map" alt=""/>
<map id="TiXmlDeclaration_map" name="TiXmlDeclaration_map">
<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,108,80"/>
<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,108,24"/>
</map>
</div>
</div>
<p><a href="classTiXmlDeclaration-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="aa0484d059bea0ea1acb47c9094382d79"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="aa0484d059bea0ea1acb47c9094382d79" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an empty declaration. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd5556007c3c72209465081de39d9836"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="acd5556007c3c72209465081de39d9836" args="(const std::string &_version, const std::string &_encoding, const std::string &_standalone)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#acd5556007c3c72209465081de39d9836">TiXmlDeclaration</a> (const std::string &_version, const std::string &_encoding, const std::string &_standalone)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b618d1c30c25e4b7a71f31a595ee298"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="a3b618d1c30c25e4b7a71f31a595ee298" args="(const char *_version, const char *_encoding, const char *_standalone)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a3b618d1c30c25e4b7a71f31a595ee298">TiXmlDeclaration</a> (const char *_version, const char *_encoding, const char *_standalone)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02ee557b1a4545c3219ed377c103ec76"></a><!-- doxytag: member="TiXmlDeclaration::Version" ref="a02ee557b1a4545c3219ed377c103ec76" args="() const " -->
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76">Version</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Version. Will return an empty string if none was found. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d974231f9e9a2f0542f15f3a46cdb76"></a><!-- doxytag: member="TiXmlDeclaration::Encoding" ref="a5d974231f9e9a2f0542f15f3a46cdb76" args="() const " -->
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76">Encoding</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Encoding. Will return an empty string if none was found. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ff06afc033d7ef730ec7c6825b97ad9"></a><!-- doxytag: member="TiXmlDeclaration::Standalone" ref="a9ff06afc033d7ef730ec7c6825b97ad9" args="() const " -->
const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9">Standalone</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Is this a standalone document? <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7cf459186040141cda7a180a6585ce2e"></a><!-- doxytag: member="TiXmlDeclaration::Clone" ref="a7cf459186040141cda7a180a6585ce2e" args="() const " -->
virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a7cf459186040141cda7a180a6585ce2e">Clone</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a copy of this Declaration and returns it. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4">Print</a> (FILE *cfile, int depth) const </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="#abf6303db4bd05b5be554036817ff1cb4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e085d3fefd1dbf5ccdbff729931a967"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="a1e085d3fefd1dbf5ccdbff729931a967" args="() const " -->
virtual const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967">ToDeclaration</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bd3d1daddcaeb9543c24bfd090969ce"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="a6bd3d1daddcaeb9543c24bfd090969ce" args="()" -->
virtual <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce">ToDeclaration</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22315a535983b86535cdba3458669e3e"></a><!-- doxytag: member="TiXmlDeclaration::Accept" ref="a22315a535983b86535cdba3458669e3e" args="(TiXmlVisitor *visitor) const " -->
virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a22315a535983b86535cdba3458669e3e">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *visitor) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>In correct XML the declaration is the first entry in the file. </p>
<div class="fragment"><pre class="fragment">
<?xml version="1.0" standalone="yes"?>
</pre></div><p>TinyXml will happily read or write files without a declaration, however. There are 3 possible attributes to the declaration: version, encoding, and standalone.</p>
<p>Note: In this version of the code, the attributes are handled as special cases, not generic attributes, simply because there can only be at most 3 and they are always the same. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abf6303db4bd05b5be554036817ff1cb4"></a><!-- doxytag: member="TiXmlDeclaration::Print" ref="abf6303db4bd05b5be554036817ff1cb4" args="(FILE *cfile, int depth) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void TiXmlDeclaration::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> [inline, 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>Implements <a class="el" href="classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.</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>
|