Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 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"/> |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 5 | <title>TinyXml: TiXmlDeclaration Class Reference</title> |
Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 6 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 7 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
| 8 | </head> |
| 9 | <body> |
| 10 | <!-- Generated by Doxygen 1.6.2 --> |
| 11 | <div class="navigation" id="top"> |
| 12 | <div class="tabs"> |
| 13 | <ul> |
| 14 | <li><a href="index.html"><span>Main Page</span></a></li> |
| 15 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
| 16 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
| 17 | <li><a href="files.html"><span>Files</span></a></li> |
| 18 | </ul> |
| 19 | </div> |
| 20 | <div class="tabs"> |
| 21 | <ul> |
| 22 | <li><a href="annotated.html"><span>Class List</span></a></li> |
| 23 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
| 24 | <li><a href="functions.html"><span>Class Members</span></a></li> |
| 25 | </ul> |
| 26 | </div> |
| 27 | </div> |
| 28 | <div class="contents"> |
| 29 | <h1>TiXmlDeclaration Class Reference</h1><!-- doxytag: class="TiXmlDeclaration" --><!-- doxytag: inherits="TiXmlNode" --> |
| 30 | <p>In correct XML the declaration is the first entry in the file. |
| 31 | <a href="#_details">More...</a></p> |
| 32 | |
| 33 | <p><code>#include <<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a>></code></p> |
| 34 | <div class="dynheader"> |
| 35 | Inheritance diagram for TiXmlDeclaration:</div> |
| 36 | <div class="dynsection"> |
| 37 | <div class="center"> |
| 38 | <img src="classTiXmlDeclaration.png" usemap="#TiXmlDeclaration_map" alt=""/> |
| 39 | <map id="TiXmlDeclaration_map" name="TiXmlDeclaration_map"> |
| 40 | <area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,108,80"/> |
| 41 | <area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,108,24"/> |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 42 | </map> |
Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 43 | </div> |
| 44 | </div> |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 45 | |
Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 46 | <p><a href="classTiXmlDeclaration-members.html">List of all members.</a></p> |
| 47 | <table border="0" cellpadding="0" cellspacing="0"> |
| 48 | <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> |
| 49 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0484d059bea0ea1acb47c9094382d79"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="aa0484d059bea0ea1acb47c9094382d79" args="()" --> |
| 50 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a> ()</td></tr> |
| 51 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an empty declaration. <br/></td></tr> |
| 52 | <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)" --> |
| 53 | </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> |
| 54 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr> |
| 55 | <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)" --> |
| 56 | </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> |
| 57 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct. <br/></td></tr> |
| 58 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02ee557b1a4545c3219ed377c103ec76"></a><!-- doxytag: member="TiXmlDeclaration::Version" ref="a02ee557b1a4545c3219ed377c103ec76" args="() const " --> |
| 59 | const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76">Version</a> () const </td></tr> |
| 60 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Version. Will return an empty string if none was found. <br/></td></tr> |
| 61 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d974231f9e9a2f0542f15f3a46cdb76"></a><!-- doxytag: member="TiXmlDeclaration::Encoding" ref="a5d974231f9e9a2f0542f15f3a46cdb76" args="() const " --> |
| 62 | const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76">Encoding</a> () const </td></tr> |
| 63 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Encoding. Will return an empty string if none was found. <br/></td></tr> |
| 64 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ff06afc033d7ef730ec7c6825b97ad9"></a><!-- doxytag: member="TiXmlDeclaration::Standalone" ref="a9ff06afc033d7ef730ec7c6825b97ad9" args="() const " --> |
| 65 | const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9">Standalone</a> () const </td></tr> |
| 66 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Is this a standalone document? <br/></td></tr> |
| 67 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7cf459186040141cda7a180a6585ce2e"></a><!-- doxytag: member="TiXmlDeclaration::Clone" ref="a7cf459186040141cda7a180a6585ce2e" args="() const " --> |
| 68 | 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> |
| 69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a copy of this Declaration and returns it. <br/></td></tr> |
| 70 | <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> |
| 71 | <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> |
| 72 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e085d3fefd1dbf5ccdbff729931a967"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="a1e085d3fefd1dbf5ccdbff729931a967" args="() const " --> |
| 73 | 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> |
| 74 | <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> |
| 75 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bd3d1daddcaeb9543c24bfd090969ce"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="a6bd3d1daddcaeb9543c24bfd090969ce" args="()" --> |
| 76 | 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> |
| 77 | <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> |
| 78 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22315a535983b86535cdba3458669e3e"></a><!-- doxytag: member="TiXmlDeclaration::Accept" ref="a22315a535983b86535cdba3458669e3e" args="(TiXmlVisitor *visitor) const " --> |
| 79 | 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> |
| 80 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br/></td></tr> |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 81 | </table> |
Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 82 | <hr/><a name="_details"></a><h2>Detailed Description</h2> |
| 83 | <p>In correct XML the declaration is the first entry in the file. </p> |
| 84 | <div class="fragment"><pre class="fragment"> |
| 85 | <?xml version="1.0" standalone="yes"?> |
| 86 | </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> |
| 87 | <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> |
| 88 | <hr/><h2>Member Function Documentation</h2> |
| 89 | <a class="anchor" id="abf6303db4bd05b5be554036817ff1cb4"></a><!-- doxytag: member="TiXmlDeclaration::Print" ref="abf6303db4bd05b5be554036817ff1cb4" args="(FILE *cfile, int depth) const " --> |
| 90 | <div class="memitem"> |
| 91 | <div class="memproto"> |
| 92 | <table class="memname"> |
| 93 | <tr> |
| 94 | <td class="memname">virtual void TiXmlDeclaration::Print </td> |
| 95 | <td>(</td> |
| 96 | <td class="paramtype">FILE * </td> |
| 97 | <td class="paramname"> <em>cfile</em>, </td> |
| 98 | </tr> |
| 99 | <tr> |
| 100 | <td class="paramkey"></td> |
| 101 | <td></td> |
| 102 | <td class="paramtype">int </td> |
| 103 | <td class="paramname"> <em>depth</em></td><td> </td> |
| 104 | </tr> |
| 105 | <tr> |
| 106 | <td></td> |
| 107 | <td>)</td> |
| 108 | <td></td><td></td><td> const<code> [inline, virtual]</code></td> |
| 109 | </tr> |
| 110 | </table> |
| 111 | </div> |
| 112 | <div class="memdoc"> |
| 113 | |
| 114 | <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> |
| 115 | <p>) Either or both cfile and str can be null.</p> |
| 116 | <p>This is a formatted print, and will insert tabs and newlines.</p> |
| 117 | <p>(For an unformatted stream, use the << operator.) </p> |
| 118 | |
| 119 | <p>Implements <a class="el" href="classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.</p> |
| 120 | |
| 121 | </div> |
| 122 | </div> |
| 123 | <hr/>The documentation for this class was generated from the following file:<ul> |
| 124 | <li><a class="el" href="tinyxml_8h_source.html">tinyxml.h</a></li> |
| 125 | </ul> |
| 126 | </div> |
| 127 | <hr size="1"/><address style="text-align: right;"><small>Generated by |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 128 | <a href="http://www.doxygen.org/index.html"> |
Dan Albert | c3bbea3 | 2014-08-21 15:48:37 -0700 | [diff] [blame^] | 129 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
The Android Open Source Project | 562be06 | 2009-03-03 19:30:48 -0800 | [diff] [blame] | 130 | </body> |
| 131 | </html> |