diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:56 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:11:56 +0200 |
commit | 98ecf620f7de377dc8ae9ad7fbd1e3b24477e138 (patch) | |
tree | faadc6d8822c20cd3bc6f50b2a98e6c580585949 /shared/tinyxml/docs | |
parent | 3.16 (diff) | |
download | FreeFileSync-98ecf620f7de377dc8ae9ad7fbd1e3b24477e138.tar.gz FreeFileSync-98ecf620f7de377dc8ae9ad7fbd1e3b24477e138.tar.bz2 FreeFileSync-98ecf620f7de377dc8ae9ad7fbd1e3b24477e138.zip |
3.17
Diffstat (limited to 'shared/tinyxml/docs')
-rw-r--r-- | shared/tinyxml/docs/classTiXmlDocument.html | 6 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlElement-members.html | 2 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlElement.html | 35 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlHandle.html | 16 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlNode.html | 4 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlPrinter.html | 2 | ||||
-rw-r--r-- | shared/tinyxml/docs/classTiXmlVisitor.html | 2 | ||||
-rw-r--r-- | shared/tinyxml/docs/functions_0x71.html | 6 | ||||
-rw-r--r-- | shared/tinyxml/docs/functions_func_0x71.html | 6 | ||||
-rw-r--r-- | shared/tinyxml/docs/index.html | 2 | ||||
-rw-r--r-- | shared/tinyxml/docs/tinystr_8h_source.html | 594 | ||||
-rw-r--r-- | shared/tinyxml/docs/tinyxml_8h_source.html | 917 |
12 files changed, 814 insertions, 778 deletions
diff --git a/shared/tinyxml/docs/classTiXmlDocument.html b/shared/tinyxml/docs/classTiXmlDocument.html index 107101cb..b46bb27c 100644 --- a/shared/tinyxml/docs/classTiXmlDocument.html +++ b/shared/tinyxml/docs/classTiXmlDocument.html @@ -309,7 +309,7 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr <p>Load a file using the current document value. </p> <p>Returns true if successful. Will delete any existing document data before loading. </p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01425">LoadFile()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01432">LoadFile()</a>.</p> </div> </div> @@ -368,9 +368,9 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr <p>Write the document to standard out using formatted printing ("pretty print"). </p> -<p>References <a class="el" href="tinyxml_8h_source.html#l01512">Print()</a>.</p> +<p>References <a class="el" href="tinyxml_8h_source.html#l01519">Print()</a>.</p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01512">Print()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01519">Print()</a>.</p> </div> </div> diff --git a/shared/tinyxml/docs/classTiXmlElement-members.html b/shared/tinyxml/docs/classTiXmlElement-members.html index dff303a8..dc8a33be 100644 --- a/shared/tinyxml/docs/classTiXmlElement-members.html +++ b/shared/tinyxml/docs/classTiXmlElement-members.html @@ -82,10 +82,12 @@ <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#afbf52736e70fc91ec9d760721d6f4fd2">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff">QueryBoolAttribute</a>(const char *name, bool *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a>(const char *name, double *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be">QueryFloatAttribute</a>(const char *name, float *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a>(const char *name, int *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">QueryStringAttribute</a>(const char *name, std::string *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d">QueryUnsignedAttribute</a>(const char *name, unsigned *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">QueryValueAttribute</a>(const std::string &name, T *outValue) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a56979767deca794376b1dfa69a525b2a">RemoveAttribute</a>(const char *name)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a">RemoveAttribute</a>(const std::string &name)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr> diff --git a/shared/tinyxml/docs/classTiXmlElement.html b/shared/tinyxml/docs/classTiXmlElement.html index ac1b3d7a..4d6a5e93 100644 --- a/shared/tinyxml/docs/classTiXmlElement.html +++ b/shared/tinyxml/docs/classTiXmlElement.html @@ -61,6 +61,11 @@ const char * </td><td class="memItemRight" valign="bottom"><a class="el" hr <tr><td class="mdescLeft"> </td><td class="mdescRight">Given an attribute name, <a class="el" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <a href="#aeaff99d4f0ea5b34f7aee202aad457ba"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a> (const char *name, int *_value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">QueryIntAttribute examines the attribute - it is an alternative to the <a class="el" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> method with richer error checking. <a href="#aea0bfe471380f281c5945770ddbf52b9"></a><br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae48df644f890ab86fa19839ac401f00d"></a><!-- doxytag: member="TiXmlElement::QueryUnsignedAttribute" ref="ae48df644f890ab86fa19839ac401f00d" args="(const char *name, unsigned *_value) const " --> +int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d">QueryUnsignedAttribute</a> (const char *name, unsigned *_value) const </td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">QueryUnsignedAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr> +<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff">QueryBoolAttribute</a> (const char *name, bool *_value) const </td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">QueryBoolAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <a href="#af4a1d3f88c28eb0f3115dc39ebd83fff"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a898d7730ecc341f0bffc7a9dadbf1ce7"></a><!-- doxytag: member="TiXmlElement::QueryDoubleAttribute" ref="a898d7730ecc341f0bffc7a9dadbf1ce7" args="(const char *name, double *_value) const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a> (const char *name, double *_value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">QueryDoubleAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br/></td></tr> @@ -244,6 +249,36 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr </div> </div> +<a class="anchor" id="af4a1d3f88c28eb0f3115dc39ebd83fff"></a><!-- doxytag: member="TiXmlElement::QueryBoolAttribute" ref="af4a1d3f88c28eb0f3115dc39ebd83fff" args="(const char *name, bool *_value) const " --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int TiXmlElement::QueryBoolAttribute </td> + <td>(</td> + <td class="paramtype">const char * </td> + <td class="paramname"> <em>name</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">bool * </td> + <td class="paramname"> <em>_value</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td> const</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p>QueryBoolAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. </p> +<p>Note that '1', 'true', or 'yes' are considered true, while '0', 'false' and 'no' are considered false. </p> + +</div> +</div> <a class="anchor" id="aea0bfe471380f281c5945770ddbf52b9"></a><!-- doxytag: member="TiXmlElement::QueryIntAttribute" ref="aea0bfe471380f281c5945770ddbf52b9" args="(const char *name, int *_value) const " --> <div class="memitem"> <div class="memproto"> diff --git a/shared/tinyxml/docs/classTiXmlHandle.html b/shared/tinyxml/docs/classTiXmlHandle.html index 0e0d45e3..59ee217c 100644 --- a/shared/tinyxml/docs/classTiXmlHandle.html +++ b/shared/tinyxml/docs/classTiXmlHandle.html @@ -249,7 +249,7 @@ <div class="memdoc"> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>use ToElement. Return the handle as a <a class="el" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>. This may return null. </dd></dl> -<p>References <a class="el" href="tinyxml_8h_source.html#l01681">ToElement()</a>.</p> +<p>References <a class="el" href="tinyxml_8h_source.html#l01688">ToElement()</a>.</p> </div> </div> @@ -269,7 +269,7 @@ <div class="memdoc"> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>use ToNode. Return the handle as a <a class="el" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>. This may return null. </dd></dl> -<p>References <a class="el" href="tinyxml_8h_source.html#l01678">ToNode()</a>.</p> +<p>References <a class="el" href="tinyxml_8h_source.html#l01685">ToNode()</a>.</p> </div> </div> @@ -289,7 +289,7 @@ <div class="memdoc"> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>use <a class="el" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText()</a> Return the handle as a <a class="el" href="classTiXmlText.html" title="XML text.">TiXmlText</a>. This may return null. </dd></dl> -<p>References <a class="el" href="tinyxml_8h_source.html#l01684">ToText()</a>.</p> +<p>References <a class="el" href="tinyxml_8h_source.html#l01691">ToText()</a>.</p> </div> </div> @@ -311,7 +311,7 @@ <p>Return the handle as a <a class="el" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>. </p> <p>This may return null. </p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01696">Element()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01703">Element()</a>.</p> </div> </div> @@ -333,7 +333,7 @@ <p>Return the handle as a <a class="el" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>. </p> <p>This may return null. </p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01692">Node()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01699">Node()</a>.</p> </div> </div> @@ -355,7 +355,7 @@ <p>Return the handle as a <a class="el" href="classTiXmlText.html" title="XML text.">TiXmlText</a>. </p> <p>This may return null. </p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01700">Text()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01707">Text()</a>.</p> </div> </div> @@ -377,7 +377,7 @@ <p>Return the handle as a <a class="el" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn't recognize is saved as an unknown.">TiXmlUnknown</a>. </p> <p>This may return null. </p> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01704">Unknown()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01711">Unknown()</a>.</p> </div> </div> @@ -397,7 +397,7 @@ <div class="memdoc"> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>use <a class="el" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown()</a> Return the handle as a <a class="el" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn't recognize is saved as an unknown.">TiXmlUnknown</a>. This may return null. </dd></dl> -<p>References <a class="el" href="tinyxml_8h_source.html#l01687">ToUnknown()</a>.</p> +<p>References <a class="el" href="tinyxml_8h_source.html#l01694">ToUnknown()</a>.</p> </div> </div> diff --git a/shared/tinyxml/docs/classTiXmlNode.html b/shared/tinyxml/docs/classTiXmlNode.html index 50b3464a..5ba4bcf3 100644 --- a/shared/tinyxml/docs/classTiXmlNode.html +++ b/shared/tinyxml/docs/classTiXmlNode.html @@ -573,7 +573,7 @@ std::string & </td><td class="memItemRight" valign="bottom"><a class="e Unknown: the tag contents Text: the text string </pre></div> -<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01161">TiXmlComment::TiXmlComment()</a>, and <a class="el" href="tinyxml_8h_source.html#l01213">TiXmlText::TiXmlText()</a>.</p> +<p>Referenced by <a class="el" href="tinyxml_8h_source.html#l01168">TiXmlComment::TiXmlComment()</a>, and <a class="el" href="tinyxml_8h_source.html#l01220">TiXmlText::TiXmlText()</a>.</p> </div> </div> @@ -593,7 +593,7 @@ std::string & </td><td class="memItemRight" valign="bottom"><a class="e <div class="memdoc"> <p>Query the type (as an enumerated value, above) of this node. </p> -<p>The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION. </p> +<p>The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION. </p> </div> </div> diff --git a/shared/tinyxml/docs/classTiXmlPrinter.html b/shared/tinyxml/docs/classTiXmlPrinter.html index bfbf4187..28be1e88 100644 --- a/shared/tinyxml/docs/classTiXmlPrinter.html +++ b/shared/tinyxml/docs/classTiXmlPrinter.html @@ -68,7 +68,7 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr <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="ad2dca6dd106e8982fd3c7db1f3330970"></a><!-- doxytag: member="TiXmlPrinter::Visit" ref="ad2dca6dd106e8982fd3c7db1f3330970" args="(const TiXmlUnknown &unknown)" --> virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#ad2dca6dd106e8982fd3c7db1f3330970">Visit</a> (const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> &unknown)</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an unknow node. <br/></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an unknown node. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e">SetIndent</a> (const char *_indent)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the indent characters for printing. <a href="#a213377a4070c7e625bae59716b089e5e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb33ec7d4bad6aaeb57f4304394b133d"></a><!-- doxytag: member="TiXmlPrinter::Indent" ref="abb33ec7d4bad6aaeb57f4304394b133d" args="()" --> diff --git a/shared/tinyxml/docs/classTiXmlVisitor.html b/shared/tinyxml/docs/classTiXmlVisitor.html index 404ae0dc..60c6a27d 100644 --- a/shared/tinyxml/docs/classTiXmlVisitor.html +++ b/shared/tinyxml/docs/classTiXmlVisitor.html @@ -68,7 +68,7 @@ virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" hr <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> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Visit an unknown 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> diff --git a/shared/tinyxml/docs/functions_0x71.html b/shared/tinyxml/docs/functions_0x71.html index c7882b83..d2fd5c60 100644 --- a/shared/tinyxml/docs/functions_0x71.html +++ b/shared/tinyxml/docs/functions_0x71.html @@ -59,6 +59,9 @@ Here is a list of all documented class members with links to the class documentation for each member: <h3><a class="anchor" id="index_q">- q -</a></h3><ul> +<li>QueryBoolAttribute() +: <a class="el" href="classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff">TiXmlElement</a> +</li> <li>QueryDoubleAttribute() : <a class="el" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7">TiXmlElement</a> </li> @@ -77,6 +80,9 @@ Here is a list of all documented class members with links to the class documenta <li>QueryStringAttribute() : <a class="el" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">TiXmlElement</a> </li> +<li>QueryUnsignedAttribute() +: <a class="el" href="classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d">TiXmlElement</a> +</li> <li>QueryValueAttribute() : <a class="el" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">TiXmlElement</a> </li> diff --git a/shared/tinyxml/docs/functions_func_0x71.html b/shared/tinyxml/docs/functions_func_0x71.html index 27402292..4d236d2a 100644 --- a/shared/tinyxml/docs/functions_func_0x71.html +++ b/shared/tinyxml/docs/functions_func_0x71.html @@ -58,6 +58,9 @@ <h3><a class="anchor" id="index_q">- q -</a></h3><ul> +<li>QueryBoolAttribute() +: <a class="el" href="classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff">TiXmlElement</a> +</li> <li>QueryDoubleAttribute() : <a class="el" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7">TiXmlElement</a> </li> @@ -76,6 +79,9 @@ <li>QueryStringAttribute() : <a class="el" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">TiXmlElement</a> </li> +<li>QueryUnsignedAttribute() +: <a class="el" href="classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d">TiXmlElement</a> +</li> <li>QueryValueAttribute() : <a class="el" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">TiXmlElement</a> </li> diff --git a/shared/tinyxml/docs/index.html b/shared/tinyxml/docs/index.html index 1cb925ba..d89b21a7 100644 --- a/shared/tinyxml/docs/index.html +++ b/shared/tinyxml/docs/index.html @@ -19,7 +19,7 @@ </div> </div> <div class="contents"> -<h1>TinyXml Documentation</h1><h3 class="version">2.6.1 </h3><h1>TinyXML </h1> +<h1>TinyXml Documentation</h1><h3 class="version">2.6.2 </h3><h1>TinyXML </h1> <p>TinyXML is a simple, small, C++ XML parser that can be easily integrated into other programs.</p> <h2>What it does. </h2> <p>In brief, TinyXML parses an XML document, and builds from that a Document Object Model (DOM) that can be read, modified, and saved.</p> diff --git a/shared/tinyxml/docs/tinystr_8h_source.html b/shared/tinyxml/docs/tinystr_8h_source.html index eddeda87..579a90e0 100644 --- a/shared/tinyxml/docs/tinystr_8h_source.html +++ b/shared/tinyxml/docs/tinystr_8h_source.html @@ -24,323 +24,309 @@ </div> <h1>tinystr.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span> -<a name="l00003"></a>00003 <span class="comment">Original file by Yves Berquin.</span> -<a name="l00004"></a>00004 <span class="comment"></span> -<a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span> -<a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span> -<a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span> -<a name="l00008"></a>00008 <span class="comment"></span> -<a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span> -<a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span> -<a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span> -<a name="l00012"></a>00012 <span class="comment"></span> -<a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span> -<a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span> -<a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span> -<a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span> -<a name="l00017"></a>00017 <span class="comment"></span> -<a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span> -<a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span> -<a name="l00020"></a>00020 <span class="comment"></span> -<a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span> -<a name="l00022"></a>00022 <span class="comment">distribution.</span> -<a name="l00023"></a>00023 <span class="comment">*/</span> +<a name="l00003"></a>00003 <span class="comment"></span> +<a name="l00004"></a>00004 <span class="comment">This software is provided 'as-is', without any express or implied</span> +<a name="l00005"></a>00005 <span class="comment">warranty. In no event will the authors be held liable for any</span> +<a name="l00006"></a>00006 <span class="comment">damages arising from the use of this software.</span> +<a name="l00007"></a>00007 <span class="comment"></span> +<a name="l00008"></a>00008 <span class="comment">Permission is granted to anyone to use this software for any</span> +<a name="l00009"></a>00009 <span class="comment">purpose, including commercial applications, and to alter it and</span> +<a name="l00010"></a>00010 <span class="comment">redistribute it freely, subject to the following restrictions:</span> +<a name="l00011"></a>00011 <span class="comment"></span> +<a name="l00012"></a>00012 <span class="comment">1. The origin of this software must not be misrepresented; you must</span> +<a name="l00013"></a>00013 <span class="comment">not claim that you wrote the original software. If you use this</span> +<a name="l00014"></a>00014 <span class="comment">software in a product, an acknowledgment in the product documentation</span> +<a name="l00015"></a>00015 <span class="comment">would be appreciated but is not required.</span> +<a name="l00016"></a>00016 <span class="comment"></span> +<a name="l00017"></a>00017 <span class="comment">2. Altered source versions must be plainly marked as such, and</span> +<a name="l00018"></a>00018 <span class="comment">must not be misrepresented as being the original software.</span> +<a name="l00019"></a>00019 <span class="comment"></span> +<a name="l00020"></a>00020 <span class="comment">3. This notice may not be removed or altered from any source</span> +<a name="l00021"></a>00021 <span class="comment">distribution.</span> +<a name="l00022"></a>00022 <span class="comment">*/</span> +<a name="l00023"></a>00023 <a name="l00024"></a>00024 -<a name="l00025"></a>00025 <span class="comment">/*</span> -<a name="l00026"></a>00026 <span class="comment"> * THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005.</span> -<a name="l00027"></a>00027 <span class="comment"> *</span> -<a name="l00028"></a>00028 <span class="comment"> * - completely rewritten. compact, clean, and fast implementation.</span> -<a name="l00029"></a>00029 <span class="comment"> * - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems)</span> -<a name="l00030"></a>00030 <span class="comment"> * - fixed reserve() to work as per specification.</span> -<a name="l00031"></a>00031 <span class="comment"> * - fixed buggy compares operator==(), operator<(), and operator>()</span> -<a name="l00032"></a>00032 <span class="comment"> * - fixed operator+=() to take a const ref argument, following spec.</span> -<a name="l00033"></a>00033 <span class="comment"> * - added "copy" constructor with length, and most compare operators.</span> -<a name="l00034"></a>00034 <span class="comment"> * - added swap(), clear(), size(), capacity(), operator+().</span> -<a name="l00035"></a>00035 <span class="comment"> */</span> -<a name="l00036"></a>00036 -<a name="l00037"></a>00037 <span class="preprocessor">#ifndef TIXML_USE_STL</span> -<a name="l00038"></a>00038 <span class="preprocessor"></span> -<a name="l00039"></a>00039 <span class="preprocessor">#ifndef TIXML_STRING_INCLUDED</span> -<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define TIXML_STRING_INCLUDED</span> -<a name="l00041"></a>00041 <span class="preprocessor"></span> -<a name="l00042"></a>00042 <span class="preprocessor">#include <assert.h></span> -<a name="l00043"></a>00043 <span class="preprocessor">#include <string.h></span> -<a name="l00044"></a>00044 -<a name="l00045"></a>00045 <span class="comment">/* The support for explicit isn't that universal, and it isn't really</span> -<a name="l00046"></a>00046 <span class="comment"> required - it is used to check that the TiXmlString class isn't incorrectly</span> -<a name="l00047"></a>00047 <span class="comment"> used. Be nice to old compilers and macro it here:</span> -<a name="l00048"></a>00048 <span class="comment">*/</span> -<a name="l00049"></a>00049 <span class="preprocessor">#if defined(_MSC_VER) && (_MSC_VER >= 1200 )</span> -<a name="l00050"></a>00050 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 6 and higher.</span> -<a name="l00051"></a>00051 <span class="preprocessor"> #define TIXML_EXPLICIT explicit</span> -<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__GNUC__) && (__GNUC__ >= 3 )</span> -<a name="l00053"></a>00053 <span class="preprocessor"></span> <span class="comment">// GCC version 3 and higher.s</span> -<a name="l00054"></a>00054 <span class="preprocessor"> #define TIXML_EXPLICIT explicit</span> -<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#else</span> -<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_EXPLICIT</span> -<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span> -<a name="l00058"></a>00058 <span class="preprocessor"></span> -<a name="l00059"></a>00059 -<a name="l00060"></a>00060 <span class="comment">/*</span> -<a name="l00061"></a>00061 <span class="comment"> TiXmlString is an emulation of a subset of the std::string template.</span> -<a name="l00062"></a>00062 <span class="comment"> Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.</span> -<a name="l00063"></a>00063 <span class="comment"> Only the member functions relevant to the TinyXML project have been implemented.</span> -<a name="l00064"></a>00064 <span class="comment"> The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase</span> -<a name="l00065"></a>00065 <span class="comment"> a string and there's no more room, we allocate a buffer twice as big as we need.</span> -<a name="l00066"></a>00066 <span class="comment">*/</span> -<a name="l00067"></a>00067 <span class="keyword">class </span>TiXmlString -<a name="l00068"></a>00068 { -<a name="l00069"></a>00069 <span class="keyword">public</span> : -<a name="l00070"></a>00070 <span class="comment">// The size type used</span> -<a name="l00071"></a>00071 <span class="keyword">typedef</span> <span class="keywordtype">size_t</span> size_type; -<a name="l00072"></a>00072 -<a name="l00073"></a>00073 <span class="comment">// Error value for find primitive</span> -<a name="l00074"></a>00074 <span class="keyword">static</span> <span class="keyword">const</span> size_type npos; <span class="comment">// = -1;</span> -<a name="l00075"></a>00075 +<a name="l00025"></a>00025 <span class="preprocessor">#ifndef TIXML_USE_STL</span> +<a name="l00026"></a>00026 <span class="preprocessor"></span> +<a name="l00027"></a>00027 <span class="preprocessor">#ifndef TIXML_STRING_INCLUDED</span> +<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define TIXML_STRING_INCLUDED</span> +<a name="l00029"></a>00029 <span class="preprocessor"></span> +<a name="l00030"></a>00030 <span class="preprocessor">#include <assert.h></span> +<a name="l00031"></a>00031 <span class="preprocessor">#include <string.h></span> +<a name="l00032"></a>00032 +<a name="l00033"></a>00033 <span class="comment">/* The support for explicit isn't that universal, and it isn't really</span> +<a name="l00034"></a>00034 <span class="comment"> required - it is used to check that the TiXmlString class isn't incorrectly</span> +<a name="l00035"></a>00035 <span class="comment"> used. Be nice to old compilers and macro it here:</span> +<a name="l00036"></a>00036 <span class="comment">*/</span> +<a name="l00037"></a>00037 <span class="preprocessor">#if defined(_MSC_VER) && (_MSC_VER >= 1200 )</span> +<a name="l00038"></a>00038 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 6 and higher.</span> +<a name="l00039"></a>00039 <span class="preprocessor"> #define TIXML_EXPLICIT explicit</span> +<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__GNUC__) && (__GNUC__ >= 3 )</span> +<a name="l00041"></a>00041 <span class="preprocessor"></span> <span class="comment">// GCC version 3 and higher.s</span> +<a name="l00042"></a>00042 <span class="preprocessor"> #define TIXML_EXPLICIT explicit</span> +<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#else</span> +<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_EXPLICIT</span> +<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +<a name="l00046"></a>00046 <span class="preprocessor"></span> +<a name="l00047"></a>00047 +<a name="l00048"></a>00048 <span class="comment">/*</span> +<a name="l00049"></a>00049 <span class="comment"> TiXmlString is an emulation of a subset of the std::string template.</span> +<a name="l00050"></a>00050 <span class="comment"> Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.</span> +<a name="l00051"></a>00051 <span class="comment"> Only the member functions relevant to the TinyXML project have been implemented.</span> +<a name="l00052"></a>00052 <span class="comment"> The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase</span> +<a name="l00053"></a>00053 <span class="comment"> a string and there's no more room, we allocate a buffer twice as big as we need.</span> +<a name="l00054"></a>00054 <span class="comment">*/</span> +<a name="l00055"></a>00055 <span class="keyword">class </span>TiXmlString +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 <span class="keyword">public</span> : +<a name="l00058"></a>00058 <span class="comment">// The size type used</span> +<a name="l00059"></a>00059 <span class="keyword">typedef</span> <span class="keywordtype">size_t</span> size_type; +<a name="l00060"></a>00060 +<a name="l00061"></a>00061 <span class="comment">// Error value for find primitive</span> +<a name="l00062"></a>00062 <span class="keyword">static</span> <span class="keyword">const</span> size_type npos; <span class="comment">// = -1;</span> +<a name="l00063"></a>00063 +<a name="l00064"></a>00064 +<a name="l00065"></a>00065 <span class="comment">// TiXmlString empty constructor</span> +<a name="l00066"></a>00066 TiXmlString () : rep_(&nullrep_) +<a name="l00067"></a>00067 { +<a name="l00068"></a>00068 } +<a name="l00069"></a>00069 +<a name="l00070"></a>00070 <span class="comment">// TiXmlString copy constructor</span> +<a name="l00071"></a>00071 TiXmlString ( <span class="keyword">const</span> TiXmlString & copy) : rep_(0) +<a name="l00072"></a>00072 { +<a name="l00073"></a>00073 init(copy.length()); +<a name="l00074"></a>00074 memcpy(start(), copy.data(), length()); +<a name="l00075"></a>00075 } <a name="l00076"></a>00076 -<a name="l00077"></a>00077 <span class="comment">// TiXmlString empty constructor</span> -<a name="l00078"></a>00078 TiXmlString () : rep_(&nullrep_) +<a name="l00077"></a>00077 <span class="comment">// TiXmlString constructor, based on a string</span> +<a name="l00078"></a>00078 TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * copy) : rep_(0) <a name="l00079"></a>00079 { -<a name="l00080"></a>00080 } -<a name="l00081"></a>00081 -<a name="l00082"></a>00082 <span class="comment">// TiXmlString copy constructor</span> -<a name="l00083"></a>00083 TiXmlString ( <span class="keyword">const</span> TiXmlString & copy) : rep_(0) -<a name="l00084"></a>00084 { -<a name="l00085"></a>00085 init(copy.length()); -<a name="l00086"></a>00086 memcpy(start(), copy.data(), length()); -<a name="l00087"></a>00087 } -<a name="l00088"></a>00088 -<a name="l00089"></a>00089 <span class="comment">// TiXmlString constructor, based on a string</span> -<a name="l00090"></a>00090 TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * copy) : rep_(0) -<a name="l00091"></a>00091 { -<a name="l00092"></a>00092 init( static_cast<size_type>( strlen(copy) )); -<a name="l00093"></a>00093 memcpy(start(), copy, length()); -<a name="l00094"></a>00094 } -<a name="l00095"></a>00095 -<a name="l00096"></a>00096 <span class="comment">// TiXmlString constructor, based on a string</span> -<a name="l00097"></a>00097 TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * str, size_type len) : rep_(0) +<a name="l00080"></a>00080 init( static_cast<size_type>( strlen(copy) )); +<a name="l00081"></a>00081 memcpy(start(), copy, length()); +<a name="l00082"></a>00082 } +<a name="l00083"></a>00083 +<a name="l00084"></a>00084 <span class="comment">// TiXmlString constructor, based on a string</span> +<a name="l00085"></a>00085 TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * str, size_type len) : rep_(0) +<a name="l00086"></a>00086 { +<a name="l00087"></a>00087 init(len); +<a name="l00088"></a>00088 memcpy(start(), str, len); +<a name="l00089"></a>00089 } +<a name="l00090"></a>00090 +<a name="l00091"></a>00091 <span class="comment">// TiXmlString destructor</span> +<a name="l00092"></a>00092 ~TiXmlString () +<a name="l00093"></a>00093 { +<a name="l00094"></a>00094 quit(); +<a name="l00095"></a>00095 } +<a name="l00096"></a>00096 +<a name="l00097"></a>00097 TiXmlString& operator = (<span class="keyword">const</span> <span class="keywordtype">char</span> * copy) <a name="l00098"></a>00098 { -<a name="l00099"></a>00099 init(len); -<a name="l00100"></a>00100 memcpy(start(), str, len); -<a name="l00101"></a>00101 } -<a name="l00102"></a>00102 -<a name="l00103"></a>00103 <span class="comment">// TiXmlString destructor</span> -<a name="l00104"></a>00104 ~TiXmlString () -<a name="l00105"></a>00105 { -<a name="l00106"></a>00106 quit(); -<a name="l00107"></a>00107 } -<a name="l00108"></a>00108 -<a name="l00109"></a>00109 <span class="comment">// = operator</span> -<a name="l00110"></a>00110 TiXmlString& operator = (<span class="keyword">const</span> <span class="keywordtype">char</span> * copy) -<a name="l00111"></a>00111 { -<a name="l00112"></a>00112 <span class="keywordflow">return</span> assign( copy, (size_type)strlen(copy)); -<a name="l00113"></a>00113 } -<a name="l00114"></a>00114 -<a name="l00115"></a>00115 <span class="comment">// = operator</span> -<a name="l00116"></a>00116 TiXmlString& operator = (<span class="keyword">const</span> TiXmlString & copy) -<a name="l00117"></a>00117 { -<a name="l00118"></a>00118 <span class="keywordflow">return</span> assign(copy.start(), copy.length()); -<a name="l00119"></a>00119 } -<a name="l00120"></a>00120 -<a name="l00121"></a>00121 -<a name="l00122"></a>00122 <span class="comment">// += operator. Maps to append</span> -<a name="l00123"></a>00123 TiXmlString& operator += (<span class="keyword">const</span> <span class="keywordtype">char</span> * suffix) -<a name="l00124"></a>00124 { -<a name="l00125"></a>00125 <span class="keywordflow">return</span> append(suffix, static_cast<size_type>( strlen(suffix) )); -<a name="l00126"></a>00126 } -<a name="l00127"></a>00127 -<a name="l00128"></a>00128 <span class="comment">// += operator. Maps to append</span> -<a name="l00129"></a>00129 TiXmlString& operator += (<span class="keywordtype">char</span> single) -<a name="l00130"></a>00130 { -<a name="l00131"></a>00131 <span class="keywordflow">return</span> append(&single, 1); -<a name="l00132"></a>00132 } -<a name="l00133"></a>00133 -<a name="l00134"></a>00134 <span class="comment">// += operator. Maps to append</span> -<a name="l00135"></a>00135 TiXmlString& operator += (<span class="keyword">const</span> TiXmlString & suffix) -<a name="l00136"></a>00136 { -<a name="l00137"></a>00137 <span class="keywordflow">return</span> append(suffix.data(), suffix.length()); -<a name="l00138"></a>00138 } -<a name="l00139"></a>00139 -<a name="l00140"></a>00140 -<a name="l00141"></a>00141 <span class="comment">// Convert a TiXmlString into a null-terminated char *</span> -<a name="l00142"></a>00142 <span class="keyword">const</span> <span class="keywordtype">char</span> * c_str ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } -<a name="l00143"></a>00143 -<a name="l00144"></a>00144 <span class="comment">// Convert a TiXmlString into a char * (need not be null terminated).</span> -<a name="l00145"></a>00145 <span class="keyword">const</span> <span class="keywordtype">char</span> * data ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } -<a name="l00146"></a>00146 -<a name="l00147"></a>00147 <span class="comment">// Return the length of a TiXmlString</span> -<a name="l00148"></a>00148 size_type length ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size; } -<a name="l00149"></a>00149 -<a name="l00150"></a>00150 <span class="comment">// Alias for length()</span> -<a name="l00151"></a>00151 size_type size ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size; } +<a name="l00099"></a>00099 <span class="keywordflow">return</span> assign( copy, (size_type)strlen(copy)); +<a name="l00100"></a>00100 } +<a name="l00101"></a>00101 +<a name="l00102"></a>00102 TiXmlString& operator = (<span class="keyword">const</span> TiXmlString & copy) +<a name="l00103"></a>00103 { +<a name="l00104"></a>00104 <span class="keywordflow">return</span> assign(copy.start(), copy.length()); +<a name="l00105"></a>00105 } +<a name="l00106"></a>00106 +<a name="l00107"></a>00107 +<a name="l00108"></a>00108 <span class="comment">// += operator. Maps to append</span> +<a name="l00109"></a>00109 TiXmlString& operator += (<span class="keyword">const</span> <span class="keywordtype">char</span> * suffix) +<a name="l00110"></a>00110 { +<a name="l00111"></a>00111 <span class="keywordflow">return</span> append(suffix, static_cast<size_type>( strlen(suffix) )); +<a name="l00112"></a>00112 } +<a name="l00113"></a>00113 +<a name="l00114"></a>00114 <span class="comment">// += operator. Maps to append</span> +<a name="l00115"></a>00115 TiXmlString& operator += (<span class="keywordtype">char</span> single) +<a name="l00116"></a>00116 { +<a name="l00117"></a>00117 <span class="keywordflow">return</span> append(&single, 1); +<a name="l00118"></a>00118 } +<a name="l00119"></a>00119 +<a name="l00120"></a>00120 <span class="comment">// += operator. Maps to append</span> +<a name="l00121"></a>00121 TiXmlString& operator += (<span class="keyword">const</span> TiXmlString & suffix) +<a name="l00122"></a>00122 { +<a name="l00123"></a>00123 <span class="keywordflow">return</span> append(suffix.data(), suffix.length()); +<a name="l00124"></a>00124 } +<a name="l00125"></a>00125 +<a name="l00126"></a>00126 +<a name="l00127"></a>00127 <span class="comment">// Convert a TiXmlString into a null-terminated char *</span> +<a name="l00128"></a>00128 <span class="keyword">const</span> <span class="keywordtype">char</span> * c_str ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } +<a name="l00129"></a>00129 +<a name="l00130"></a>00130 <span class="comment">// Convert a TiXmlString into a char * (need not be null terminated).</span> +<a name="l00131"></a>00131 <span class="keyword">const</span> <span class="keywordtype">char</span> * data ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } +<a name="l00132"></a>00132 +<a name="l00133"></a>00133 <span class="comment">// Return the length of a TiXmlString</span> +<a name="l00134"></a>00134 size_type length ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size; } +<a name="l00135"></a>00135 +<a name="l00136"></a>00136 <span class="comment">// Alias for length()</span> +<a name="l00137"></a>00137 size_type size ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size; } +<a name="l00138"></a>00138 +<a name="l00139"></a>00139 <span class="comment">// Checks if a TiXmlString is empty</span> +<a name="l00140"></a>00140 <span class="keywordtype">bool</span> empty ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size == 0; } +<a name="l00141"></a>00141 +<a name="l00142"></a>00142 <span class="comment">// Return capacity of string</span> +<a name="l00143"></a>00143 size_type capacity ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->capacity; } +<a name="l00144"></a>00144 +<a name="l00145"></a>00145 +<a name="l00146"></a>00146 <span class="comment">// single char extraction</span> +<a name="l00147"></a>00147 <span class="keyword">const</span> <span class="keywordtype">char</span>& at (size_type index)<span class="keyword"> const</span> +<a name="l00148"></a>00148 <span class="keyword"> </span>{ +<a name="l00149"></a>00149 assert( index < length() ); +<a name="l00150"></a>00150 <span class="keywordflow">return</span> rep_->str[ index ]; +<a name="l00151"></a>00151 } <a name="l00152"></a>00152 -<a name="l00153"></a>00153 <span class="comment">// Checks if a TiXmlString is empty</span> -<a name="l00154"></a>00154 <span class="keywordtype">bool</span> empty ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->size == 0; } -<a name="l00155"></a>00155 -<a name="l00156"></a>00156 <span class="comment">// Return capacity of string</span> -<a name="l00157"></a>00157 size_type capacity ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->capacity; } -<a name="l00158"></a>00158 +<a name="l00153"></a>00153 <span class="comment">// [] operator</span> +<a name="l00154"></a>00154 <span class="keywordtype">char</span>& operator [] (size_type index)<span class="keyword"> const</span> +<a name="l00155"></a>00155 <span class="keyword"> </span>{ +<a name="l00156"></a>00156 assert( index < length() ); +<a name="l00157"></a>00157 <span class="keywordflow">return</span> rep_->str[ index ]; +<a name="l00158"></a>00158 } <a name="l00159"></a>00159 -<a name="l00160"></a>00160 <span class="comment">// single char extraction</span> -<a name="l00161"></a>00161 <span class="keyword">const</span> <span class="keywordtype">char</span>& at (size_type index)<span class="keyword"> const</span> +<a name="l00160"></a>00160 <span class="comment">// find a char in a string. Return TiXmlString::npos if not found</span> +<a name="l00161"></a>00161 size_type find (<span class="keywordtype">char</span> lookup)<span class="keyword"> const</span> <a name="l00162"></a>00162 <span class="keyword"> </span>{ -<a name="l00163"></a>00163 assert( index < length() ); -<a name="l00164"></a>00164 <span class="keywordflow">return</span> rep_->str[ index ]; -<a name="l00165"></a>00165 } -<a name="l00166"></a>00166 -<a name="l00167"></a>00167 <span class="comment">// [] operator</span> -<a name="l00168"></a>00168 <span class="keywordtype">char</span>& operator [] (size_type index)<span class="keyword"> const</span> -<a name="l00169"></a>00169 <span class="keyword"> </span>{ -<a name="l00170"></a>00170 assert( index < length() ); -<a name="l00171"></a>00171 <span class="keywordflow">return</span> rep_->str[ index ]; -<a name="l00172"></a>00172 } -<a name="l00173"></a>00173 -<a name="l00174"></a>00174 <span class="comment">// find a char in a string. Return TiXmlString::npos if not found</span> -<a name="l00175"></a>00175 size_type find (<span class="keywordtype">char</span> lookup)<span class="keyword"> const</span> -<a name="l00176"></a>00176 <span class="keyword"> </span>{ -<a name="l00177"></a>00177 <span class="keywordflow">return</span> find(lookup, 0); -<a name="l00178"></a>00178 } -<a name="l00179"></a>00179 -<a name="l00180"></a>00180 <span class="comment">// find a char in a string from an offset. Return TiXmlString::npos if not found</span> -<a name="l00181"></a>00181 size_type find (<span class="keywordtype">char</span> tofind, size_type offset)<span class="keyword"> const</span> -<a name="l00182"></a>00182 <span class="keyword"> </span>{ -<a name="l00183"></a>00183 <span class="keywordflow">if</span> (offset >= length()) <span class="keywordflow">return</span> npos; -<a name="l00184"></a>00184 -<a name="l00185"></a>00185 <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">char</span>* p = c_str() + offset; *p != <span class="charliteral">'\0'</span>; ++p) -<a name="l00186"></a>00186 { -<a name="l00187"></a>00187 <span class="keywordflow">if</span> (*p == tofind) <span class="keywordflow">return</span> <span class="keyword">static_cast<</span> size_type <span class="keyword">></span>( p - c_str() ); -<a name="l00188"></a>00188 } -<a name="l00189"></a>00189 <span class="keywordflow">return</span> npos; -<a name="l00190"></a>00190 } -<a name="l00191"></a>00191 -<a name="l00192"></a>00192 <span class="keywordtype">void</span> clear () -<a name="l00193"></a>00193 { -<a name="l00194"></a>00194 <span class="comment">//Lee:</span> -<a name="l00195"></a>00195 <span class="comment">//The original was just too strange, though correct:</span> -<a name="l00196"></a>00196 <span class="comment">// TiXmlString().swap(*this);</span> -<a name="l00197"></a>00197 <span class="comment">//Instead use the quit & re-init:</span> -<a name="l00198"></a>00198 quit(); -<a name="l00199"></a>00199 init(0,0); -<a name="l00200"></a>00200 } -<a name="l00201"></a>00201 -<a name="l00202"></a>00202 <span class="comment">/* Function to reserve a big amount of data when we know we'll need it. Be aware that this</span> -<a name="l00203"></a>00203 <span class="comment"> function DOES NOT clear the content of the TiXmlString if any exists.</span> -<a name="l00204"></a>00204 <span class="comment"> */</span> -<a name="l00205"></a>00205 <span class="keywordtype">void</span> reserve (size_type cap); -<a name="l00206"></a>00206 -<a name="l00207"></a>00207 TiXmlString& assign (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len); -<a name="l00208"></a>00208 -<a name="l00209"></a>00209 TiXmlString& append (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len); +<a name="l00163"></a>00163 <span class="keywordflow">return</span> find(lookup, 0); +<a name="l00164"></a>00164 } +<a name="l00165"></a>00165 +<a name="l00166"></a>00166 <span class="comment">// find a char in a string from an offset. Return TiXmlString::npos if not found</span> +<a name="l00167"></a>00167 size_type find (<span class="keywordtype">char</span> tofind, size_type offset)<span class="keyword"> const</span> +<a name="l00168"></a>00168 <span class="keyword"> </span>{ +<a name="l00169"></a>00169 <span class="keywordflow">if</span> (offset >= length()) <span class="keywordflow">return</span> npos; +<a name="l00170"></a>00170 +<a name="l00171"></a>00171 <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">char</span>* p = c_str() + offset; *p != <span class="charliteral">'\0'</span>; ++p) +<a name="l00172"></a>00172 { +<a name="l00173"></a>00173 <span class="keywordflow">if</span> (*p == tofind) <span class="keywordflow">return</span> <span class="keyword">static_cast<</span> size_type <span class="keyword">></span>( p - c_str() ); +<a name="l00174"></a>00174 } +<a name="l00175"></a>00175 <span class="keywordflow">return</span> npos; +<a name="l00176"></a>00176 } +<a name="l00177"></a>00177 +<a name="l00178"></a>00178 <span class="keywordtype">void</span> clear () +<a name="l00179"></a>00179 { +<a name="l00180"></a>00180 <span class="comment">//Lee:</span> +<a name="l00181"></a>00181 <span class="comment">//The original was just too strange, though correct:</span> +<a name="l00182"></a>00182 <span class="comment">// TiXmlString().swap(*this);</span> +<a name="l00183"></a>00183 <span class="comment">//Instead use the quit & re-init:</span> +<a name="l00184"></a>00184 quit(); +<a name="l00185"></a>00185 init(0,0); +<a name="l00186"></a>00186 } +<a name="l00187"></a>00187 +<a name="l00188"></a>00188 <span class="comment">/* Function to reserve a big amount of data when we know we'll need it. Be aware that this</span> +<a name="l00189"></a>00189 <span class="comment"> function DOES NOT clear the content of the TiXmlString if any exists.</span> +<a name="l00190"></a>00190 <span class="comment"> */</span> +<a name="l00191"></a>00191 <span class="keywordtype">void</span> reserve (size_type cap); +<a name="l00192"></a>00192 +<a name="l00193"></a>00193 TiXmlString& assign (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len); +<a name="l00194"></a>00194 +<a name="l00195"></a>00195 TiXmlString& append (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len); +<a name="l00196"></a>00196 +<a name="l00197"></a>00197 <span class="keywordtype">void</span> swap (TiXmlString& other) +<a name="l00198"></a>00198 { +<a name="l00199"></a>00199 Rep* r = rep_; +<a name="l00200"></a>00200 rep_ = other.rep_; +<a name="l00201"></a>00201 other.rep_ = r; +<a name="l00202"></a>00202 } +<a name="l00203"></a>00203 +<a name="l00204"></a>00204 <span class="keyword">private</span>: +<a name="l00205"></a>00205 +<a name="l00206"></a>00206 <span class="keywordtype">void</span> init(size_type sz) { init(sz, sz); } +<a name="l00207"></a>00207 <span class="keywordtype">void</span> set_size(size_type sz) { rep_->str[ rep_->size = sz ] = <span class="charliteral">'\0'</span>; } +<a name="l00208"></a>00208 <span class="keywordtype">char</span>* start()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } +<a name="l00209"></a>00209 <span class="keywordtype">char</span>* finish()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str + rep_->size; } <a name="l00210"></a>00210 -<a name="l00211"></a>00211 <span class="keywordtype">void</span> swap (TiXmlString& other) +<a name="l00211"></a>00211 <span class="keyword">struct </span>Rep <a name="l00212"></a>00212 { -<a name="l00213"></a>00213 Rep* r = rep_; -<a name="l00214"></a>00214 rep_ = other.rep_; -<a name="l00215"></a>00215 other.rep_ = r; -<a name="l00216"></a>00216 } -<a name="l00217"></a>00217 -<a name="l00218"></a>00218 <span class="keyword">private</span>: -<a name="l00219"></a>00219 -<a name="l00220"></a>00220 <span class="keywordtype">void</span> init(size_type sz) { init(sz, sz); } -<a name="l00221"></a>00221 <span class="keywordtype">void</span> set_size(size_type sz) { rep_->str[ rep_->size = sz ] = <span class="charliteral">'\0'</span>; } -<a name="l00222"></a>00222 <span class="keywordtype">char</span>* start()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str; } -<a name="l00223"></a>00223 <span class="keywordtype">char</span>* finish()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_->str + rep_->size; } -<a name="l00224"></a>00224 -<a name="l00225"></a>00225 <span class="keyword">struct </span>Rep -<a name="l00226"></a>00226 { -<a name="l00227"></a>00227 size_type size, capacity; -<a name="l00228"></a>00228 <span class="keywordtype">char</span> str[1]; -<a name="l00229"></a>00229 }; -<a name="l00230"></a>00230 -<a name="l00231"></a>00231 <span class="keywordtype">void</span> init(size_type sz, size_type cap) -<a name="l00232"></a>00232 { -<a name="l00233"></a>00233 <span class="keywordflow">if</span> (cap) +<a name="l00213"></a>00213 size_type size, capacity; +<a name="l00214"></a>00214 <span class="keywordtype">char</span> str[1]; +<a name="l00215"></a>00215 }; +<a name="l00216"></a>00216 +<a name="l00217"></a>00217 <span class="keywordtype">void</span> init(size_type sz, size_type cap) +<a name="l00218"></a>00218 { +<a name="l00219"></a>00219 <span class="keywordflow">if</span> (cap) +<a name="l00220"></a>00220 { +<a name="l00221"></a>00221 <span class="comment">// Lee: the original form:</span> +<a name="l00222"></a>00222 <span class="comment">// rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));</span> +<a name="l00223"></a>00223 <span class="comment">// doesn't work in some cases of new being overloaded. Switching</span> +<a name="l00224"></a>00224 <span class="comment">// to the normal allocation, although use an 'int' for systems</span> +<a name="l00225"></a>00225 <span class="comment">// that are overly picky about structure alignment.</span> +<a name="l00226"></a>00226 <span class="keyword">const</span> size_type bytesNeeded = <span class="keyword">sizeof</span>(Rep) + cap; +<a name="l00227"></a>00227 <span class="keyword">const</span> size_type intsNeeded = ( bytesNeeded + <span class="keyword">sizeof</span>(int) - 1 ) / <span class="keyword">sizeof</span>( int ); +<a name="l00228"></a>00228 rep_ = <span class="keyword">reinterpret_cast<</span>Rep*<span class="keyword">></span>( <span class="keyword">new</span> <span class="keywordtype">int</span>[ intsNeeded ] ); +<a name="l00229"></a>00229 +<a name="l00230"></a>00230 rep_->str[ rep_->size = sz ] = <span class="charliteral">'\0'</span>; +<a name="l00231"></a>00231 rep_->capacity = cap; +<a name="l00232"></a>00232 } +<a name="l00233"></a>00233 <span class="keywordflow">else</span> <a name="l00234"></a>00234 { -<a name="l00235"></a>00235 <span class="comment">// Lee: the original form:</span> -<a name="l00236"></a>00236 <span class="comment">// rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));</span> -<a name="l00237"></a>00237 <span class="comment">// doesn't work in some cases of new being overloaded. Switching</span> -<a name="l00238"></a>00238 <span class="comment">// to the normal allocation, although use an 'int' for systems</span> -<a name="l00239"></a>00239 <span class="comment">// that are overly picky about structure alignment.</span> -<a name="l00240"></a>00240 <span class="keyword">const</span> size_type bytesNeeded = <span class="keyword">sizeof</span>(Rep) + cap; -<a name="l00241"></a>00241 <span class="keyword">const</span> size_type intsNeeded = ( bytesNeeded + <span class="keyword">sizeof</span>(int) - 1 ) / <span class="keyword">sizeof</span>( int ); -<a name="l00242"></a>00242 rep_ = <span class="keyword">reinterpret_cast<</span>Rep*<span class="keyword">></span>( <span class="keyword">new</span> <span class="keywordtype">int</span>[ intsNeeded ] ); -<a name="l00243"></a>00243 -<a name="l00244"></a>00244 rep_->str[ rep_->size = sz ] = <span class="charliteral">'\0'</span>; -<a name="l00245"></a>00245 rep_->capacity = cap; +<a name="l00235"></a>00235 rep_ = &nullrep_; +<a name="l00236"></a>00236 } +<a name="l00237"></a>00237 } +<a name="l00238"></a>00238 +<a name="l00239"></a>00239 <span class="keywordtype">void</span> quit() +<a name="l00240"></a>00240 { +<a name="l00241"></a>00241 <span class="keywordflow">if</span> (rep_ != &nullrep_) +<a name="l00242"></a>00242 { +<a name="l00243"></a>00243 <span class="comment">// The rep_ is really an array of ints. (see the allocator, above).</span> +<a name="l00244"></a>00244 <span class="comment">// Cast it back before delete, so the compiler won't incorrectly call destructors.</span> +<a name="l00245"></a>00245 <span class="keyword">delete</span> [] ( <span class="keyword">reinterpret_cast<</span><span class="keywordtype">int</span>*<span class="keyword">></span>( rep_ ) ); <a name="l00246"></a>00246 } -<a name="l00247"></a>00247 <span class="keywordflow">else</span> -<a name="l00248"></a>00248 { -<a name="l00249"></a>00249 rep_ = &nullrep_; -<a name="l00250"></a>00250 } -<a name="l00251"></a>00251 } -<a name="l00252"></a>00252 -<a name="l00253"></a>00253 <span class="keywordtype">void</span> quit() -<a name="l00254"></a>00254 { -<a name="l00255"></a>00255 <span class="keywordflow">if</span> (rep_ != &nullrep_) -<a name="l00256"></a>00256 { -<a name="l00257"></a>00257 <span class="comment">// The rep_ is really an array of ints. (see the allocator, above).</span> -<a name="l00258"></a>00258 <span class="comment">// Cast it back before delete, so the compiler won't incorrectly call destructors.</span> -<a name="l00259"></a>00259 <span class="keyword">delete</span> [] ( <span class="keyword">reinterpret_cast<</span><span class="keywordtype">int</span>*<span class="keyword">></span>( rep_ ) ); -<a name="l00260"></a>00260 } -<a name="l00261"></a>00261 } -<a name="l00262"></a>00262 -<a name="l00263"></a>00263 Rep * rep_; -<a name="l00264"></a>00264 <span class="keyword">static</span> Rep nullrep_; -<a name="l00265"></a>00265 -<a name="l00266"></a>00266 } ; -<a name="l00267"></a>00267 -<a name="l00268"></a>00268 -<a name="l00269"></a>00269 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) -<a name="l00270"></a>00270 { -<a name="l00271"></a>00271 <span class="keywordflow">return</span> ( a.length() == b.length() ) <span class="comment">// optimization on some platforms</span> -<a name="l00272"></a>00272 && ( strcmp(a.c_str(), b.c_str()) == 0 ); <span class="comment">// actual compare</span> -<a name="l00273"></a>00273 } -<a name="l00274"></a>00274 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator < (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) -<a name="l00275"></a>00275 { -<a name="l00276"></a>00276 <span class="keywordflow">return</span> strcmp(a.c_str(), b.c_str()) < 0; -<a name="l00277"></a>00277 } +<a name="l00247"></a>00247 } +<a name="l00248"></a>00248 +<a name="l00249"></a>00249 Rep * rep_; +<a name="l00250"></a>00250 <span class="keyword">static</span> Rep nullrep_; +<a name="l00251"></a>00251 +<a name="l00252"></a>00252 } ; +<a name="l00253"></a>00253 +<a name="l00254"></a>00254 +<a name="l00255"></a>00255 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) +<a name="l00256"></a>00256 { +<a name="l00257"></a>00257 <span class="keywordflow">return</span> ( a.length() == b.length() ) <span class="comment">// optimization on some platforms</span> +<a name="l00258"></a>00258 && ( strcmp(a.c_str(), b.c_str()) == 0 ); <span class="comment">// actual compare</span> +<a name="l00259"></a>00259 } +<a name="l00260"></a>00260 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator < (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) +<a name="l00261"></a>00261 { +<a name="l00262"></a>00262 <span class="keywordflow">return</span> strcmp(a.c_str(), b.c_str()) < 0; +<a name="l00263"></a>00263 } +<a name="l00264"></a>00264 +<a name="l00265"></a>00265 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(a == b); } +<a name="l00266"></a>00266 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator > (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> b < a; } +<a name="l00267"></a>00267 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator <= (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(b < a); } +<a name="l00268"></a>00268 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator >= (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(a < b); } +<a name="l00269"></a>00269 +<a name="l00270"></a>00270 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> strcmp(a.c_str(), b) == 0; } +<a name="l00271"></a>00271 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> b == a; } +<a name="l00272"></a>00272 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> !(a == b); } +<a name="l00273"></a>00273 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(b == a); } +<a name="l00274"></a>00274 +<a name="l00275"></a>00275 TiXmlString operator + (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b); +<a name="l00276"></a>00276 TiXmlString operator + (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b); +<a name="l00277"></a>00277 TiXmlString operator + (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b); <a name="l00278"></a>00278 -<a name="l00279"></a>00279 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(a == b); } -<a name="l00280"></a>00280 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator > (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> b < a; } -<a name="l00281"></a>00281 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator <= (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(b < a); } -<a name="l00282"></a>00282 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator >= (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(a < b); } -<a name="l00283"></a>00283 -<a name="l00284"></a>00284 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> strcmp(a.c_str(), b) == 0; } -<a name="l00285"></a>00285 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> b == a; } -<a name="l00286"></a>00286 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> !(a == b); } -<a name="l00287"></a>00287 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b) { <span class="keywordflow">return</span> !(b == a); } -<a name="l00288"></a>00288 -<a name="l00289"></a>00289 TiXmlString operator + (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> TiXmlString & b); -<a name="l00290"></a>00290 TiXmlString operator + (<span class="keyword">const</span> TiXmlString & a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b); -<a name="l00291"></a>00291 TiXmlString operator + (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString & b); -<a name="l00292"></a>00292 -<a name="l00293"></a>00293 -<a name="l00294"></a>00294 <span class="comment">/*</span> -<a name="l00295"></a>00295 <span class="comment"> TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.</span> -<a name="l00296"></a>00296 <span class="comment"> Only the operators that we need for TinyXML have been developped.</span> -<a name="l00297"></a>00297 <span class="comment">*/</span> -<a name="l00298"></a>00298 <span class="keyword">class </span>TiXmlOutStream : <span class="keyword">public</span> TiXmlString -<a name="l00299"></a>00299 { -<a name="l00300"></a>00300 <span class="keyword">public</span> : +<a name="l00279"></a>00279 +<a name="l00280"></a>00280 <span class="comment">/*</span> +<a name="l00281"></a>00281 <span class="comment"> TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.</span> +<a name="l00282"></a>00282 <span class="comment"> Only the operators that we need for TinyXML have been developped.</span> +<a name="l00283"></a>00283 <span class="comment">*/</span> +<a name="l00284"></a>00284 <span class="keyword">class </span>TiXmlOutStream : <span class="keyword">public</span> TiXmlString +<a name="l00285"></a>00285 { +<a name="l00286"></a>00286 <span class="keyword">public</span> : +<a name="l00287"></a>00287 +<a name="l00288"></a>00288 <span class="comment">// TiXmlOutStream << operator.</span> +<a name="l00289"></a>00289 TiXmlOutStream & operator << (<span class="keyword">const</span> TiXmlString & in) +<a name="l00290"></a>00290 { +<a name="l00291"></a>00291 *<span class="keyword">this</span> += in; +<a name="l00292"></a>00292 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00293"></a>00293 } +<a name="l00294"></a>00294 +<a name="l00295"></a>00295 <span class="comment">// TiXmlOutStream << operator.</span> +<a name="l00296"></a>00296 TiXmlOutStream & operator << (<span class="keyword">const</span> <span class="keywordtype">char</span> * in) +<a name="l00297"></a>00297 { +<a name="l00298"></a>00298 *<span class="keyword">this</span> += in; +<a name="l00299"></a>00299 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00300"></a>00300 } <a name="l00301"></a>00301 -<a name="l00302"></a>00302 <span class="comment">// TiXmlOutStream << operator.</span> -<a name="l00303"></a>00303 TiXmlOutStream & operator << (<span class="keyword">const</span> TiXmlString & in) -<a name="l00304"></a>00304 { -<a name="l00305"></a>00305 *<span class="keyword">this</span> += in; -<a name="l00306"></a>00306 <span class="keywordflow">return</span> *<span class="keyword">this</span>; -<a name="l00307"></a>00307 } -<a name="l00308"></a>00308 -<a name="l00309"></a>00309 <span class="comment">// TiXmlOutStream << operator.</span> -<a name="l00310"></a>00310 TiXmlOutStream & operator << (<span class="keyword">const</span> <span class="keywordtype">char</span> * in) -<a name="l00311"></a>00311 { -<a name="l00312"></a>00312 *<span class="keyword">this</span> += in; -<a name="l00313"></a>00313 <span class="keywordflow">return</span> *<span class="keyword">this</span>; -<a name="l00314"></a>00314 } -<a name="l00315"></a>00315 -<a name="l00316"></a>00316 } ; -<a name="l00317"></a>00317 -<a name="l00318"></a>00318 <span class="preprocessor">#endif // TIXML_STRING_INCLUDED</span> -<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#endif // TIXML_USE_STL</span> +<a name="l00302"></a>00302 } ; +<a name="l00303"></a>00303 +<a name="l00304"></a>00304 <span class="preprocessor">#endif // TIXML_STRING_INCLUDED</span> +<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#endif // TIXML_USE_STL</span> </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> diff --git a/shared/tinyxml/docs/tinyxml_8h_source.html b/shared/tinyxml/docs/tinyxml_8h_source.html index e991e035..566e3960 100644 --- a/shared/tinyxml/docs/tinyxml_8h_source.html +++ b/shared/tinyxml/docs/tinyxml_8h_source.html @@ -24,7 +24,7 @@ </div> <h1>tinyxml.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span> -<a name="l00003"></a>00003 <span class="comment">Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)</span> +<a name="l00003"></a>00003 <span class="comment">Original code by Lee Thomason (www.grinninglizard.com)</span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span> <a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span> @@ -115,7 +115,7 @@ <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MAJOR_VERSION = 2; <a name="l00093"></a>00093 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MINOR_VERSION = 6; -<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 1; +<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 2; <a name="l00095"></a>00095 <a name="l00096"></a>00096 <span class="comment">/* Internal structure for tracking location of items </span> <a name="l00097"></a>00097 <span class="comment"> in the XML file.</span> @@ -144,7 +144,7 @@ <a name="l00144"></a><a class="code" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19">00144</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& <span class="comment">/*declaration*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; } <a name="l00146"></a><a class="code" href="classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5">00146</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5" title="Visit a text node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& <span class="comment">/*text*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; } <a name="l00148"></a><a class="code" href="classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2">00148</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2" title="Visit a comment node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& <span class="comment">/*comment*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; } -<a name="l00150"></a><a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28">00150</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28" title="Visit an unknow node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& <span class="comment">/*unknown*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; } +<a name="l00150"></a><a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28">00150</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28" title="Visit an unknown node.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& <span class="comment">/*unknown*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; } <a name="l00151"></a>00151 }; <a name="l00152"></a>00152 <a name="l00153"></a>00153 <span class="comment">// Only used by Attribute::Query functions</span> @@ -715,7 +715,7 @@ <a name="l00950"></a>00950 <span class="preprocessor"></span> <a name="l00951"></a>00951 <a class="code" href="classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60" title="Construct an element.">TiXmlElement</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& ); <a name="l00952"></a>00952 -<a name="l00953"></a>00953 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& base ); +<a name="l00953"></a>00953 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& base ); <a name="l00954"></a>00954 <a name="l00955"></a>00955 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>(); <a name="l00956"></a>00956 @@ -726,477 +726,478 @@ <a name="l00976"></a>00976 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>; <a name="l00977"></a>00977 <a name="l00985"></a>00985 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>; -<a name="l00987"></a>00987 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>; -<a name="l00989"></a><a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be">00989</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be" title="QueryFloatAttribute examines the attribute - see QueryIntAttribute().">QueryFloatAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">float</span>* _value )<span class="keyword"> const </span>{ -<a name="l00990"></a>00990 <span class="keywordtype">double</span> d; -<a name="l00991"></a>00991 <span class="keywordtype">int</span> result = <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( name, &d ); -<a name="l00992"></a>00992 <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) { -<a name="l00993"></a>00993 *_value = (float)d; -<a name="l00994"></a>00994 } -<a name="l00995"></a>00995 <span class="keywordflow">return</span> result; -<a name="l00996"></a>00996 } -<a name="l00997"></a>00997 -<a name="l00998"></a>00998 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01000"></a><a class="code" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">01000</a> <span class="preprocessor"> int QueryStringAttribute( const char* name, std::string* _value ) const {</span> -<a name="l01001"></a>01001 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">char</span>* cstr = <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( name ); -<a name="l01002"></a>01002 <span class="keywordflow">if</span> ( cstr ) { -<a name="l01003"></a>01003 *_value = std::string( cstr ); -<a name="l01004"></a>01004 <span class="keywordflow">return</span> TIXML_SUCCESS; -<a name="l01005"></a>01005 } -<a name="l01006"></a>01006 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; -<a name="l01007"></a>01007 } -<a name="l01008"></a>01008 -<a name="l01017"></a><a class="code" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">01017</a> <span class="keyword">template</span>< <span class="keyword">typename</span> T > <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, T* outValue )<span class="keyword"> const</span> -<a name="l01018"></a>01018 <span class="keyword"> </span>{ -<a name="l01019"></a>01019 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name ); -<a name="l01020"></a>01020 <span class="keywordflow">if</span> ( !node ) -<a name="l01021"></a>01021 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; -<a name="l01022"></a>01022 -<a name="l01023"></a>01023 std::stringstream sstream( node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>() ); -<a name="l01024"></a>01024 sstream >> *outValue; -<a name="l01025"></a>01025 <span class="keywordflow">if</span> ( !sstream.fail() ) -<a name="l01026"></a>01026 <span class="keywordflow">return</span> TIXML_SUCCESS; -<a name="l01027"></a>01027 <span class="keywordflow">return</span> TIXML_WRONG_TYPE; -<a name="l01028"></a>01028 } +<a name="l00987"></a>00987 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d" title="QueryUnsignedAttribute examines the attribute - see QueryIntAttribute().">QueryUnsignedAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">unsigned</span>* _value ) <span class="keyword">const</span>; +<a name="l00992"></a>00992 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff" title="QueryBoolAttribute examines the attribute - see QueryIntAttribute().">QueryBoolAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">bool</span>* _value ) <span class="keyword">const</span>; +<a name="l00994"></a>00994 <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>; +<a name="l00996"></a><a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be">00996</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be" title="QueryFloatAttribute examines the attribute - see QueryIntAttribute().">QueryFloatAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">float</span>* _value )<span class="keyword"> const </span>{ +<a name="l00997"></a>00997 <span class="keywordtype">double</span> d; +<a name="l00998"></a>00998 <span class="keywordtype">int</span> result = <a class="code" href="classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7" title="QueryDoubleAttribute examines the attribute - see QueryIntAttribute().">QueryDoubleAttribute</a>( name, &d ); +<a name="l00999"></a>00999 <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) { +<a name="l01000"></a>01000 *_value = (float)d; +<a name="l01001"></a>01001 } +<a name="l01002"></a>01002 <span class="keywordflow">return</span> result; +<a name="l01003"></a>01003 } +<a name="l01004"></a>01004 +<a name="l01005"></a>01005 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01007"></a><a class="code" href="classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961">01007</a> <span class="preprocessor"> int QueryStringAttribute( const char* name, std::string* _value ) const {</span> +<a name="l01008"></a>01008 <span class="preprocessor"></span> <span class="keyword">const</span> <span class="keywordtype">char</span>* cstr = <a class="code" href="classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute</a>( name ); +<a name="l01009"></a>01009 <span class="keywordflow">if</span> ( cstr ) { +<a name="l01010"></a>01010 *_value = std::string( cstr ); +<a name="l01011"></a>01011 <span class="keywordflow">return</span> TIXML_SUCCESS; +<a name="l01012"></a>01012 } +<a name="l01013"></a>01013 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; +<a name="l01014"></a>01014 } +<a name="l01015"></a>01015 +<a name="l01024"></a><a class="code" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">01024</a> <span class="keyword">template</span>< <span class="keyword">typename</span> T > <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, T* outValue )<span class="keyword"> const</span> +<a name="l01025"></a>01025 <span class="keyword"> </span>{ +<a name="l01026"></a>01026 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name ); +<a name="l01027"></a>01027 <span class="keywordflow">if</span> ( !node ) +<a name="l01028"></a>01028 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; <a name="l01029"></a>01029 -<a name="l01030"></a>01030 <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, std::string* outValue )<span class="keyword"> const</span> -<a name="l01031"></a>01031 <span class="keyword"> </span>{ -<a name="l01032"></a>01032 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name ); -<a name="l01033"></a>01033 <span class="keywordflow">if</span> ( !node ) -<a name="l01034"></a>01034 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; -<a name="l01035"></a>01035 *outValue = node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>(); -<a name="l01036"></a>01036 <span class="keywordflow">return</span> TIXML_SUCCESS; -<a name="l01037"></a>01037 } -<a name="l01038"></a>01038 <span class="preprocessor"> #endif</span> -<a name="l01039"></a>01039 <span class="preprocessor"></span> -<a name="l01043"></a>01043 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ); -<a name="l01044"></a>01044 -<a name="l01045"></a>01045 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01046"></a>01046 <span class="preprocessor"></span> <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name ) <span class="keyword">const</span>; -<a name="l01047"></a>01047 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>; -<a name="l01048"></a>01048 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>; -<a name="l01049"></a>01049 <span class="keywordtype">int</span> QueryIntAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>; -<a name="l01050"></a>01050 <span class="keywordtype">int</span> QueryDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>; +<a name="l01030"></a>01030 std::stringstream sstream( node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>() ); +<a name="l01031"></a>01031 sstream >> *outValue; +<a name="l01032"></a>01032 <span class="keywordflow">if</span> ( !sstream.fail() ) +<a name="l01033"></a>01033 <span class="keywordflow">return</span> TIXML_SUCCESS; +<a name="l01034"></a>01034 <span class="keywordflow">return</span> TIXML_WRONG_TYPE; +<a name="l01035"></a>01035 } +<a name="l01036"></a>01036 +<a name="l01037"></a>01037 <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string& name, std::string* outValue )<span class="keyword"> const</span> +<a name="l01038"></a>01038 <span class="keyword"> </span>{ +<a name="l01039"></a>01039 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* node = attributeSet.Find( name ); +<a name="l01040"></a>01040 <span class="keywordflow">if</span> ( !node ) +<a name="l01041"></a>01041 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE; +<a name="l01042"></a>01042 *outValue = node-><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>(); +<a name="l01043"></a>01043 <span class="keywordflow">return</span> TIXML_SUCCESS; +<a name="l01044"></a>01044 } +<a name="l01045"></a>01045 <span class="preprocessor"> #endif</span> +<a name="l01046"></a>01046 <span class="preprocessor"></span> +<a name="l01050"></a>01050 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ); <a name="l01051"></a>01051 -<a name="l01053"></a>01053 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keyword">const</span> std::string& _value ); -<a name="l01055"></a>01055 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span> _value ); -<a name="l01057"></a>01057 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span> value ); -<a name="l01058"></a>01058 <span class="preprocessor"> #endif</span> -<a name="l01059"></a>01059 <span class="preprocessor"></span> -<a name="l01063"></a>01063 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">int</span> value ); -<a name="l01064"></a>01064 -<a name="l01068"></a>01068 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">double</span> value ); -<a name="l01069"></a>01069 -<a name="l01072"></a>01072 <span class="keywordtype">void</span> RemoveAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ); -<a name="l01073"></a>01073 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01074"></a><a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a">01074</a> <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a>( <span class="keyword">const</span> std::string& name ) { <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a> (name.c_str ()); } -<a name="l01075"></a>01075 <span class="preprocessor"> #endif</span> -<a name="l01076"></a>01076 <span class="preprocessor"></span> -<a name="l01077"></a><a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592">01077</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592" title="Access the first attribute in this element.">FirstAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.First(); } -<a name="l01078"></a>01078 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FirstAttribute() { <span class="keywordflow">return</span> attributeSet.First(); } -<a name="l01079"></a><a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381">01079</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381" title="Access the last attribute in this element.">LastAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.Last(); } -<a name="l01080"></a>01080 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* LastAttribute() { <span class="keywordflow">return</span> attributeSet.Last(); } -<a name="l01081"></a>01081 -<a name="l01114"></a>01114 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetText() <span class="keyword">const</span>; -<a name="l01115"></a>01115 -<a name="l01117"></a>01117 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* Clone() <span class="keyword">const</span>; -<a name="l01118"></a>01118 <span class="comment">// Print the Element to a FILE stream.</span> -<a name="l01119"></a>01119 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; -<a name="l01120"></a>01120 -<a name="l01121"></a>01121 <span class="comment">/* Attribtue parsing starts: next char past '<'</span> -<a name="l01122"></a>01122 <span class="comment"> returns: next char past '>'</span> -<a name="l01123"></a>01123 <span class="comment"> */</span> -<a name="l01124"></a>01124 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); -<a name="l01125"></a>01125 -<a name="l01126"></a><a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c">01126</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01127"></a><a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a">01127</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01128"></a>01128 -<a name="l01131"></a>01131 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> Accept( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01052"></a>01052 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01053"></a>01053 <span class="preprocessor"></span> <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name ) <span class="keyword">const</span>; +<a name="l01054"></a>01054 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>; +<a name="l01055"></a>01055 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>; +<a name="l01056"></a>01056 <span class="keywordtype">int</span> QueryIntAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>; +<a name="l01057"></a>01057 <span class="keywordtype">int</span> QueryDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>; +<a name="l01058"></a>01058 +<a name="l01060"></a>01060 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keyword">const</span> std::string& _value ); +<a name="l01062"></a>01062 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">int</span> _value ); +<a name="l01064"></a>01064 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> std::string& name, <span class="keywordtype">double</span> value ); +<a name="l01065"></a>01065 <span class="preprocessor"> #endif</span> +<a name="l01066"></a>01066 <span class="preprocessor"></span> +<a name="l01070"></a>01070 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">int</span> value ); +<a name="l01071"></a>01071 +<a name="l01075"></a>01075 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">double</span> value ); +<a name="l01076"></a>01076 +<a name="l01079"></a>01079 <span class="keywordtype">void</span> RemoveAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ); +<a name="l01080"></a>01080 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01081"></a><a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a">01081</a> <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a>( <span class="keyword">const</span> std::string& name ) { <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a> (name.c_str ()); } +<a name="l01082"></a>01082 <span class="preprocessor"> #endif</span> +<a name="l01083"></a>01083 <span class="preprocessor"></span> +<a name="l01084"></a><a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592">01084</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592" title="Access the first attribute in this element.">FirstAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.First(); } +<a name="l01085"></a>01085 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FirstAttribute() { <span class="keywordflow">return</span> attributeSet.First(); } +<a name="l01086"></a><a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381">01086</a> <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a86191b49f9177be132b85b14655f1381" title="Access the last attribute in this element.">LastAttribute</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> attributeSet.Last(); } +<a name="l01087"></a>01087 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* LastAttribute() { <span class="keywordflow">return</span> attributeSet.Last(); } +<a name="l01088"></a>01088 +<a name="l01121"></a>01121 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetText() <span class="keyword">const</span>; +<a name="l01122"></a>01122 +<a name="l01124"></a>01124 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* Clone() <span class="keyword">const</span>; +<a name="l01125"></a>01125 <span class="comment">// Print the Element to a FILE stream.</span> +<a name="l01126"></a>01126 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; +<a name="l01127"></a>01127 +<a name="l01128"></a>01128 <span class="comment">/* Attribtue parsing starts: next char past '<'</span> +<a name="l01129"></a>01129 <span class="comment"> returns: next char past '>'</span> +<a name="l01130"></a>01130 <span class="comment"> */</span> +<a name="l01131"></a>01131 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); <a name="l01132"></a>01132 -<a name="l01133"></a>01133 <span class="keyword">protected</span>: -<a name="l01134"></a>01134 -<a name="l01135"></a>01135 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* target ) <span class="keyword">const</span>; -<a name="l01136"></a>01136 <span class="keywordtype">void</span> ClearThis(); <span class="comment">// like clear, but initializes 'this' object as well</span> -<a name="l01137"></a>01137 -<a name="l01138"></a>01138 <span class="comment">// Used to be public [internal use]</span> -<a name="l01139"></a>01139 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01140"></a>01140 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01141"></a>01141 <span class="preprocessor"> #endif</span> -<a name="l01142"></a>01142 <span class="preprocessor"></span> <span class="comment">/* [internal use]</span> -<a name="l01143"></a>01143 <span class="comment"> Reads the "value" of the element -- another element, or text.</span> -<a name="l01144"></a>01144 <span class="comment"> This should terminate with the current end tag.</span> -<a name="l01145"></a>01145 <span class="comment"> */</span> -<a name="l01146"></a>01146 <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadValue( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); -<a name="l01147"></a>01147 -<a name="l01148"></a>01148 <span class="keyword">private</span>: -<a name="l01149"></a>01149 TiXmlAttributeSet attributeSet; -<a name="l01150"></a>01150 }; -<a name="l01151"></a>01151 -<a name="l01152"></a>01152 -<a name="l01155"></a><a class="code" href="classTiXmlComment.html">01155</a> <span class="keyword">class </span><a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> -<a name="l01156"></a>01156 { -<a name="l01157"></a>01157 <span class="keyword">public</span>: -<a name="l01159"></a><a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7">01159</a> <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) {} -<a name="l01161"></a><a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47">01161</a> <a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47" title="Construct a comment from text.">TiXmlComment</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) { -<a name="l01162"></a>01162 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( _value ); -<a name="l01163"></a>01163 } -<a name="l01164"></a>01164 <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& ); -<a name="l01165"></a>01165 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& base ); -<a name="l01166"></a>01166 -<a name="l01167"></a>01167 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>() {} -<a name="l01168"></a>01168 -<a name="l01170"></a>01170 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlComment.html#a0d6662bdc52488b9e12b3c7a0453d028" title="Returns a copy of this Comment.">Clone</a>() <span class="keyword">const</span>; -<a name="l01171"></a>01171 <span class="comment">// Write this Comment to a FILE stream.</span> -<a name="l01172"></a>01172 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlComment.html#a6b316527aaa8da0370cd68c22a5a0f5f" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; +<a name="l01133"></a><a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c">01133</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01134"></a><a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a">01134</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a" title="Cast to a more defined type. Will return null not of the requested type.">ToElement</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01135"></a>01135 +<a name="l01138"></a>01138 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> Accept( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01139"></a>01139 +<a name="l01140"></a>01140 <span class="keyword">protected</span>: +<a name="l01141"></a>01141 +<a name="l01142"></a>01142 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* target ) <span class="keyword">const</span>; +<a name="l01143"></a>01143 <span class="keywordtype">void</span> ClearThis(); <span class="comment">// like clear, but initializes 'this' object as well</span> +<a name="l01144"></a>01144 +<a name="l01145"></a>01145 <span class="comment">// Used to be public [internal use]</span> +<a name="l01146"></a>01146 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01147"></a>01147 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01148"></a>01148 <span class="preprocessor"> #endif</span> +<a name="l01149"></a>01149 <span class="preprocessor"></span> <span class="comment">/* [internal use]</span> +<a name="l01150"></a>01150 <span class="comment"> Reads the "value" of the element -- another element, or text.</span> +<a name="l01151"></a>01151 <span class="comment"> This should terminate with the current end tag.</span> +<a name="l01152"></a>01152 <span class="comment"> */</span> +<a name="l01153"></a>01153 <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadValue( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); +<a name="l01154"></a>01154 +<a name="l01155"></a>01155 <span class="keyword">private</span>: +<a name="l01156"></a>01156 TiXmlAttributeSet attributeSet; +<a name="l01157"></a>01157 }; +<a name="l01158"></a>01158 +<a name="l01159"></a>01159 +<a name="l01162"></a><a class="code" href="classTiXmlComment.html">01162</a> <span class="keyword">class </span><a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> +<a name="l01163"></a>01163 { +<a name="l01164"></a>01164 <span class="keyword">public</span>: +<a name="l01166"></a><a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7">01166</a> <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) {} +<a name="l01168"></a><a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47">01168</a> <a class="code" href="classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47" title="Construct a comment from text.">TiXmlComment</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_COMMENT ) { +<a name="l01169"></a>01169 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( _value ); +<a name="l01170"></a>01170 } +<a name="l01171"></a>01171 <a class="code" href="classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7" title="Constructs an empty comment.">TiXmlComment</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& ); +<a name="l01172"></a>01172 <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& base ); <a name="l01173"></a>01173 -<a name="l01174"></a>01174 <span class="comment">/* Attribtue parsing starts: at the ! of the !--</span> -<a name="l01175"></a>01175 <span class="comment"> returns: next char past '>'</span> -<a name="l01176"></a>01176 <span class="comment"> */</span> -<a name="l01177"></a>01177 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); -<a name="l01178"></a>01178 -<a name="l01179"></a><a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0">01179</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01180"></a><a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df">01180</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01181"></a>01181 -<a name="l01184"></a>01184 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlComment.html#af3ac1b99fbbe9ea4fb6e14146156e43e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01174"></a>01174 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>() {} +<a name="l01175"></a>01175 +<a name="l01177"></a>01177 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlComment.html#a0d6662bdc52488b9e12b3c7a0453d028" title="Returns a copy of this Comment.">Clone</a>() <span class="keyword">const</span>; +<a name="l01178"></a>01178 <span class="comment">// Write this Comment to a FILE stream.</span> +<a name="l01179"></a>01179 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlComment.html#a6b316527aaa8da0370cd68c22a5a0f5f" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; +<a name="l01180"></a>01180 +<a name="l01181"></a>01181 <span class="comment">/* Attribtue parsing starts: at the ! of the !--</span> +<a name="l01182"></a>01182 <span class="comment"> returns: next char past '>'</span> +<a name="l01183"></a>01183 <span class="comment"> */</span> +<a name="l01184"></a>01184 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); <a name="l01185"></a>01185 -<a name="l01186"></a>01186 <span class="keyword">protected</span>: -<a name="l01187"></a>01187 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* target ) <span class="keyword">const</span>; +<a name="l01186"></a><a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0">01186</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01187"></a><a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df">01187</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df" title="Cast to a more defined type. Will return null not of the requested type.">ToComment</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } <a name="l01188"></a>01188 -<a name="l01189"></a>01189 <span class="comment">// used to be public</span> -<a name="l01190"></a>01190 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01191"></a>01191 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01192"></a>01192 <span class="preprocessor"> #endif</span> -<a name="l01193"></a>01193 <span class="preprocessor"></span><span class="comment">// virtual void StreamOut( TIXML_OSTREAM * out ) const;</span> -<a name="l01194"></a>01194 -<a name="l01195"></a>01195 <span class="keyword">private</span>: -<a name="l01196"></a>01196 -<a name="l01197"></a>01197 }; -<a name="l01198"></a>01198 -<a name="l01199"></a>01199 -<a name="l01205"></a><a class="code" href="classTiXmlText.html">01205</a> <span class="keyword">class </span><a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> -<a name="l01206"></a>01206 { -<a name="l01207"></a>01207 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>; -<a name="l01208"></a>01208 <span class="keyword">public</span>: -<a name="l01213"></a><a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960">01213</a> <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * initValue ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT) -<a name="l01214"></a>01214 { -<a name="l01215"></a>01215 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue ); -<a name="l01216"></a>01216 cdata = <span class="keyword">false</span>; -<a name="l01217"></a>01217 } -<a name="l01218"></a>01218 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>() {} -<a name="l01219"></a>01219 -<a name="l01220"></a>01220 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01222"></a><a class="code" href="classTiXmlText.html#a439792f6183a3d3fb6f2bc2b16fa5691">01222</a> <span class="preprocessor"> TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)</span> -<a name="l01223"></a>01223 <span class="preprocessor"></span> { -<a name="l01224"></a>01224 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue ); -<a name="l01225"></a>01225 cdata = <span class="keyword">false</span>; -<a name="l01226"></a>01226 } -<a name="l01227"></a>01227 <span class="preprocessor"> #endif</span> -<a name="l01228"></a>01228 <span class="preprocessor"></span> -<a name="l01229"></a>01229 <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT ) { copy.CopyTo( <span class="keyword">this</span> ); } -<a name="l01230"></a>01230 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& base ) { base.CopyTo( <span class="keyword">this</span> ); } -<a name="l01231"></a>01231 -<a name="l01232"></a>01232 <span class="comment">// Write this text object to a FILE stream.</span> -<a name="l01233"></a>01233 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#a0cafbf6f236c7f02d12b2bffc2b7976b" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; -<a name="l01234"></a>01234 -<a name="l01236"></a><a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586">01236</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586" title="Queries whether this represents text using a CDATA section.">CDATA</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cdata; } -<a name="l01238"></a><a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9">01238</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9" title="Turns on or off a CDATA representation of text.">SetCDATA</a>( <span class="keywordtype">bool</span> _cdata ) { cdata = _cdata; } -<a name="l01239"></a>01239 -<a name="l01240"></a>01240 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); +<a name="l01191"></a>01191 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlComment.html#af3ac1b99fbbe9ea4fb6e14146156e43e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01192"></a>01192 +<a name="l01193"></a>01193 <span class="keyword">protected</span>: +<a name="l01194"></a>01194 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* target ) <span class="keyword">const</span>; +<a name="l01195"></a>01195 +<a name="l01196"></a>01196 <span class="comment">// used to be public</span> +<a name="l01197"></a>01197 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01198"></a>01198 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01199"></a>01199 <span class="preprocessor"> #endif</span> +<a name="l01200"></a>01200 <span class="preprocessor"></span><span class="comment">// virtual void StreamOut( TIXML_OSTREAM * out ) const;</span> +<a name="l01201"></a>01201 +<a name="l01202"></a>01202 <span class="keyword">private</span>: +<a name="l01203"></a>01203 +<a name="l01204"></a>01204 }; +<a name="l01205"></a>01205 +<a name="l01206"></a>01206 +<a name="l01212"></a><a class="code" href="classTiXmlText.html">01212</a> <span class="keyword">class </span><a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> +<a name="l01213"></a>01213 { +<a name="l01214"></a>01214 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>; +<a name="l01215"></a>01215 <span class="keyword">public</span>: +<a name="l01220"></a><a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960">01220</a> <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * initValue ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT) +<a name="l01221"></a>01221 { +<a name="l01222"></a>01222 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue ); +<a name="l01223"></a>01223 cdata = <span class="keyword">false</span>; +<a name="l01224"></a>01224 } +<a name="l01225"></a>01225 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>() {} +<a name="l01226"></a>01226 +<a name="l01227"></a>01227 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01229"></a><a class="code" href="classTiXmlText.html#a439792f6183a3d3fb6f2bc2b16fa5691">01229</a> <span class="preprocessor"> TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)</span> +<a name="l01230"></a>01230 <span class="preprocessor"></span> { +<a name="l01231"></a>01231 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue ); +<a name="l01232"></a>01232 cdata = <span class="keyword">false</span>; +<a name="l01233"></a>01233 } +<a name="l01234"></a>01234 <span class="preprocessor"> #endif</span> +<a name="l01235"></a>01235 <span class="preprocessor"></span> +<a name="l01236"></a>01236 <a class="code" href="classTiXmlText.html#af659e77c6b87d684827f35a8f4895960" title="Constructor for text element.">TiXmlText</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_TEXT ) { copy.CopyTo( <span class="keyword">this</span> ); } +<a name="l01237"></a>01237 <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& base ) { base.CopyTo( <span class="keyword">this</span> ); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } +<a name="l01238"></a>01238 +<a name="l01239"></a>01239 <span class="comment">// Write this text object to a FILE stream.</span> +<a name="l01240"></a>01240 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#a0cafbf6f236c7f02d12b2bffc2b7976b" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; <a name="l01241"></a>01241 -<a name="l01242"></a><a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648">01242</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01243"></a><a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b">01243</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01244"></a>01244 -<a name="l01247"></a>01247 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#a8483d4415ce9de6c4fa8f63d067d5de6" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01243"></a><a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586">01243</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586" title="Queries whether this represents text using a CDATA section.">CDATA</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cdata; } +<a name="l01245"></a><a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9">01245</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9" title="Turns on or off a CDATA representation of text.">SetCDATA</a>( <span class="keywordtype">bool</span> _cdata ) { cdata = _cdata; } +<a name="l01246"></a>01246 +<a name="l01247"></a>01247 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); <a name="l01248"></a>01248 -<a name="l01249"></a>01249 <span class="keyword">protected</span> : -<a name="l01251"></a>01251 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlText.html#a0c411e93a27537369479d034cc82da3b" title="[internal use] Creates a new Element and returns it.">Clone</a>() <span class="keyword">const</span>; -<a name="l01252"></a>01252 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* target ) <span class="keyword">const</span>; -<a name="l01253"></a>01253 -<a name="l01254"></a>01254 <span class="keywordtype">bool</span> Blank() <span class="keyword">const</span>; <span class="comment">// returns true if all white space and new lines</span> -<a name="l01255"></a>01255 <span class="comment">// [internal use]</span> -<a name="l01256"></a>01256 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01257"></a>01257 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01258"></a>01258 <span class="preprocessor"> #endif</span> -<a name="l01259"></a>01259 <span class="preprocessor"></span> -<a name="l01260"></a>01260 <span class="keyword">private</span>: -<a name="l01261"></a>01261 <span class="keywordtype">bool</span> cdata; <span class="comment">// true if this should be input and output as a CDATA style text element</span> -<a name="l01262"></a>01262 }; -<a name="l01263"></a>01263 -<a name="l01264"></a>01264 -<a name="l01278"></a><a class="code" href="classTiXmlDeclaration.html">01278</a> <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> -<a name="l01279"></a>01279 { -<a name="l01280"></a>01280 <span class="keyword">public</span>: -<a name="l01282"></a><a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79">01282</a> <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_DECLARATION ) {} -<a name="l01283"></a>01283 -<a name="l01284"></a>01284 <span class="preprocessor">#ifdef TIXML_USE_STL</span> -<a name="l01286"></a>01286 <span class="preprocessor"> TiXmlDeclaration( const std::string& _version,</span> -<a name="l01287"></a>01287 <span class="preprocessor"></span> <span class="keyword">const</span> std::string& _encoding, -<a name="l01288"></a>01288 <span class="keyword">const</span> std::string& _standalone ); -<a name="l01289"></a>01289 <span class="preprocessor">#endif</span> -<a name="l01290"></a>01290 <span class="preprocessor"></span> -<a name="l01292"></a>01292 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _version, -<a name="l01293"></a>01293 <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding, -<a name="l01294"></a>01294 <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone ); -<a name="l01295"></a>01295 -<a name="l01296"></a>01296 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy ); -<a name="l01297"></a>01297 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy ); -<a name="l01298"></a>01298 -<a name="l01299"></a>01299 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>() {} -<a name="l01300"></a>01300 -<a name="l01302"></a><a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76">01302</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76" title="Version. Will return an empty string if none was found.">Version</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> version.c_str (); } -<a name="l01304"></a><a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76">01304</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76" title="Encoding. Will return an empty string if none was found.">Encoding</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> encoding.c_str (); } -<a name="l01306"></a><a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9">01306</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9" title="Is this a standalone document?">Standalone</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> standalone.c_str (); } +<a name="l01249"></a><a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648">01249</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01250"></a><a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b">01250</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b" title="Cast to a more defined type. Will return null not of the requested type.">ToText</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01251"></a>01251 +<a name="l01254"></a>01254 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#a8483d4415ce9de6c4fa8f63d067d5de6" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01255"></a>01255 +<a name="l01256"></a>01256 <span class="keyword">protected</span> : +<a name="l01258"></a>01258 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlText.html#a0c411e93a27537369479d034cc82da3b" title="[internal use] Creates a new Element and returns it.">Clone</a>() <span class="keyword">const</span>; +<a name="l01259"></a>01259 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* target ) <span class="keyword">const</span>; +<a name="l01260"></a>01260 +<a name="l01261"></a>01261 <span class="keywordtype">bool</span> Blank() <span class="keyword">const</span>; <span class="comment">// returns true if all white space and new lines</span> +<a name="l01262"></a>01262 <span class="comment">// [internal use]</span> +<a name="l01263"></a>01263 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01264"></a>01264 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01265"></a>01265 <span class="preprocessor"> #endif</span> +<a name="l01266"></a>01266 <span class="preprocessor"></span> +<a name="l01267"></a>01267 <span class="keyword">private</span>: +<a name="l01268"></a>01268 <span class="keywordtype">bool</span> cdata; <span class="comment">// true if this should be input and output as a CDATA style text element</span> +<a name="l01269"></a>01269 }; +<a name="l01270"></a>01270 +<a name="l01271"></a>01271 +<a name="l01285"></a><a class="code" href="classTiXmlDeclaration.html">01285</a> <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> +<a name="l01286"></a>01286 { +<a name="l01287"></a>01287 <span class="keyword">public</span>: +<a name="l01289"></a><a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79">01289</a> <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>::TINYXML_DECLARATION ) {} +<a name="l01290"></a>01290 +<a name="l01291"></a>01291 <span class="preprocessor">#ifdef TIXML_USE_STL</span> +<a name="l01293"></a>01293 <span class="preprocessor"> TiXmlDeclaration( const std::string& _version,</span> +<a name="l01294"></a>01294 <span class="preprocessor"></span> <span class="keyword">const</span> std::string& _encoding, +<a name="l01295"></a>01295 <span class="keyword">const</span> std::string& _standalone ); +<a name="l01296"></a>01296 <span class="preprocessor">#endif</span> +<a name="l01297"></a>01297 <span class="preprocessor"></span> +<a name="l01299"></a>01299 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _version, +<a name="l01300"></a>01300 <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding, +<a name="l01301"></a>01301 <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone ); +<a name="l01302"></a>01302 +<a name="l01303"></a>01303 <a class="code" href="classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79" title="Construct an empty declaration.">TiXmlDeclaration</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy ); +<a name="l01304"></a>01304 <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& copy ); +<a name="l01305"></a>01305 +<a name="l01306"></a>01306 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>() {} <a name="l01307"></a>01307 -<a name="l01309"></a>01309 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDeclaration.html#a7cf459186040141cda7a180a6585ce2e" title="Creates a copy of this Declaration and returns it.">Clone</a>() <span class="keyword">const</span>; -<a name="l01310"></a>01310 <span class="comment">// Print this declaration to a FILE stream.</span> -<a name="l01311"></a>01311 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>; -<a name="l01312"></a><a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4">01312</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{ -<a name="l01313"></a>01313 Print( cfile, depth, 0 ); -<a name="l01314"></a>01314 } -<a name="l01315"></a>01315 -<a name="l01316"></a>01316 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); -<a name="l01317"></a>01317 -<a name="l01318"></a><a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967">01318</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01319"></a><a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce">01319</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01320"></a>01320 -<a name="l01323"></a>01323 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDeclaration.html#a22315a535983b86535cdba3458669e3e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01309"></a><a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76">01309</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76" title="Version. Will return an empty string if none was found.">Version</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> version.c_str (); } +<a name="l01311"></a><a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76">01311</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76" title="Encoding. Will return an empty string if none was found.">Encoding</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> encoding.c_str (); } +<a name="l01313"></a><a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9">01313</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9" title="Is this a standalone document?">Standalone</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> standalone.c_str (); } +<a name="l01314"></a>01314 +<a name="l01316"></a>01316 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDeclaration.html#a7cf459186040141cda7a180a6585ce2e" title="Creates a copy of this Declaration and returns it.">Clone</a>() <span class="keyword">const</span>; +<a name="l01317"></a>01317 <span class="comment">// Print this declaration to a FILE stream.</span> +<a name="l01318"></a>01318 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>; +<a name="l01319"></a><a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4">01319</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{ +<a name="l01320"></a>01320 Print( cfile, depth, 0 ); +<a name="l01321"></a>01321 } +<a name="l01322"></a>01322 +<a name="l01323"></a>01323 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); <a name="l01324"></a>01324 -<a name="l01325"></a>01325 <span class="keyword">protected</span>: -<a name="l01326"></a>01326 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* target ) <span class="keyword">const</span>; -<a name="l01327"></a>01327 <span class="comment">// used to be public</span> -<a name="l01328"></a>01328 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01329"></a>01329 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01330"></a>01330 <span class="preprocessor"> #endif</span> -<a name="l01331"></a>01331 <span class="preprocessor"></span> -<a name="l01332"></a>01332 <span class="keyword">private</span>: -<a name="l01333"></a>01333 -<a name="l01334"></a>01334 TIXML_STRING version; -<a name="l01335"></a>01335 TIXML_STRING encoding; -<a name="l01336"></a>01336 TIXML_STRING standalone; -<a name="l01337"></a>01337 }; -<a name="l01338"></a>01338 -<a name="l01339"></a>01339 -<a name="l01347"></a><a class="code" href="classTiXmlUnknown.html">01347</a> <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> -<a name="l01348"></a>01348 { -<a name="l01349"></a>01349 <span class="keyword">public</span>: -<a name="l01350"></a>01350 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) {} -<a name="l01351"></a>01351 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() {} -<a name="l01352"></a>01352 -<a name="l01353"></a>01353 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( <span class="keyword">this</span> ); } -<a name="l01354"></a>01354 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) { copy.CopyTo( <span class="keyword">this</span> ); } -<a name="l01355"></a>01355 -<a name="l01357"></a>01357 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlUnknown.html#a0960bb7428b3f341da46244229604d73" title="Creates a copy of this Unknown and returns it.">Clone</a>() <span class="keyword">const</span>; -<a name="l01358"></a>01358 <span class="comment">// Print this Unknown to a FILE stream.</span> -<a name="l01359"></a>01359 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlUnknown.html#a31ba089a40fb5a1869750fce09b0bacb" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; -<a name="l01360"></a>01360 -<a name="l01361"></a>01361 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); +<a name="l01325"></a><a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967">01325</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01326"></a><a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce">01326</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce" title="Cast to a more defined type. Will return null not of the requested type.">ToDeclaration</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01327"></a>01327 +<a name="l01330"></a>01330 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDeclaration.html#a22315a535983b86535cdba3458669e3e" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>; +<a name="l01331"></a>01331 +<a name="l01332"></a>01332 <span class="keyword">protected</span>: +<a name="l01333"></a>01333 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>* target ) <span class="keyword">const</span>; +<a name="l01334"></a>01334 <span class="comment">// used to be public</span> +<a name="l01335"></a>01335 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01336"></a>01336 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01337"></a>01337 <span class="preprocessor"> #endif</span> +<a name="l01338"></a>01338 <span class="preprocessor"></span> +<a name="l01339"></a>01339 <span class="keyword">private</span>: +<a name="l01340"></a>01340 +<a name="l01341"></a>01341 TIXML_STRING version; +<a name="l01342"></a>01342 TIXML_STRING encoding; +<a name="l01343"></a>01343 TIXML_STRING standalone; +<a name="l01344"></a>01344 }; +<a name="l01345"></a>01345 +<a name="l01346"></a>01346 +<a name="l01354"></a><a class="code" href="classTiXmlUnknown.html">01354</a> <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> +<a name="l01355"></a>01355 { +<a name="l01356"></a>01356 <span class="keyword">public</span>: +<a name="l01357"></a>01357 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) {} +<a name="l01358"></a>01358 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() {} +<a name="l01359"></a>01359 +<a name="l01360"></a>01360 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) : <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( <span class="keyword">this</span> ); } +<a name="l01361"></a>01361 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& copy ) { copy.CopyTo( <span class="keyword">this</span> ); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } <a name="l01362"></a>01362 -<a name="l01363"></a><a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d">01363</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01364"></a><a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c">01364</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01365"></a>01365 -<a name="l01368"></a>01368 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlUnknown.html#ad7122e5135581b3c832a1a3217760a93" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01364"></a>01364 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlUnknown.html#a0960bb7428b3f341da46244229604d73" title="Creates a copy of this Unknown and returns it.">Clone</a>() <span class="keyword">const</span>; +<a name="l01365"></a>01365 <span class="comment">// Print this Unknown to a FILE stream.</span> +<a name="l01366"></a>01366 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlUnknown.html#a31ba089a40fb5a1869750fce09b0bacb" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>; +<a name="l01367"></a>01367 +<a name="l01368"></a>01368 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding ); <a name="l01369"></a>01369 -<a name="l01370"></a>01370 <span class="keyword">protected</span>: -<a name="l01371"></a>01371 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* target ) <span class="keyword">const</span>; +<a name="l01370"></a><a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d">01370</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01371"></a><a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c">01371</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c" title="Cast to a more defined type. Will return null not of the requested type.">ToUnknown</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } <a name="l01372"></a>01372 -<a name="l01373"></a>01373 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01374"></a>01374 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01375"></a>01375 <span class="preprocessor"> #endif</span> -<a name="l01376"></a>01376 <span class="preprocessor"></span> -<a name="l01377"></a>01377 <span class="keyword">private</span>: -<a name="l01378"></a>01378 -<a name="l01379"></a>01379 }; -<a name="l01380"></a>01380 -<a name="l01381"></a>01381 -<a name="l01386"></a><a class="code" href="classTiXmlDocument.html">01386</a> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> -<a name="l01387"></a>01387 { -<a name="l01388"></a>01388 <span class="keyword">public</span>: -<a name="l01390"></a>01390 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>(); -<a name="l01392"></a>01392 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * documentName ); -<a name="l01393"></a>01393 -<a name="l01394"></a>01394 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01396"></a>01396 <span class="preprocessor"> TiXmlDocument( const std::string& documentName );</span> -<a name="l01397"></a>01397 <span class="preprocessor"></span><span class="preprocessor"> #endif</span> -<a name="l01398"></a>01398 <span class="preprocessor"></span> -<a name="l01399"></a>01399 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy ); -<a name="l01400"></a>01400 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy ); -<a name="l01401"></a>01401 -<a name="l01402"></a>01402 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>() {} -<a name="l01403"></a>01403 -<a name="l01408"></a>01408 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); -<a name="l01410"></a>01410 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>() <span class="keyword">const</span>; -<a name="l01412"></a>01412 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); -<a name="l01414"></a>01414 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename ) <span class="keyword">const</span>; -<a name="l01420"></a>01420 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); -<a name="l01422"></a>01422 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( FILE* ) <span class="keyword">const</span>; -<a name="l01423"></a>01423 -<a name="l01424"></a>01424 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01425"></a><a class="code" href="classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884">01425</a> <span class="preprocessor"></span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) -<a name="l01426"></a>01426 { -<a name="l01427"></a>01427 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( filename.c_str(), encoding ); -<a name="l01428"></a>01428 } -<a name="l01429"></a><a class="code" href="classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52">01429</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> std::string& filename ) <span class="keyword">const</span> -<a name="l01430"></a>01430 { -<a name="l01431"></a>01431 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( filename.c_str() ); -<a name="l01432"></a>01432 } -<a name="l01433"></a>01433 <span class="preprocessor"> #endif</span> -<a name="l01434"></a>01434 <span class="preprocessor"></span> -<a name="l01439"></a>01439 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378" title="Parse the given null terminated block of xml data.">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); -<a name="l01440"></a>01440 -<a name="l01445"></a><a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">01445</a> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); } -<a name="l01446"></a>01446 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>() { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); } +<a name="l01375"></a>01375 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlUnknown.html#ad7122e5135581b3c832a1a3217760a93" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01376"></a>01376 +<a name="l01377"></a>01377 <span class="keyword">protected</span>: +<a name="l01378"></a>01378 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* target ) <span class="keyword">const</span>; +<a name="l01379"></a>01379 +<a name="l01380"></a>01380 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01381"></a>01381 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01382"></a>01382 <span class="preprocessor"> #endif</span> +<a name="l01383"></a>01383 <span class="preprocessor"></span> +<a name="l01384"></a>01384 <span class="keyword">private</span>: +<a name="l01385"></a>01385 +<a name="l01386"></a>01386 }; +<a name="l01387"></a>01387 +<a name="l01388"></a>01388 +<a name="l01393"></a><a class="code" href="classTiXmlDocument.html">01393</a> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> +<a name="l01394"></a>01394 { +<a name="l01395"></a>01395 <span class="keyword">public</span>: +<a name="l01397"></a>01397 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>(); +<a name="l01399"></a>01399 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * documentName ); +<a name="l01400"></a>01400 +<a name="l01401"></a>01401 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01403"></a>01403 <span class="preprocessor"> TiXmlDocument( const std::string& documentName );</span> +<a name="l01404"></a>01404 <span class="preprocessor"></span><span class="preprocessor"> #endif</span> +<a name="l01405"></a>01405 <span class="preprocessor"></span> +<a name="l01406"></a>01406 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy ); +<a name="l01407"></a>01407 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& copy ); +<a name="l01408"></a>01408 +<a name="l01409"></a>01409 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>() {} +<a name="l01410"></a>01410 +<a name="l01415"></a>01415 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); +<a name="l01417"></a>01417 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>() <span class="keyword">const</span>; +<a name="l01419"></a>01419 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); +<a name="l01421"></a>01421 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename ) <span class="keyword">const</span>; +<a name="l01427"></a>01427 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); +<a name="l01429"></a>01429 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( FILE* ) <span class="keyword">const</span>; +<a name="l01430"></a>01430 +<a name="l01431"></a>01431 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01432"></a><a class="code" href="classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884">01432</a> <span class="preprocessor"></span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( <span class="keyword">const</span> std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) +<a name="l01433"></a>01433 { +<a name="l01434"></a>01434 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f" title="Load a file using the current document value.">LoadFile</a>( filename.c_str(), encoding ); +<a name="l01435"></a>01435 } +<a name="l01436"></a><a class="code" href="classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52">01436</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( <span class="keyword">const</span> std::string& filename ) <span class="keyword">const</span> +<a name="l01437"></a>01437 { +<a name="l01438"></a>01438 <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93" title="Save a file using the current document value. Returns true if successful.">SaveFile</a>( filename.c_str() ); +<a name="l01439"></a>01439 } +<a name="l01440"></a>01440 <span class="preprocessor"> #endif</span> +<a name="l01441"></a>01441 <span class="preprocessor"></span> +<a name="l01446"></a>01446 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378" title="Parse the given null terminated block of xml data.">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); <a name="l01447"></a>01447 -<a name="l01453"></a><a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">01453</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29" title="If an error occurs, Error will be set to true.">Error</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> error; } +<a name="l01452"></a><a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">01452</a> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); } +<a name="l01453"></a>01453 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be" title="Get the root element -- the only top level element -- of the document.">RootElement</a>() { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>(); } <a name="l01454"></a>01454 -<a name="l01456"></a><a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e">01456</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorDesc.c_str (); } -<a name="l01457"></a>01457 -<a name="l01461"></a><a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">01461</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f" title="Generally, you probably want the error string ( ErrorDesc() ).">ErrorId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorId; } -<a name="l01462"></a>01462 -<a name="l01470"></a><a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">01470</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.row+1; } -<a name="l01471"></a><a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649">01471</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.col+1; } -<a name="l01472"></a>01472 -<a name="l01497"></a><a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">01497</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize</a>( <span class="keywordtype">int</span> _tabsize ) { tabsize = _tabsize; } -<a name="l01498"></a>01498 -<a name="l01499"></a>01499 <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; } -<a name="l01500"></a>01500 -<a name="l01504"></a><a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">01504</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35" title="If you have handled the error, it can be reset with this call.">ClearError</a>() { error = <span class="keyword">false</span>; -<a name="l01505"></a>01505 errorId = 0; -<a name="l01506"></a>01506 errorDesc = <span class="stringliteral">""</span>; -<a name="l01507"></a>01507 errorLocation.row = errorLocation.col = 0; -<a name="l01508"></a>01508 <span class="comment">//errorLocation.last = 0; </span> -<a name="l01509"></a>01509 } -<a name="l01510"></a>01510 -<a name="l01512"></a><a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">01512</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>()<span class="keyword"> const </span>{ <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( stdout, 0 ); } -<a name="l01513"></a>01513 -<a name="l01514"></a>01514 <span class="comment">/* Write the document to a string using formatted printing ("pretty print"). This</span> -<a name="l01515"></a>01515 <span class="comment"> will allocate a character array (new char[]) and return it as a pointer. The</span> -<a name="l01516"></a>01516 <span class="comment"> calling code pust call delete[] on the return char* to avoid a memory leak.</span> -<a name="l01517"></a>01517 <span class="comment"> */</span> -<a name="l01518"></a>01518 <span class="comment">//char* PrintToMemory() const; </span> -<a name="l01519"></a>01519 -<a name="l01521"></a>01521 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>; -<a name="l01522"></a>01522 <span class="comment">// [internal use]</span> -<a name="l01523"></a>01523 <span class="keywordtype">void</span> SetError( <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); -<a name="l01524"></a>01524 -<a name="l01525"></a><a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4">01525</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01526"></a><a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42">01526</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } -<a name="l01527"></a>01527 -<a name="l01530"></a>01530 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01460"></a><a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">01460</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29" title="If an error occurs, Error will be set to true.">Error</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> error; } +<a name="l01461"></a>01461 +<a name="l01463"></a><a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e">01463</a> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorDesc.c_str (); } +<a name="l01464"></a>01464 +<a name="l01468"></a><a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">01468</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f" title="Generally, you probably want the error string ( ErrorDesc() ).">ErrorId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorId; } +<a name="l01469"></a>01469 +<a name="l01477"></a><a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">01477</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e" title="Returns the location (if known) of the error.">ErrorRow</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.row+1; } +<a name="l01478"></a><a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649">01478</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow().">ErrorCol</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> errorLocation.col+1; } +<a name="l01479"></a>01479 +<a name="l01504"></a><a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">01504</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e" title="SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...">SetTabSize</a>( <span class="keywordtype">int</span> _tabsize ) { tabsize = _tabsize; } +<a name="l01505"></a>01505 +<a name="l01506"></a>01506 <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; } +<a name="l01507"></a>01507 +<a name="l01511"></a><a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">01511</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35" title="If you have handled the error, it can be reset with this call.">ClearError</a>() { error = <span class="keyword">false</span>; +<a name="l01512"></a>01512 errorId = 0; +<a name="l01513"></a>01513 errorDesc = <span class="stringliteral">""</span>; +<a name="l01514"></a>01514 errorLocation.row = errorLocation.col = 0; +<a name="l01515"></a>01515 <span class="comment">//errorLocation.last = 0; </span> +<a name="l01516"></a>01516 } +<a name="l01517"></a>01517 +<a name="l01519"></a><a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">01519</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>()<span class="keyword"> const </span>{ <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( stdout, 0 ); } +<a name="l01520"></a>01520 +<a name="l01521"></a>01521 <span class="comment">/* Write the document to a string using formatted printing ("pretty print"). This</span> +<a name="l01522"></a>01522 <span class="comment"> will allocate a character array (new char[]) and return it as a pointer. The</span> +<a name="l01523"></a>01523 <span class="comment"> calling code pust call delete[] on the return char* to avoid a memory leak.</span> +<a name="l01524"></a>01524 <span class="comment"> */</span> +<a name="l01525"></a>01525 <span class="comment">//char* PrintToMemory() const; </span> +<a name="l01526"></a>01526 +<a name="l01528"></a>01528 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510" title="Write the document to standard out using formatted printing (&quot;pretty print&quot;)...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>; +<a name="l01529"></a>01529 <span class="comment">// [internal use]</span> +<a name="l01530"></a>01530 <span class="keywordtype">void</span> SetError( <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); <a name="l01531"></a>01531 -<a name="l01532"></a>01532 <span class="keyword">protected</span> : -<a name="l01533"></a>01533 <span class="comment">// [internal use]</span> -<a name="l01534"></a>01534 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907" title="Create an exact duplicate of this node and return it.">Clone</a>() <span class="keyword">const</span>; -<a name="l01535"></a>01535 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01536"></a>01536 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); -<a name="l01537"></a>01537 <span class="preprocessor"> #endif</span> -<a name="l01538"></a>01538 <span class="preprocessor"></span> -<a name="l01539"></a>01539 <span class="keyword">private</span>: -<a name="l01540"></a>01540 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* target ) <span class="keyword">const</span>; -<a name="l01541"></a>01541 -<a name="l01542"></a>01542 <span class="keywordtype">bool</span> error; -<a name="l01543"></a>01543 <span class="keywordtype">int</span> errorId; -<a name="l01544"></a>01544 TIXML_STRING errorDesc; -<a name="l01545"></a>01545 <span class="keywordtype">int</span> tabsize; -<a name="l01546"></a>01546 TiXmlCursor errorLocation; -<a name="l01547"></a>01547 <span class="keywordtype">bool</span> useMicrosoftBOM; <span class="comment">// the UTF-8 BOM were found when read. Note this, and try to write.</span> -<a name="l01548"></a>01548 }; -<a name="l01549"></a>01549 -<a name="l01550"></a>01550 -<a name="l01631"></a><a class="code" href="classTiXmlHandle.html">01631</a> <span class="keyword">class </span><a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> -<a name="l01632"></a>01632 { -<a name="l01633"></a>01633 <span class="keyword">public</span>: -<a name="l01635"></a><a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8">01635</a> <a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8" title="Create a handle from any node (at any depth of the tree.) This can be a null pointer...">TiXmlHandle</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* _node ) { this->node = _node; } -<a name="l01637"></a><a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7">01637</a> <a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7" title="Copy constructor.">TiXmlHandle</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { this->node = ref.node; } -<a name="l01638"></a>01638 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { this->node = ref.node; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } -<a name="l01639"></a>01639 -<a name="l01641"></a>01641 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>() <span class="keyword">const</span>; -<a name="l01643"></a>01643 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>; -<a name="l01645"></a>01645 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>() <span class="keyword">const</span>; -<a name="l01647"></a>01647 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>; -<a name="l01648"></a>01648 -<a name="l01652"></a>01652 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; -<a name="l01656"></a>01656 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; -<a name="l01661"></a>01661 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; -<a name="l01666"></a>01666 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; -<a name="l01667"></a>01667 -<a name="l01668"></a>01668 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01669"></a>01669 <span class="preprocessor"></span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( _value.c_str() ); } -<a name="l01670"></a>01670 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( _value.c_str() ); } -<a name="l01671"></a>01671 -<a name="l01672"></a>01672 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( _value.c_str(), index ); } -<a name="l01673"></a>01673 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( _value.c_str(), index ); } -<a name="l01674"></a>01674 <span class="preprocessor"> #endif</span> -<a name="l01675"></a>01675 <span class="preprocessor"></span> -<a name="l01678"></a><a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3">01678</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> node; } -<a name="l01681"></a><a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e">01681</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } -<a name="l01684"></a><a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586">01684</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToText() ) ? node->ToText() : 0 ); } -<a name="l01687"></a><a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674">01687</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } -<a name="l01688"></a>01688 -<a name="l01692"></a><a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">01692</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">Node</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>(); } -<a name="l01696"></a><a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">01696</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">Element</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>(); } -<a name="l01700"></a><a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">01700</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">Text</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>(); } -<a name="l01704"></a><a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">01704</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">Unknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>(); } -<a name="l01705"></a>01705 -<a name="l01706"></a>01706 <span class="keyword">private</span>: -<a name="l01707"></a>01707 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* node; -<a name="l01708"></a>01708 }; -<a name="l01709"></a>01709 -<a name="l01710"></a>01710 -<a name="l01730"></a><a class="code" href="classTiXmlPrinter.html">01730</a> <span class="keyword">class </span><a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a> -<a name="l01731"></a>01731 { -<a name="l01732"></a>01732 <span class="keyword">public</span>: -<a name="l01733"></a>01733 <a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a>() : depth( 0 ), simpleTextPrint( <span class="keyword">false</span> ), -<a name="l01734"></a>01734 buffer(), indent( <span class="stringliteral">" "</span> ), lineBreak( <span class="stringliteral">"\n"</span> ) {} -<a name="l01735"></a>01735 -<a name="l01736"></a>01736 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc ); -<a name="l01737"></a>01737 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc ); -<a name="l01738"></a>01738 -<a name="l01739"></a>01739 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* firstAttribute ); -<a name="l01740"></a>01740 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element ); -<a name="l01741"></a>01741 -<a name="l01742"></a>01742 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& declaration ); -<a name="l01743"></a>01743 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& text ); -<a name="l01744"></a>01744 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& comment ); -<a name="l01745"></a>01745 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& unknown ); -<a name="l01746"></a>01746 -<a name="l01750"></a><a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e">01750</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e" title="Set the indent characters for printing.">SetIndent</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _indent ) { indent = _indent ? _indent : <span class="stringliteral">""</span> ; } -<a name="l01752"></a><a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d">01752</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d" title="Query the indention string.">Indent</a>() { <span class="keywordflow">return</span> indent.c_str(); } -<a name="l01757"></a><a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6">01757</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6" title="Set the line breaking string.">SetLineBreak</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : <span class="stringliteral">""</span>; } -<a name="l01759"></a><a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d">01759</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d" title="Query the current line breaking string.">LineBreak</a>() { <span class="keywordflow">return</span> lineBreak.c_str(); } -<a name="l01760"></a>01760 -<a name="l01764"></a><a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19">01764</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19" title="Switch over to &quot;stream printing&quot; which is the most dense formatting without...">SetStreamPrinting</a>() { indent = <span class="stringliteral">""</span>; -<a name="l01765"></a>01765 lineBreak = <span class="stringliteral">""</span>; -<a name="l01766"></a>01766 } -<a name="l01768"></a><a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e">01768</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e" title="Return the result.">CStr</a>() { <span class="keywordflow">return</span> buffer.c_str(); } -<a name="l01770"></a><a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d">01770</a> <span class="keywordtype">size_t</span> <a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d" title="Return the length of the result string.">Size</a>() { <span class="keywordflow">return</span> buffer.size(); } -<a name="l01771"></a>01771 -<a name="l01772"></a>01772 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> -<a name="l01774"></a><a class="code" href="classTiXmlPrinter.html#a3bd4daf44309b41f5813a833caa0d1c9">01774</a> <span class="preprocessor"> const std::string& Str() { return buffer; }</span> -<a name="l01775"></a>01775 <span class="preprocessor"></span><span class="preprocessor"> #endif</span> -<a name="l01776"></a>01776 <span class="preprocessor"></span> -<a name="l01777"></a>01777 <span class="keyword">private</span>: -<a name="l01778"></a>01778 <span class="keywordtype">void</span> DoIndent() { -<a name="l01779"></a>01779 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i<depth; ++i ) -<a name="l01780"></a>01780 buffer += indent; -<a name="l01781"></a>01781 } -<a name="l01782"></a>01782 <span class="keywordtype">void</span> DoLineBreak() { -<a name="l01783"></a>01783 buffer += lineBreak; -<a name="l01784"></a>01784 } -<a name="l01785"></a>01785 -<a name="l01786"></a>01786 <span class="keywordtype">int</span> depth; -<a name="l01787"></a>01787 <span class="keywordtype">bool</span> simpleTextPrint; -<a name="l01788"></a>01788 TIXML_STRING buffer; -<a name="l01789"></a>01789 TIXML_STRING indent; -<a name="l01790"></a>01790 TIXML_STRING lineBreak; -<a name="l01791"></a>01791 }; +<a name="l01532"></a><a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4">01532</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01533"></a><a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42">01533</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42" title="Cast to a more defined type. Will return null not of the requested type.">ToDocument</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } +<a name="l01534"></a>01534 +<a name="l01537"></a>01537 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a" title="Walk the XML tree visiting this node and all of its children.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>; +<a name="l01538"></a>01538 +<a name="l01539"></a>01539 <span class="keyword">protected</span> : +<a name="l01540"></a>01540 <span class="comment">// [internal use]</span> +<a name="l01541"></a>01541 <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907" title="Create an exact duplicate of this node and return it.">Clone</a>() <span class="keyword">const</span>; +<a name="l01542"></a>01542 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01543"></a>01543 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag ); +<a name="l01544"></a>01544 <span class="preprocessor"> #endif</span> +<a name="l01545"></a>01545 <span class="preprocessor"></span> +<a name="l01546"></a>01546 <span class="keyword">private</span>: +<a name="l01547"></a>01547 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* target ) <span class="keyword">const</span>; +<a name="l01548"></a>01548 +<a name="l01549"></a>01549 <span class="keywordtype">bool</span> error; +<a name="l01550"></a>01550 <span class="keywordtype">int</span> errorId; +<a name="l01551"></a>01551 TIXML_STRING errorDesc; +<a name="l01552"></a>01552 <span class="keywordtype">int</span> tabsize; +<a name="l01553"></a>01553 TiXmlCursor errorLocation; +<a name="l01554"></a>01554 <span class="keywordtype">bool</span> useMicrosoftBOM; <span class="comment">// the UTF-8 BOM were found when read. Note this, and try to write.</span> +<a name="l01555"></a>01555 }; +<a name="l01556"></a>01556 +<a name="l01557"></a>01557 +<a name="l01638"></a><a class="code" href="classTiXmlHandle.html">01638</a> <span class="keyword">class </span><a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> +<a name="l01639"></a>01639 { +<a name="l01640"></a>01640 <span class="keyword">public</span>: +<a name="l01642"></a><a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8">01642</a> <a class="code" href="classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8" title="Create a handle from any node (at any depth of the tree.) This can be a null pointer...">TiXmlHandle</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* _node ) { this->node = _node; } +<a name="l01644"></a><a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7">01644</a> <a class="code" href="classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7" title="Copy constructor.">TiXmlHandle</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { this->node = ref.node; } +<a name="l01645"></a>01645 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a>& ref ) { <span class="keywordflow">if</span> ( &ref != <span class="keyword">this</span> ) this->node = ref.node; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } +<a name="l01646"></a>01646 +<a name="l01648"></a>01648 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>() <span class="keyword">const</span>; +<a name="l01650"></a>01650 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>; +<a name="l01652"></a>01652 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>() <span class="keyword">const</span>; +<a name="l01654"></a>01654 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>; +<a name="l01655"></a>01655 +<a name="l01659"></a>01659 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; +<a name="l01663"></a>01663 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; +<a name="l01668"></a>01668 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; +<a name="l01673"></a>01673 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>; +<a name="l01674"></a>01674 +<a name="l01675"></a>01675 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01676"></a>01676 <span class="preprocessor"></span> <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139" title="Return a handle to the first child node.">FirstChild</a>( _value.c_str() ); } +<a name="l01677"></a>01677 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( <span class="keyword">const</span> std::string& _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a" title="Return a handle to the first child element.">FirstChildElement</a>( _value.c_str() ); } +<a name="l01678"></a>01678 +<a name="l01679"></a>01679 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4" title="Return a handle to the &quot;index&quot; child with the given name.">Child</a>( _value.c_str(), index ); } +<a name="l01680"></a>01680 <a class="code" href="classTiXmlHandle.html" title="A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> std::string& _value, <span class="keywordtype">int</span> index )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d" title="Return a handle to the &quot;index&quot; child element with the given name.">ChildElement</a>( _value.c_str(), index ); } +<a name="l01681"></a>01681 <span class="preprocessor"> #endif</span> +<a name="l01682"></a>01682 <span class="preprocessor"></span> +<a name="l01685"></a><a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3">01685</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> node; } +<a name="l01688"></a><a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e">01688</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } +<a name="l01691"></a><a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586">01691</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToText() ) ? node->ToText() : 0 ); } +<a name="l01694"></a><a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674">01694</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } +<a name="l01695"></a>01695 +<a name="l01699"></a><a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">01699</a> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376">Node</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3" title="Return the handle as a TiXmlNode.">ToNode</a>(); } +<a name="l01703"></a><a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">01703</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7">Element</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e" title="Return the handle as a TiXmlElement.">ToElement</a>(); } +<a name="l01707"></a><a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">01707</a> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13">Text</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586" title="Return the handle as a TiXmlText.">ToText</a>(); } +<a name="l01711"></a><a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">01711</a> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465">Unknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674" title="Return the handle as a TiXmlUnknown.">ToUnknown</a>(); } +<a name="l01712"></a>01712 +<a name="l01713"></a>01713 <span class="keyword">private</span>: +<a name="l01714"></a>01714 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* node; +<a name="l01715"></a>01715 }; +<a name="l01716"></a>01716 +<a name="l01717"></a>01717 +<a name="l01737"></a><a class="code" href="classTiXmlPrinter.html">01737</a> <span class="keyword">class </span><a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method...">TiXmlVisitor</a> +<a name="l01738"></a>01738 { +<a name="l01739"></a>01739 <span class="keyword">public</span>: +<a name="l01740"></a>01740 <a class="code" href="classTiXmlPrinter.html" title="Print to memory functionality.">TiXmlPrinter</a>() : depth( 0 ), simpleTextPrint( <span class="keyword">false</span> ), +<a name="l01741"></a>01741 buffer(), indent( <span class="stringliteral">" "</span> ), lineBreak( <span class="stringliteral">"\n"</span> ) {} +<a name="l01742"></a>01742 +<a name="l01743"></a>01743 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc ); +<a name="l01744"></a>01744 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>& doc ); +<a name="l01745"></a>01745 +<a name="l01746"></a>01746 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1" title="Visit a document.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* firstAttribute ); +<a name="l01747"></a>01747 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2" title="Visit a document.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>& element ); +<a name="l01748"></a>01748 +<a name="l01749"></a>01749 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html" title="In correct XML the declaration is the first entry in the file.">TiXmlDeclaration</a>& declaration ); +<a name="l01750"></a>01750 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>& text ); +<a name="l01751"></a>01751 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>& comment ); +<a name="l01752"></a>01752 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38" title="Visit a declaration.">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.">TiXmlUnknown</a>& unknown ); +<a name="l01753"></a>01753 +<a name="l01757"></a><a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e">01757</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e" title="Set the indent characters for printing.">SetIndent</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _indent ) { indent = _indent ? _indent : <span class="stringliteral">""</span> ; } +<a name="l01759"></a><a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d">01759</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d" title="Query the indention string.">Indent</a>() { <span class="keywordflow">return</span> indent.c_str(); } +<a name="l01764"></a><a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6">01764</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6" title="Set the line breaking string.">SetLineBreak</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : <span class="stringliteral">""</span>; } +<a name="l01766"></a><a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d">01766</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d" title="Query the current line breaking string.">LineBreak</a>() { <span class="keywordflow">return</span> lineBreak.c_str(); } +<a name="l01767"></a>01767 +<a name="l01771"></a><a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19">01771</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19" title="Switch over to &quot;stream printing&quot; which is the most dense formatting without...">SetStreamPrinting</a>() { indent = <span class="stringliteral">""</span>; +<a name="l01772"></a>01772 lineBreak = <span class="stringliteral">""</span>; +<a name="l01773"></a>01773 } +<a name="l01775"></a><a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e">01775</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e" title="Return the result.">CStr</a>() { <span class="keywordflow">return</span> buffer.c_str(); } +<a name="l01777"></a><a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d">01777</a> <span class="keywordtype">size_t</span> <a class="code" href="classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d" title="Return the length of the result string.">Size</a>() { <span class="keywordflow">return</span> buffer.size(); } +<a name="l01778"></a>01778 +<a name="l01779"></a>01779 <span class="preprocessor"> #ifdef TIXML_USE_STL</span> +<a name="l01781"></a><a class="code" href="classTiXmlPrinter.html#a3bd4daf44309b41f5813a833caa0d1c9">01781</a> <span class="preprocessor"> const std::string& Str() { return buffer; }</span> +<a name="l01782"></a>01782 <span class="preprocessor"></span><span class="preprocessor"> #endif</span> +<a name="l01783"></a>01783 <span class="preprocessor"></span> +<a name="l01784"></a>01784 <span class="keyword">private</span>: +<a name="l01785"></a>01785 <span class="keywordtype">void</span> DoIndent() { +<a name="l01786"></a>01786 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i<depth; ++i ) +<a name="l01787"></a>01787 buffer += indent; +<a name="l01788"></a>01788 } +<a name="l01789"></a>01789 <span class="keywordtype">void</span> DoLineBreak() { +<a name="l01790"></a>01790 buffer += lineBreak; +<a name="l01791"></a>01791 } <a name="l01792"></a>01792 -<a name="l01793"></a>01793 -<a name="l01794"></a>01794 <span class="preprocessor">#ifdef _MSC_VER</span> -<a name="l01795"></a>01795 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span> -<a name="l01796"></a>01796 <span class="preprocessor"></span><span class="preprocessor">#endif</span> -<a name="l01797"></a>01797 <span class="preprocessor"></span> -<a name="l01798"></a>01798 <span class="preprocessor">#endif</span> -<a name="l01799"></a>01799 <span class="preprocessor"></span> +<a name="l01793"></a>01793 <span class="keywordtype">int</span> depth; +<a name="l01794"></a>01794 <span class="keywordtype">bool</span> simpleTextPrint; +<a name="l01795"></a>01795 TIXML_STRING buffer; +<a name="l01796"></a>01796 TIXML_STRING indent; +<a name="l01797"></a>01797 TIXML_STRING lineBreak; +<a name="l01798"></a>01798 }; +<a name="l01799"></a>01799 +<a name="l01800"></a>01800 +<a name="l01801"></a>01801 <span class="preprocessor">#ifdef _MSC_VER</span> +<a name="l01802"></a>01802 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span> +<a name="l01803"></a>01803 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +<a name="l01804"></a>01804 <span class="preprocessor"></span> +<a name="l01805"></a>01805 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> |