tinyxml_8h_source.html 200 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>TinyXml: tinyxml.h Source File</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8. </head>
  9. <body>
  10. <!-- Generated by Doxygen 1.6.2 -->
  11. <div class="navigation" id="top">
  12. <div class="tabs">
  13. <ul>
  14. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. <li><a href="annotated.html"><span>Classes</span></a></li>
  17. <li class="current"><a href="files.html"><span>Files</span></a></li>
  18. </ul>
  19. </div>
  20. <div class="tabs">
  21. <ul>
  22. <li><a href="files.html"><span>File&nbsp;List</span></a></li>
  23. </ul>
  24. </div>
  25. <h1>tinyxml.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
  26. <a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span>
  27. <a name="l00003"></a>00003 <span class="comment">Original code by Lee Thomason (www.grinninglizard.com)</span>
  28. <a name="l00004"></a>00004 <span class="comment"></span>
  29. <a name="l00005"></a>00005 <span class="comment">This software is provided &#39;as-is&#39;, without any express or implied</span>
  30. <a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span>
  31. <a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span>
  32. <a name="l00008"></a>00008 <span class="comment"></span>
  33. <a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span>
  34. <a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span>
  35. <a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span>
  36. <a name="l00012"></a>00012 <span class="comment"></span>
  37. <a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span>
  38. <a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span>
  39. <a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span>
  40. <a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span>
  41. <a name="l00017"></a>00017 <span class="comment"></span>
  42. <a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span>
  43. <a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span>
  44. <a name="l00020"></a>00020 <span class="comment"></span>
  45. <a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span>
  46. <a name="l00022"></a>00022 <span class="comment">distribution.</span>
  47. <a name="l00023"></a>00023 <span class="comment">*/</span>
  48. <a name="l00024"></a>00024
  49. <a name="l00025"></a>00025
  50. <a name="l00026"></a>00026 <span class="preprocessor">#ifndef TINYXML_INCLUDED</span>
  51. <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TINYXML_INCLUDED</span>
  52. <a name="l00028"></a>00028 <span class="preprocessor"></span>
  53. <a name="l00029"></a>00029 <span class="preprocessor">#ifdef _MSC_VER</span>
  54. <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>
  55. <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4530 )</span>
  56. <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4786 )</span>
  57. <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  58. <a name="l00034"></a>00034 <span class="preprocessor"></span>
  59. <a name="l00035"></a>00035 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
  60. <a name="l00036"></a>00036 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
  61. <a name="l00037"></a>00037 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
  62. <a name="l00038"></a>00038 <span class="preprocessor">#include &lt;string.h&gt;</span>
  63. <a name="l00039"></a>00039 <span class="preprocessor">#include &lt;assert.h&gt;</span>
  64. <a name="l00040"></a>00040
  65. <a name="l00041"></a>00041 <span class="comment">// Help out windows:</span>
  66. <a name="l00042"></a>00042 <span class="preprocessor">#if defined( _DEBUG ) &amp;&amp; !defined( DEBUG )</span>
  67. <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG</span>
  68. <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  69. <a name="l00045"></a>00045 <span class="preprocessor"></span>
  70. <a name="l00046"></a>00046 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
  71. <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor"> #include &lt;string&gt;</span>
  72. <a name="l00048"></a>00048 <span class="preprocessor"> #include &lt;iostream&gt;</span>
  73. <a name="l00049"></a>00049 <span class="preprocessor"> #include &lt;sstream&gt;</span>
  74. <a name="l00050"></a>00050 <span class="preprocessor"> #define TIXML_STRING std::string</span>
  75. <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#else</span>
  76. <a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #include &quot;tinystr.h&quot;</span>
  77. <a name="l00053"></a>00053 <span class="preprocessor"> #define TIXML_STRING TiXmlString</span>
  78. <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  79. <a name="l00055"></a>00055 <span class="preprocessor"></span>
  80. <a name="l00056"></a>00056 <span class="comment">// Deprecated library function hell. Compilers want to use the</span>
  81. <a name="l00057"></a>00057 <span class="comment">// new safe versions. This probably doesn&#39;t fully address the problem,</span>
  82. <a name="l00058"></a>00058 <span class="comment">// but it gets closer. There are too many compilers for me to fully</span>
  83. <a name="l00059"></a>00059 <span class="comment">// test. If you get compilation troubles, undefine TIXML_SAFE</span>
  84. <a name="l00060"></a>00060 <span class="preprocessor">#define TIXML_SAFE</span>
  85. <a name="l00061"></a>00061 <span class="preprocessor"></span>
  86. <a name="l00062"></a>00062 <span class="preprocessor">#ifdef TIXML_SAFE</span>
  87. <a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1400 )</span>
  88. <a name="l00064"></a>00064 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 2005 and higher.</span>
  89. <a name="l00065"></a>00065 <span class="preprocessor"> #define TIXML_SNPRINTF _snprintf_s</span>
  90. <a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf_s</span>
  91. <a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor"> #elif defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1200 )</span>
  92. <a name="l00068"></a>00068 <span class="preprocessor"></span> <span class="comment">// Microsoft visual studio, version 6 and higher.</span>
  93. <a name="l00069"></a>00069 <span class="comment">//#pragma message( &quot;Using _sn* functions.&quot; )</span>
  94. <a name="l00070"></a>00070 <span class="preprocessor"> #define TIXML_SNPRINTF _snprintf</span>
  95. <a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
  96. <a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"> #elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt;= 3 )</span>
  97. <a name="l00073"></a>00073 <span class="preprocessor"></span> <span class="comment">// GCC version 3 and higher.s</span>
  98. <a name="l00074"></a>00074 <span class="comment">//#warning( &quot;Using sn* functions.&quot; )</span>
  99. <a name="l00075"></a>00075 <span class="preprocessor"> #define TIXML_SNPRINTF snprintf</span>
  100. <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
  101. <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
  102. <a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SNPRINTF snprintf</span>
  103. <a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor"> #define TIXML_SSCANF sscanf</span>
  104. <a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  105. <a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#endif </span>
  106. <a name="l00082"></a>00082 <span class="preprocessor"></span>
  107. <a name="l00083"></a>00083 <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
  108. <a name="l00084"></a>00084 <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>;
  109. <a name="l00085"></a>00085 <span class="keyword">class </span><a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>;
  110. <a name="l00086"></a>00086 <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>;
  111. <a name="l00087"></a>00087 <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>;
  112. <a name="l00088"></a>00088 <span class="keyword">class </span><a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>;
  113. <a name="l00089"></a>00089 <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>;
  114. <a name="l00090"></a>00090 <span class="keyword">class </span>TiXmlParsingData;
  115. <a name="l00091"></a>00091
  116. <a name="l00092"></a>00092 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MAJOR_VERSION = 2;
  117. <a name="l00093"></a>00093 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MINOR_VERSION = 6;
  118. <a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 2;
  119. <a name="l00095"></a>00095
  120. <a name="l00096"></a>00096 <span class="comment">/* Internal structure for tracking location of items </span>
  121. <a name="l00097"></a>00097 <span class="comment"> in the XML file.</span>
  122. <a name="l00098"></a>00098 <span class="comment">*/</span>
  123. <a name="l00099"></a>00099 <span class="keyword">struct </span>TiXmlCursor
  124. <a name="l00100"></a>00100 {
  125. <a name="l00101"></a>00101 TiXmlCursor() { Clear(); }
  126. <a name="l00102"></a>00102 <span class="keywordtype">void</span> Clear() { row = col = -1; }
  127. <a name="l00103"></a>00103
  128. <a name="l00104"></a>00104 <span class="keywordtype">int</span> row; <span class="comment">// 0 based.</span>
  129. <a name="l00105"></a>00105 <span class="keywordtype">int</span> col; <span class="comment">// 0 based.</span>
  130. <a name="l00106"></a>00106 };
  131. <a name="l00107"></a>00107
  132. <a name="l00108"></a>00108
  133. <a name="l00128"></a><a class="code" href="classTiXmlVisitor.html">00128</a> <span class="keyword">class </span><a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>
  134. <a name="l00129"></a>00129 {
  135. <a name="l00130"></a>00130 <span class="keyword">public</span>:
  136. <a name="l00131"></a>00131 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>() {}
  137. <a name="l00132"></a>00132
  138. <a name="l00134"></a><a class="code" href="classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0">00134</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0" 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>&amp; <span class="comment">/*doc*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  139. <a name="l00136"></a><a class="code" href="classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad">00136</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad" 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>&amp; <span class="comment">/*doc*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  140. <a name="l00137"></a>00137
  141. <a name="l00139"></a><a class="code" href="classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff">00139</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff" title="Visit an element.">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>&amp; <span class="comment">/*element*/</span>, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="comment">/*firstAttribute*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  142. <a name="l00141"></a><a class="code" href="classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c">00141</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c" title="Visit an element.">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>&amp; <span class="comment">/*element*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  143. <a name="l00142"></a>00142
  144. <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>&amp; <span class="comment">/*declaration*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  145. <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>&amp; <span class="comment">/*text*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  146. <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>&amp; <span class="comment">/*comment*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  147. <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&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>&amp; <span class="comment">/*unknown*/</span> ) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
  148. <a name="l00151"></a>00151 };
  149. <a name="l00152"></a>00152
  150. <a name="l00153"></a>00153 <span class="comment">// Only used by Attribute::Query functions</span>
  151. <a name="l00154"></a>00154 <span class="keyword">enum</span>
  152. <a name="l00155"></a>00155 {
  153. <a name="l00156"></a>00156 TIXML_SUCCESS,
  154. <a name="l00157"></a>00157 TIXML_NO_ATTRIBUTE,
  155. <a name="l00158"></a>00158 TIXML_WRONG_TYPE
  156. <a name="l00159"></a>00159 };
  157. <a name="l00160"></a>00160
  158. <a name="l00161"></a>00161
  159. <a name="l00162"></a>00162 <span class="comment">// Used by the parsing routines.</span>
  160. <a name="l00163"></a>00163 <span class="keyword">enum</span> TiXmlEncoding
  161. <a name="l00164"></a>00164 {
  162. <a name="l00165"></a>00165 TIXML_ENCODING_UNKNOWN,
  163. <a name="l00166"></a>00166 TIXML_ENCODING_UTF8,
  164. <a name="l00167"></a>00167 TIXML_ENCODING_LEGACY
  165. <a name="l00168"></a>00168 };
  166. <a name="l00169"></a>00169
  167. <a name="l00170"></a>00170 <span class="keyword">const</span> TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
  168. <a name="l00171"></a>00171
  169. <a name="l00194"></a><a class="code" href="classTiXmlBase.html">00194</a> <span class="keyword">class </span><a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
  170. <a name="l00195"></a>00195 {
  171. <a name="l00196"></a>00196 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>;
  172. <a name="l00197"></a>00197 <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>;
  173. <a name="l00198"></a>00198 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
  174. <a name="l00199"></a>00199
  175. <a name="l00200"></a>00200 <span class="keyword">public</span>:
  176. <a name="l00201"></a>00201 <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>() : <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>(0) {}
  177. <a name="l00202"></a>00202 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>() {}
  178. <a name="l00203"></a>00203
  179. <a name="l00213"></a>00213 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512" 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> = 0;
  180. <a name="l00214"></a>00214
  181. <a name="l00221"></a><a class="code" href="classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1">00221</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1" title="The world does not agree on whether white space should be kept or not.">SetCondenseWhiteSpace</a>( <span class="keywordtype">bool</span> condense ) { condenseWhiteSpace = condense; }
  182. <a name="l00222"></a>00222
  183. <a name="l00224"></a><a class="code" href="classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438">00224</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438" title="Return the current white space setting.">IsWhiteSpaceCondensed</a>() { <span class="keywordflow">return</span> condenseWhiteSpace; }
  184. <a name="l00225"></a>00225
  185. <a name="l00244"></a><a class="code" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853">00244</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853" title="Return the position, in the original source file, of this node or attribute.">Row</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> location.row + 1; }
  186. <a name="l00245"></a><a class="code" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003">00245</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row().">Column</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> location.col + 1; }
  187. <a name="l00246"></a>00246
  188. <a name="l00247"></a><a class="code" href="classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d">00247</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d" title="Set a pointer to arbitrary user data.">SetUserData</a>( <span class="keywordtype">void</span>* user ) { <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a> = user; }
  189. <a name="l00248"></a><a class="code" href="classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17">00248</a> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17" title="Get a pointer to arbitrary user data.">GetUserData</a>() { <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>; }
  190. <a name="l00249"></a><a class="code" href="classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4">00249</a> <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4" title="Get a pointer to arbitrary user data.">GetUserData</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>; }
  191. <a name="l00250"></a>00250
  192. <a name="l00251"></a>00251 <span class="comment">// Table that returs, for a given lead byte, the total number of bytes</span>
  193. <a name="l00252"></a>00252 <span class="comment">// in the UTF-8 sequence.</span>
  194. <a name="l00253"></a>00253 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> utf8ByteTable[256];
  195. <a name="l00254"></a>00254
  196. <a name="l00255"></a>00255 <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,
  197. <a name="l00256"></a>00256 TiXmlParsingData* data,
  198. <a name="l00257"></a>00257 TiXmlEncoding encoding <span class="comment">/*= TIXML_ENCODING_UNKNOWN */</span> ) = 0;
  199. <a name="l00258"></a>00258
  200. <a name="l00262"></a>00262 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a6bd8c315c1acb09e34107b8736505948" title="Expands entities in a string.">EncodeString</a>( <span class="keyword">const</span> TIXML_STRING&amp; str, TIXML_STRING* out );
  201. <a name="l00263"></a>00263
  202. <a name="l00264"></a>00264 <span class="keyword">enum</span>
  203. <a name="l00265"></a>00265 {
  204. <a name="l00266"></a>00266 TIXML_NO_ERROR = 0,
  205. <a name="l00267"></a>00267 TIXML_ERROR,
  206. <a name="l00268"></a>00268 TIXML_ERROR_OPENING_FILE,
  207. <a name="l00269"></a>00269 TIXML_ERROR_PARSING_ELEMENT,
  208. <a name="l00270"></a>00270 TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
  209. <a name="l00271"></a>00271 TIXML_ERROR_READING_ELEMENT_VALUE,
  210. <a name="l00272"></a>00272 TIXML_ERROR_READING_ATTRIBUTES,
  211. <a name="l00273"></a>00273 TIXML_ERROR_PARSING_EMPTY,
  212. <a name="l00274"></a>00274 TIXML_ERROR_READING_END_TAG,
  213. <a name="l00275"></a>00275 TIXML_ERROR_PARSING_UNKNOWN,
  214. <a name="l00276"></a>00276 TIXML_ERROR_PARSING_COMMENT,
  215. <a name="l00277"></a>00277 TIXML_ERROR_PARSING_DECLARATION,
  216. <a name="l00278"></a>00278 TIXML_ERROR_DOCUMENT_EMPTY,
  217. <a name="l00279"></a>00279 TIXML_ERROR_EMBEDDED_NULL,
  218. <a name="l00280"></a>00280 TIXML_ERROR_PARSING_CDATA,
  219. <a name="l00281"></a>00281 TIXML_ERROR_DOCUMENT_TOP_ONLY,
  220. <a name="l00282"></a>00282
  221. <a name="l00283"></a>00283 TIXML_ERROR_STRING_COUNT
  222. <a name="l00284"></a>00284 };
  223. <a name="l00285"></a>00285
  224. <a name="l00286"></a>00286 <span class="keyword">protected</span>:
  225. <a name="l00287"></a>00287
  226. <a name="l00288"></a>00288 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* SkipWhiteSpace( <span class="keyword">const</span> <span class="keywordtype">char</span>*, TiXmlEncoding encoding );
  227. <a name="l00289"></a>00289
  228. <a name="l00290"></a>00290 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">char</span> c )
  229. <a name="l00291"></a>00291 {
  230. <a name="l00292"></a>00292 <span class="keywordflow">return</span> ( isspace( (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) c ) || c == <span class="charliteral">&#39;\n&#39;</span> || c == <span class="charliteral">&#39;\r&#39;</span> );
  231. <a name="l00293"></a>00293 }
  232. <a name="l00294"></a>00294 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">int</span> c )
  233. <a name="l00295"></a>00295 {
  234. <a name="l00296"></a>00296 <span class="keywordflow">if</span> ( c &lt; 256 )
  235. <a name="l00297"></a>00297 <span class="keywordflow">return</span> IsWhiteSpace( (<span class="keywordtype">char</span>) c );
  236. <a name="l00298"></a>00298 <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// Again, only truly correct for English/Latin...but usually works.</span>
  237. <a name="l00299"></a>00299 }
  238. <a name="l00300"></a>00300
  239. <a name="l00301"></a>00301 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  240. <a name="l00302"></a>00302 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
  241. <a name="l00303"></a>00303 <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamTo( std::istream * in, <span class="keywordtype">int</span> character, TIXML_STRING * tag );
  242. <a name="l00304"></a>00304 <span class="preprocessor"> #endif</span>
  243. <a name="l00305"></a>00305 <span class="preprocessor"></span>
  244. <a name="l00306"></a>00306 <span class="comment">/* Reads an XML name into the string provided. Returns</span>
  245. <a name="l00307"></a>00307 <span class="comment"> a pointer just past the last character of the name,</span>
  246. <a name="l00308"></a>00308 <span class="comment"> or 0 if the function has an error.</span>
  247. <a name="l00309"></a>00309 <span class="comment"> */</span>
  248. <a name="l00310"></a>00310 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadName( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TIXML_STRING* name, TiXmlEncoding encoding );
  249. <a name="l00311"></a>00311
  250. <a name="l00312"></a>00312 <span class="comment">/* Reads text. Returns a pointer past the given end tag.</span>
  251. <a name="l00313"></a>00313 <span class="comment"> Wickedly complex options, but it keeps the (sensitive) code in one place.</span>
  252. <a name="l00314"></a>00314 <span class="comment"> */</span>
  253. <a name="l00315"></a>00315 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadText( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, <span class="comment">// where to start</span>
  254. <a name="l00316"></a>00316 TIXML_STRING* text, <span class="comment">// the string read</span>
  255. <a name="l00317"></a>00317 <span class="keywordtype">bool</span> ignoreWhiteSpace, <span class="comment">// whether to keep the white space</span>
  256. <a name="l00318"></a>00318 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag, <span class="comment">// what ends this text</span>
  257. <a name="l00319"></a>00319 <span class="keywordtype">bool</span> ignoreCase, <span class="comment">// whether to ignore case in the end tag</span>
  258. <a name="l00320"></a>00320 TiXmlEncoding encoding ); <span class="comment">// the current encoding</span>
  259. <a name="l00321"></a>00321
  260. <a name="l00322"></a>00322 <span class="comment">// If an entity has been found, transform it into a character.</span>
  261. <a name="l00323"></a>00323 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetEntity( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding );
  262. <a name="l00324"></a>00324
  263. <a name="l00325"></a>00325 <span class="comment">// Get a character, while interpreting entities.</span>
  264. <a name="l00326"></a>00326 <span class="comment">// The length can be from 0 to 4 bytes.</span>
  265. <a name="l00327"></a>00327 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetChar( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, <span class="keywordtype">char</span>* _value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding )
  266. <a name="l00328"></a>00328 {
  267. <a name="l00329"></a>00329 assert( p );
  268. <a name="l00330"></a>00330 <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
  269. <a name="l00331"></a>00331 {
  270. <a name="l00332"></a>00332 *length = utf8ByteTable[ *((<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)p) ];
  271. <a name="l00333"></a>00333 assert( *length &gt;= 0 &amp;&amp; *length &lt; 5 );
  272. <a name="l00334"></a>00334 }
  273. <a name="l00335"></a>00335 <span class="keywordflow">else</span>
  274. <a name="l00336"></a>00336 {
  275. <a name="l00337"></a>00337 *length = 1;
  276. <a name="l00338"></a>00338 }
  277. <a name="l00339"></a>00339
  278. <a name="l00340"></a>00340 <span class="keywordflow">if</span> ( *length == 1 )
  279. <a name="l00341"></a>00341 {
  280. <a name="l00342"></a>00342 <span class="keywordflow">if</span> ( *p == <span class="charliteral">&#39;&amp;&#39;</span> )
  281. <a name="l00343"></a>00343 <span class="keywordflow">return</span> GetEntity( p, _value, length, encoding );
  282. <a name="l00344"></a>00344 *_value = *p;
  283. <a name="l00345"></a>00345 <span class="keywordflow">return</span> p+1;
  284. <a name="l00346"></a>00346 }
  285. <a name="l00347"></a>00347 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( *length )
  286. <a name="l00348"></a>00348 {
  287. <a name="l00349"></a>00349 <span class="comment">//strncpy( _value, p, *length ); // lots of compilers don&#39;t like this function (unsafe),</span>
  288. <a name="l00350"></a>00350 <span class="comment">// and the null terminator isn&#39;t needed</span>
  289. <a name="l00351"></a>00351 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; p[i] &amp;&amp; i&lt;*length; ++i ) {
  290. <a name="l00352"></a>00352 _value[i] = p[i];
  291. <a name="l00353"></a>00353 }
  292. <a name="l00354"></a>00354 <span class="keywordflow">return</span> p + (*length);
  293. <a name="l00355"></a>00355 }
  294. <a name="l00356"></a>00356 <span class="keywordflow">else</span>
  295. <a name="l00357"></a>00357 {
  296. <a name="l00358"></a>00358 <span class="comment">// Not valid text.</span>
  297. <a name="l00359"></a>00359 <span class="keywordflow">return</span> 0;
  298. <a name="l00360"></a>00360 }
  299. <a name="l00361"></a>00361 }
  300. <a name="l00362"></a>00362
  301. <a name="l00363"></a>00363 <span class="comment">// Return true if the next characters in the stream are any of the endTag sequences.</span>
  302. <a name="l00364"></a>00364 <span class="comment">// Ignore case only works for english, and should only be relied on when comparing</span>
  303. <a name="l00365"></a>00365 <span class="comment">// to English words: StringEqual( p, &quot;version&quot;, true ) is fine.</span>
  304. <a name="l00366"></a>00366 <span class="keyword">static</span> <span class="keywordtype">bool</span> StringEqual( <span class="keyword">const</span> <span class="keywordtype">char</span>* p,
  305. <a name="l00367"></a>00367 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,
  306. <a name="l00368"></a>00368 <span class="keywordtype">bool</span> ignoreCase,
  307. <a name="l00369"></a>00369 TiXmlEncoding encoding );
  308. <a name="l00370"></a>00370
  309. <a name="l00371"></a>00371 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* errorString[ TIXML_ERROR_STRING_COUNT ];
  310. <a name="l00372"></a>00372
  311. <a name="l00373"></a>00373 TiXmlCursor location;
  312. <a name="l00374"></a>00374
  313. <a name="l00376"></a><a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c">00376</a> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#ab242c01590191f644569fa89a080d97c" title="Field containing a generic user pointer.">userData</a>;
  314. <a name="l00377"></a>00377
  315. <a name="l00378"></a>00378 <span class="comment">// None of these methods are reliable for any language except English.</span>
  316. <a name="l00379"></a>00379 <span class="comment">// Good for approximation, not great for accuracy.</span>
  317. <a name="l00380"></a>00380 <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlpha( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
  318. <a name="l00381"></a>00381 <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlphaNum( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
  319. <a name="l00382"></a>00382 <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ToLower( <span class="keywordtype">int</span> v, TiXmlEncoding encoding )
  320. <a name="l00383"></a>00383 {
  321. <a name="l00384"></a>00384 <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
  322. <a name="l00385"></a>00385 {
  323. <a name="l00386"></a>00386 <span class="keywordflow">if</span> ( v &lt; 128 ) <span class="keywordflow">return</span> tolower( v );
  324. <a name="l00387"></a>00387 <span class="keywordflow">return</span> v;
  325. <a name="l00388"></a>00388 }
  326. <a name="l00389"></a>00389 <span class="keywordflow">else</span>
  327. <a name="l00390"></a>00390 {
  328. <a name="l00391"></a>00391 <span class="keywordflow">return</span> tolower( v );
  329. <a name="l00392"></a>00392 }
  330. <a name="l00393"></a>00393 }
  331. <a name="l00394"></a>00394 <span class="keyword">static</span> <span class="keywordtype">void</span> ConvertUTF32ToUTF8( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> input, <span class="keywordtype">char</span>* output, <span class="keywordtype">int</span>* length );
  332. <a name="l00395"></a>00395
  333. <a name="l00396"></a>00396 <span class="keyword">private</span>:
  334. <a name="l00397"></a>00397 <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>&amp; ); <span class="comment">// not implemented.</span>
  335. <a name="l00398"></a>00398 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>&amp; base ); <span class="comment">// not allowed.</span>
  336. <a name="l00399"></a>00399
  337. <a name="l00400"></a>00400 <span class="keyword">struct </span>Entity
  338. <a name="l00401"></a>00401 {
  339. <a name="l00402"></a>00402 <span class="keyword">const</span> <span class="keywordtype">char</span>* str;
  340. <a name="l00403"></a>00403 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> strLength;
  341. <a name="l00404"></a>00404 <span class="keywordtype">char</span> chr;
  342. <a name="l00405"></a>00405 };
  343. <a name="l00406"></a>00406 <span class="keyword">enum</span>
  344. <a name="l00407"></a>00407 {
  345. <a name="l00408"></a>00408 NUM_ENTITY = 5,
  346. <a name="l00409"></a>00409 MAX_ENTITY_LENGTH = 6
  347. <a name="l00410"></a>00410
  348. <a name="l00411"></a>00411 };
  349. <a name="l00412"></a>00412 <span class="keyword">static</span> Entity entity[ NUM_ENTITY ];
  350. <a name="l00413"></a>00413 <span class="keyword">static</span> <span class="keywordtype">bool</span> condenseWhiteSpace;
  351. <a name="l00414"></a>00414 };
  352. <a name="l00415"></a>00415
  353. <a name="l00416"></a>00416
  354. <a name="l00423"></a><a class="code" href="classTiXmlNode.html">00423</a> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
  355. <a name="l00424"></a>00424 {
  356. <a name="l00425"></a>00425 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>;
  357. <a name="l00426"></a>00426 <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>;
  358. <a name="l00427"></a>00427
  359. <a name="l00428"></a>00428 <span class="keyword">public</span>:
  360. <a name="l00429"></a>00429 <span class="preprocessor"> #ifdef TIXML_USE_STL </span>
  361. <a name="l00430"></a>00430 <span class="preprocessor"></span>
  362. <a name="l00434"></a>00434 <span class="keyword">friend</span> std::istream&amp; <a class="code" href="classTiXmlNode.html#ab57bd426563c926844f65a78412e18b9" title="An input stream operator, for every class.">operator &gt;&gt; </a>(std::istream&amp; in, <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; base);
  363. <a name="l00435"></a>00435
  364. <a name="l00452"></a>00452 <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7" title="An output stream operator, for every class.">operator&lt;&lt; </a>(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; base);
  365. <a name="l00453"></a>00453
  366. <a name="l00455"></a>00455 <span class="keyword">friend</span> std::string&amp; <a class="code" href="classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7" title="An output stream operator, for every class.">operator&lt;&lt; </a>(std::string&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; base );
  367. <a name="l00456"></a>00456
  368. <a name="l00457"></a>00457 <span class="preprocessor"> #endif</span>
  369. <a name="l00458"></a>00458 <span class="preprocessor"></span>
  370. <a name="l00462"></a><a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2">00462</a> <span class="keyword">enum</span> <a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a>
  371. <a name="l00463"></a>00463 {
  372. <a name="l00464"></a>00464 TINYXML_DOCUMENT,
  373. <a name="l00465"></a>00465 TINYXML_ELEMENT,
  374. <a name="l00466"></a>00466 TINYXML_COMMENT,
  375. <a name="l00467"></a>00467 TINYXML_UNKNOWN,
  376. <a name="l00468"></a>00468 TINYXML_TEXT,
  377. <a name="l00469"></a>00469 TINYXML_DECLARATION,
  378. <a name="l00470"></a>00470 TINYXML_TYPECOUNT
  379. <a name="l00471"></a>00471 };
  380. <a name="l00472"></a>00472
  381. <a name="l00473"></a>00473 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>();
  382. <a name="l00474"></a>00474
  383. <a name="l00487"></a><a class="code" href="classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41">00487</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41" title="The meaning of &amp;#39;value&amp;#39; changes for the specific type of TiXmlNode.">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str (); }
  384. <a name="l00488"></a>00488
  385. <a name="l00489"></a>00489 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  386. <a name="l00490"></a>00490 <span class="preprocessor"></span>
  387. <a name="l00494"></a><a class="code" href="classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5">00494</a> <span class="keyword">const</span> std::string&amp; <a class="code" href="classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5" title="Return Value() as a std::string.">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
  388. <a name="l00495"></a>00495 <span class="preprocessor"> #endif</span>
  389. <a name="l00496"></a>00496 <span class="preprocessor"></span>
  390. <a name="l00497"></a>00497 <span class="keyword">const</span> TIXML_STRING&amp; ValueTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
  391. <a name="l00498"></a>00498
  392. <a name="l00508"></a><a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90">00508</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * _value) { value = _value;}
  393. <a name="l00509"></a>00509
  394. <a name="l00510"></a>00510 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  395. <a name="l00512"></a><a class="code" href="classTiXmlNode.html#a2598d5f448042c1abbeae4503dd45ff2">00512</a> <span class="preprocessor"> void SetValue( const std::string&amp; _value ) { value = _value; }</span>
  396. <a name="l00513"></a>00513 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  397. <a name="l00514"></a>00514 <span class="preprocessor"></span>
  398. <a name="l00516"></a>00516 <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a708e7f953df61d4d2d12f73171550a4b" title="Delete all the children of this node. Does not affect &amp;#39;this&amp;#39;.">Clear</a>();
  399. <a name="l00517"></a>00517
  400. <a name="l00519"></a><a class="code" href="classTiXmlNode.html#ab643043132ffd794f8602685d34a982e">00519</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#ab643043132ffd794f8602685d34a982e" title="One step up the DOM.">Parent</a>() { <span class="keywordflow">return</span> parent; }
  401. <a name="l00520"></a>00520 <span class="keyword">const</span> <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#ab643043132ffd794f8602685d34a982e" title="One step up the DOM.">Parent</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> parent; }
  402. <a name="l00521"></a>00521
  403. <a name="l00522"></a><a class="code" href="classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0">00522</a> <span class="keyword">const</span> <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#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> firstChild; }
  404. <a name="l00523"></a>00523 <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#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>() { <span class="keywordflow">return</span> firstChild; }
  405. <a name="l00524"></a>00524 <span class="keyword">const</span> <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#a44c8eee26bbe2d1b2762038df9dde2f0" title="The first child of this node. Will be null if there are no children.">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
  406. <a name="l00525"></a>00525
  407. <a name="l00526"></a><a class="code" href="classTiXmlNode.html#abc8bf32be6419ec453a731868de19554">00526</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#abc8bf32be6419ec453a731868de19554" title="The first child of this node with the matching &amp;#39;value&amp;#39;. Will be null if none...">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
  408. <a name="l00527"></a>00527 <span class="comment">// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)</span>
  409. <a name="l00528"></a>00528 <span class="comment">// call the method, cast the return back to non-const.</span>
  410. <a name="l00529"></a>00529 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span> ((<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;FirstChild( _value ));
  411. <a name="l00530"></a>00530 }
  412. <a name="l00531"></a>00531 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* LastChild()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> lastChild; }
  413. <a name="l00532"></a><a class="code" href="classTiXmlNode.html#a6432d2b2495f6caf9cb4278df706a031">00532</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#a6432d2b2495f6caf9cb4278df706a031" title="The last child of this node. Will be null if there are no children.">LastChild</a>() { <span class="keywordflow">return</span> lastChild; }
  414. <a name="l00533"></a>00533
  415. <a name="l00534"></a>00534 <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
  416. <a name="l00535"></a><a class="code" href="classTiXmlNode.html#abad5bf1059c48127b958711ef89e8e5d">00535</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#abad5bf1059c48127b958711ef89e8e5d" title="The last child of this node matching &amp;#39;value&amp;#39;. Will be null if there are no...">LastChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
  417. <a name="l00536"></a>00536 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span> ((<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;LastChild( _value ));
  418. <a name="l00537"></a>00537 }
  419. <a name="l00538"></a>00538
  420. <a name="l00539"></a>00539 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  421. <a name="l00540"></a><a class="code" href="classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6">00540</a> <span class="preprocessor"></span> <span class="keyword">const</span> <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#a07f6200a5956c723c5b52d70f29c46f6" title="STL std::string form.">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6" title="STL std::string form.">FirstChild</a> (_value.c_str ()); }
  422. <a name="l00541"></a><a class="code" href="classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6">00541</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#a10d2669ccb5e29e02fcb0e4408685ef6" title="STL std::string form.">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6" title="STL std::string form.">FirstChild</a> (_value.c_str ()); }
  423. <a name="l00542"></a><a class="code" href="classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63">00542</a> <span class="keyword">const</span> <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#a256d0cdbfcfeccae83f3a1c9747a8b63" title="STL std::string form.">LastChild</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63" title="STL std::string form.">LastChild</a> (_value.c_str ()); }
  424. <a name="l00543"></a><a class="code" href="classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3">00543</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#a69772c9202f70553f940b15c06b07be3" title="STL std::string form.">LastChild</a>( <span class="keyword">const</span> std::string&amp; _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3" title="STL std::string form.">LastChild</a> (_value.c_str ()); }
  425. <a name="l00544"></a>00544 <span class="preprocessor"> #endif</span>
  426. <a name="l00545"></a>00545 <span class="preprocessor"></span>
  427. <a name="l00562"></a>00562 <span class="keyword">const</span> <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#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
  428. <a name="l00563"></a>00563 <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#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) {
  429. <a name="l00564"></a>00564 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;IterateChildren( previous ) );
  430. <a name="l00565"></a>00565 }
  431. <a name="l00566"></a>00566
  432. <a name="l00568"></a>00568 <span class="keyword">const</span> <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#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
  433. <a name="l00569"></a>00569 <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#a8621196ba3705fa226bef4a761cc51b6" title="An alternate way to walk the children of a node.">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) {
  434. <a name="l00570"></a>00570 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;IterateChildren( _value, previous ) );
  435. <a name="l00571"></a>00571 }
  436. <a name="l00572"></a>00572
  437. <a name="l00573"></a>00573 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  438. <a name="l00574"></a><a class="code" href="classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df">00574</a> <span class="preprocessor"></span> <span class="keyword">const</span> <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#a1cbaaf8e82c09ad763d52616d75724df" title="STL std::string form.">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df" title="STL std::string form.">IterateChildren</a> (_value.c_str (), previous); }
  439. <a name="l00575"></a><a class="code" href="classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c">00575</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#a16e9ad53e2f5445b14bf325c90aa862c" title="STL std::string form.">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* previous ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c" title="STL std::string form.">IterateChildren</a> (_value.c_str (), previous); }
  440. <a name="l00576"></a>00576 <span class="preprocessor"> #endif</span>
  441. <a name="l00577"></a>00577 <span class="preprocessor"></span>
  442. <a name="l00581"></a>00581 <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#ad7d4630e1a2a916edda16be22448a8ba" title="Add a new node related to this.">InsertEndChild</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; addThis );
  443. <a name="l00582"></a>00582
  444. <a name="l00583"></a>00583
  445. <a name="l00593"></a>00593 <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#a5d29442ae46de6d0168429156197bfc6" title="Add a new node related to this.">LinkEndChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* addThis );
  446. <a name="l00594"></a>00594
  447. <a name="l00598"></a>00598 <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#a0c146fa2fff0157b681594102f48cbc7" title="Add a new node related to this.">InsertBeforeChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* beforeThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; addThis );
  448. <a name="l00599"></a>00599
  449. <a name="l00603"></a>00603 <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#ad9b75e54ec19301c8b4d5ff583d0b3d5" title="Add a new node related to this.">InsertAfterChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* afterThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; addThis );
  450. <a name="l00604"></a>00604
  451. <a name="l00608"></a>00608 <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#a0c49e739a17b9938050c22cd89617fbd" title="Replace a child of this node.">ReplaceChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* replaceThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; withThis );
  452. <a name="l00609"></a>00609
  453. <a name="l00611"></a>00611 <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#ae19d8510efc90596552f4feeac9a8fbf" title="Delete a child of this node.">RemoveChild</a>( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* removeThis );
  454. <a name="l00612"></a>00612
  455. <a name="l00614"></a><a class="code" href="classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10">00614</a> <span class="keyword">const</span> <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#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> prev; }
  456. <a name="l00615"></a>00615 <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#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>() { <span class="keywordflow">return</span> prev; }
  457. <a name="l00616"></a>00616
  458. <a name="l00618"></a>00618 <span class="keyword">const</span> <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#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
  459. <a name="l00619"></a>00619 <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#ac2cd892768726270e511b2ab32de4d10" title="Navigate to a sibling node.">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_prev ) {
  460. <a name="l00620"></a>00620 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;PreviousSibling( _prev ) );
  461. <a name="l00621"></a>00621 }
  462. <a name="l00622"></a>00622
  463. <a name="l00623"></a>00623 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  464. <a name="l00624"></a><a class="code" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab">00624</a> <span class="preprocessor"></span> <span class="keyword">const</span> <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#a658276f57d35d5d4256d1dc1a2c398ab" title="STL std::string form.">PreviousSibling</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab" title="STL std::string form.">PreviousSibling</a> (_value.c_str ()); }
  465. <a name="l00625"></a><a class="code" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912">00625</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#acc8a0434c7f401d4a3b6dee77c1a5912" title="STL std::string form.">PreviousSibling</a>( <span class="keyword">const</span> std::string&amp; _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912" title="STL std::string form.">PreviousSibling</a> (_value.c_str ()); }
  466. <a name="l00626"></a><a class="code" href="classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9">00626</a> <span class="keyword">const</span> <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#a1b94d2f7fa7ab25a5a8e8d4340c449c9" title="STL std::string form.">NextSibling</a>( <span class="keyword">const</span> std::string&amp; _value)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9" title="STL std::string form.">NextSibling</a> (_value.c_str ()); }
  467. <a name="l00627"></a><a class="code" href="classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea">00627</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#a1757c1f4d01e8c9596ffdbd561c76aea" title="STL std::string form.">NextSibling</a>( <span class="keyword">const</span> std::string&amp; _value) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea" title="STL std::string form.">NextSibling</a> (_value.c_str ()); }
  468. <a name="l00628"></a>00628 <span class="preprocessor"> #endif</span>
  469. <a name="l00629"></a>00629 <span class="preprocessor"></span>
  470. <a name="l00631"></a><a class="code" href="classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e">00631</a> <span class="keyword">const</span> <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#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> next; }
  471. <a name="l00632"></a>00632 <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#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>() { <span class="keywordflow">return</span> next; }
  472. <a name="l00633"></a>00633
  473. <a name="l00635"></a>00635 <span class="keyword">const</span> <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#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
  474. <a name="l00636"></a>00636 <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#af854baeba384f5fe9859f5aee03b548e" title="Navigate to a sibling node.">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _next ) {
  475. <a name="l00637"></a>00637 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;NextSibling( _next ) );
  476. <a name="l00638"></a>00638 }
  477. <a name="l00639"></a>00639
  478. <a name="l00644"></a>00644 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>() <span class="keyword">const</span>;
  479. <a name="l00645"></a>00645 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>() {
  480. <a name="l00646"></a>00646 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;NextSiblingElement() );
  481. <a name="l00647"></a>00647 }
  482. <a name="l00648"></a>00648
  483. <a name="l00653"></a>00653 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
  484. <a name="l00654"></a>00654 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1" title="Convenience function to get through elements.">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_next ) {
  485. <a name="l00655"></a>00655 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;NextSiblingElement( _next ) );
  486. <a name="l00656"></a>00656 }
  487. <a name="l00657"></a>00657
  488. <a name="l00658"></a>00658 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  489. <a name="l00659"></a><a class="code" href="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463">00659</a> <span class="preprocessor"></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="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463" title="STL std::string form.">NextSiblingElement</a>( <span class="keyword">const</span> std::string&amp; _value)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463" title="STL std::string form.">NextSiblingElement</a> (_value.c_str ()); }
  490. <a name="l00660"></a><a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081">00660</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081" title="STL std::string form.">NextSiblingElement</a>( <span class="keyword">const</span> std::string&amp; _value) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081" title="STL std::string form.">NextSiblingElement</a> (_value.c_str ()); }
  491. <a name="l00661"></a>00661 <span class="preprocessor"> #endif</span>
  492. <a name="l00662"></a>00662 <span class="preprocessor"></span>
  493. <a name="l00664"></a>00664 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>() <span class="keyword">const</span>;
  494. <a name="l00665"></a>00665 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>() {
  495. <a name="l00666"></a>00666 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;FirstChildElement() );
  496. <a name="l00667"></a>00667 }
  497. <a name="l00668"></a>00668
  498. <a name="l00670"></a>00670 <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) <span class="keyword">const</span>;
  499. <a name="l00671"></a>00671 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba" title="Convenience function to get through elements.">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
  500. <a name="l00672"></a>00672 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;FirstChildElement( _value ) );
  501. <a name="l00673"></a>00673 }
  502. <a name="l00674"></a>00674
  503. <a name="l00675"></a>00675 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  504. <a name="l00676"></a><a class="code" href="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7">00676</a> <span class="preprocessor"></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="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7" title="STL std::string form.">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7" title="STL std::string form.">FirstChildElement</a> (_value.c_str ()); }
  505. <a name="l00677"></a><a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45">00677</a> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45" title="STL std::string form.">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value ) { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45" title="STL std::string form.">FirstChildElement</a> (_value.c_str ()); }
  506. <a name="l00678"></a>00678 <span class="preprocessor"> #endif</span>
  507. <a name="l00679"></a>00679 <span class="preprocessor"></span>
  508. <a name="l00684"></a><a class="code" href="classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e">00684</a> <span class="keywordtype">int</span> <a class="code" href="classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e" title="Query the type (as an enumerated value, above) of this node.">Type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> type; }
  509. <a name="l00685"></a>00685
  510. <a name="l00689"></a>00689 <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3" title="Return a pointer to the Document this node lives in.">GetDocument</a>() <span class="keyword">const</span>;
  511. <a name="l00690"></a>00690 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3" title="Return a pointer to the Document this node lives in.">GetDocument</a>() {
  512. <a name="l00691"></a>00691 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;GetDocument() );
  513. <a name="l00692"></a>00692 }
  514. <a name="l00693"></a>00693
  515. <a name="l00695"></a><a class="code" href="classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3">00695</a> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3" title="Returns true if this node has no children.">NoChildren</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !firstChild; }
  516. <a name="l00696"></a>00696
  517. <a name="l00697"></a><a class="code" href="classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08">00697</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="classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08" title="Cast to a more defined type. Will return null if not of the requested type.">ToDocument</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  518. <a name="l00698"></a><a class="code" href="classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c">00698</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="classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c" title="Cast to a more defined type. Will return null if not of the requested type.">ToElement</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  519. <a name="l00699"></a><a class="code" href="classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574">00699</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="classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574" title="Cast to a more defined type. Will return null if not of the requested type.">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  520. <a name="l00700"></a><a class="code" href="classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2">00700</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2" title="Cast to a more defined type. Will return null if not of the requested type.">ToUnknown</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  521. <a name="l00701"></a><a class="code" href="classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69">00701</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="classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69" title="Cast to a more defined type. Will return null if not of the requested type.">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  522. <a name="l00702"></a><a class="code" href="classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72">00702</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="classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72" title="Cast to a more defined type. Will return null if not of the requested type.">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; }
  523. <a name="l00703"></a>00703
  524. <a name="l00704"></a><a class="code" href="classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae">00704</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae" title="Cast to a more defined type. Will return null if not of the requested type.">ToDocument</a>() { <span class="keywordflow">return</span> 0; }
  525. <a name="l00705"></a><a class="code" href="classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc">00705</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="classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc" title="Cast to a more defined type. Will return null if not of the requested type.">ToElement</a>() { <span class="keywordflow">return</span> 0; }
  526. <a name="l00706"></a><a class="code" href="classTiXmlNode.html#a383e06a0787f7063953934867990f849">00706</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>* <a class="code" href="classTiXmlNode.html#a383e06a0787f7063953934867990f849" title="Cast to a more defined type. Will return null if not of the requested type.">ToComment</a>() { <span class="keywordflow">return</span> 0; }
  527. <a name="l00707"></a><a class="code" href="classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d">00707</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* <a class="code" href="classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d" title="Cast to a more defined type. Will return null if not of the requested type.">ToUnknown</a>() { <span class="keywordflow">return</span> 0; }
  528. <a name="l00708"></a><a class="code" href="classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03">00708</a> <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>* <a class="code" href="classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03" title="Cast to a more defined type. Will return null if not of the requested type.">ToText</a>() { <span class="keywordflow">return</span> 0; }
  529. <a name="l00709"></a><a class="code" href="classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df">00709</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="classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df" title="Cast to a more defined type. Will return null if not of the requested type.">ToDeclaration</a>() { <span class="keywordflow">return</span> 0; }
  530. <a name="l00710"></a>00710
  531. <a name="l00714"></a>00714 <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="classTiXmlNode.html#a4508cc3a2d7a98e96a54cc09c37a78a4" title="Create an exact duplicate of this node and return it.">Clone</a>() <span class="keyword">const</span> = 0;
  532. <a name="l00715"></a>00715
  533. <a name="l00738"></a>00738 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#acc0f88b7462c6cb73809d410a4f5bb86" title="Accept a hierchical visit the nodes in the TinyXML DOM.">Accept</a>( <a class="code" href="classTiXmlVisitor.html" title="Implements the interface to the &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span> = 0;
  534. <a name="l00739"></a>00739
  535. <a name="l00740"></a>00740 <span class="keyword">protected</span>:
  536. <a name="l00741"></a>00741 <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#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a> _type );
  537. <a name="l00742"></a>00742
  538. <a name="l00743"></a>00743 <span class="comment">// Copy to the allocated object. Shared functionality between Clone, Copy constructor,</span>
  539. <a name="l00744"></a>00744 <span class="comment">// and the assignment operator.</span>
  540. <a name="l00745"></a>00745 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* target ) <span class="keyword">const</span>;
  541. <a name="l00746"></a>00746
  542. <a name="l00747"></a>00747 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  543. <a name="l00748"></a>00748 <span class="preprocessor"></span> <span class="comment">// The real work of the input operator.</span>
  544. <a name="l00749"></a>00749 <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
  545. <a name="l00750"></a>00750 <span class="preprocessor"> #endif</span>
  546. <a name="l00751"></a>00751 <span class="preprocessor"></span>
  547. <a name="l00752"></a>00752 <span class="comment">// Figure out what is at *p, and parse it. Returns null if it is not an xml node.</span>
  548. <a name="l00753"></a>00753 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* Identify( <span class="keyword">const</span> <span class="keywordtype">char</span>* start, TiXmlEncoding encoding );
  549. <a name="l00754"></a>00754
  550. <a name="l00755"></a>00755 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* parent;
  551. <a name="l00756"></a>00756 <a class="code" href="classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2" title="The types of XML nodes supported by TinyXml.">NodeType</a> type;
  552. <a name="l00757"></a>00757
  553. <a name="l00758"></a>00758 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* firstChild;
  554. <a name="l00759"></a>00759 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* lastChild;
  555. <a name="l00760"></a>00760
  556. <a name="l00761"></a>00761 TIXML_STRING value;
  557. <a name="l00762"></a>00762
  558. <a name="l00763"></a>00763 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* prev;
  559. <a name="l00764"></a>00764 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>* next;
  560. <a name="l00765"></a>00765
  561. <a name="l00766"></a>00766 <span class="keyword">private</span>:
  562. <a name="l00767"></a>00767 <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; ); <span class="comment">// not implemented.</span>
  563. <a name="l00768"></a>00768 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html" title="The parent class for everything in the Document Object Model.">TiXmlNode</a>&amp; base ); <span class="comment">// not allowed.</span>
  564. <a name="l00769"></a>00769 };
  565. <a name="l00770"></a>00770
  566. <a name="l00771"></a>00771
  567. <a name="l00779"></a><a class="code" href="classTiXmlAttribute.html">00779</a> <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>
  568. <a name="l00780"></a>00780 {
  569. <a name="l00781"></a>00781 <span class="keyword">friend</span> <span class="keyword">class </span>TiXmlAttributeSet;
  570. <a name="l00782"></a>00782
  571. <a name="l00783"></a>00783 <span class="keyword">public</span>:
  572. <a name="l00785"></a><a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1">00785</a> <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>() : <a class="code" href="classTiXmlBase.html" title="TiXmlBase is a base class for every class in TinyXml.">TiXmlBase</a>()
  573. <a name="l00786"></a>00786 {
  574. <a name="l00787"></a>00787 document = 0;
  575. <a name="l00788"></a>00788 prev = next = 0;
  576. <a name="l00789"></a>00789 }
  577. <a name="l00790"></a>00790
  578. <a name="l00791"></a>00791 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  579. <a name="l00793"></a><a class="code" href="classTiXmlAttribute.html#a052213522caac3979960e0714063861d">00793</a> <span class="preprocessor"> TiXmlAttribute( const std::string&amp; _name, const std::string&amp; _value )</span>
  580. <a name="l00794"></a>00794 <span class="preprocessor"></span> {
  581. <a name="l00795"></a>00795 name = _name;
  582. <a name="l00796"></a>00796 value = _value;
  583. <a name="l00797"></a>00797 document = 0;
  584. <a name="l00798"></a>00798 prev = next = 0;
  585. <a name="l00799"></a>00799 }
  586. <a name="l00800"></a>00800 <span class="preprocessor"> #endif</span>
  587. <a name="l00801"></a>00801 <span class="preprocessor"></span>
  588. <a name="l00803"></a><a class="code" href="classTiXmlAttribute.html#a759d0b76fb8fcf765ecab243bc14f05e">00803</a> <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value )
  589. <a name="l00804"></a>00804 {
  590. <a name="l00805"></a>00805 name = _name;
  591. <a name="l00806"></a>00806 value = _value;
  592. <a name="l00807"></a>00807 document = 0;
  593. <a name="l00808"></a>00808 prev = next = 0;
  594. <a name="l00809"></a>00809 }
  595. <a name="l00810"></a>00810
  596. <a name="l00811"></a><a class="code" href="classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d">00811</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d" title="Return the name of this attribute.">Name</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name.c_str(); }
  597. <a name="l00812"></a><a class="code" href="classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3">00812</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3" title="Return the value of this attribute.">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str(); }
  598. <a name="l00813"></a>00813 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  599. <a name="l00814"></a><a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33">00814</a> <span class="preprocessor"></span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
  600. <a name="l00815"></a>00815 <span class="preprocessor"> #endif</span>
  601. <a name="l00816"></a>00816 <span class="preprocessor"></span> <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#aa1a20ad59dc7e89a0ab265396360d50f" title="Return the value of this attribute, converted to an integer.">IntValue</a>() <span class="keyword">const</span>;
  602. <a name="l00817"></a>00817 <span class="keywordtype">double</span> <a class="code" href="classTiXmlAttribute.html#a2880ddef53fc7522c99535273954d230" title="Return the value of this attribute, converted to a double.">DoubleValue</a>() <span class="keyword">const</span>;
  603. <a name="l00818"></a>00818
  604. <a name="l00819"></a>00819 <span class="comment">// Get the tinyxml string representation</span>
  605. <a name="l00820"></a>00820 <span class="keyword">const</span> TIXML_STRING&amp; NameTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name; }
  606. <a name="l00821"></a>00821
  607. <a name="l00831"></a>00831 <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#ad6c93088ee21af41a107931223339344" title="QueryIntValue examines the value string.">QueryIntValue</a>( <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
  608. <a name="l00833"></a>00833 <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#ac87b2a8489906a5d7aa2875f20be3513" title="QueryDoubleValue examines the value string. See QueryIntValue().">QueryDoubleValue</a>( <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
  609. <a name="l00834"></a>00834
  610. <a name="l00835"></a><a class="code" href="classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99">00835</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99" title="Set the name of this attribute.">SetName</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) { name = _name; }
  611. <a name="l00836"></a><a class="code" href="classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0">00836</a> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0" title="Set the value.">SetValue</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) { value = _value; }
  612. <a name="l00837"></a>00837
  613. <a name="l00838"></a>00838 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a7e065df640116a62ea4f4b7da5449cc8" title="Set the value from an integer.">SetIntValue</a>( <span class="keywordtype">int</span> _value );
  614. <a name="l00839"></a>00839 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a0316da31373496c4368ad549bf711394" title="Set the value from a double.">SetDoubleValue</a>( <span class="keywordtype">double</span> _value );
  615. <a name="l00840"></a>00840
  616. <a name="l00841"></a>00841 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  617. <a name="l00843"></a><a class="code" href="classTiXmlAttribute.html#ab296ff0c9a8c701055cd257a8a976e57">00843</a> <span class="preprocessor"> void SetName( const std::string&amp; _name ) { name = _name; } </span>
  618. <a name="l00845"></a><a class="code" href="classTiXmlAttribute.html#ab43f67a0cc3ec1d80e62606500f0925f">00845</a> <span class="preprocessor"> void SetValue( const std::string&amp; _value ) { value = _value; }</span>
  619. <a name="l00846"></a>00846 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  620. <a name="l00847"></a>00847 <span class="preprocessor"></span>
  621. <a name="l00849"></a>00849 <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="classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67" title="Get the next sibling attribute in the DOM. Returns null at end.">Next</a>() <span class="keyword">const</span>;
  622. <a name="l00850"></a>00850 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67" title="Get the next sibling attribute in the DOM. Returns null at end.">Next</a>() {
  623. <a name="l00851"></a>00851 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;Next() );
  624. <a name="l00852"></a>00852 }
  625. <a name="l00853"></a>00853
  626. <a name="l00855"></a>00855 <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="classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf" title="Get the previous sibling attribute in the DOM. Returns null at beginning.">Previous</a>() <span class="keyword">const</span>;
  627. <a name="l00856"></a>00856 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf" title="Get the previous sibling attribute in the DOM. Returns null at beginning.">Previous</a>() {
  628. <a name="l00857"></a>00857 <span class="keywordflow">return</span> <span class="keyword">const_cast&lt;</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">&gt;</span>( (<span class="keyword">const_cast&lt;</span> <span class="keyword">const </span><a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* <span class="keyword">&gt;</span>(<span class="keyword">this</span>))-&gt;Previous() );
  629. <a name="l00858"></a>00858 }
  630. <a name="l00859"></a>00859
  631. <a name="l00860"></a>00860 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>&amp; rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rhs.name == name; }
  632. <a name="l00861"></a>00861 <span class="keywordtype">bool</span> operator&lt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>&amp; rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name &lt; rhs.name; }
  633. <a name="l00862"></a>00862 <span class="keywordtype">bool</span> operator&gt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>&amp; rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name &gt; rhs.name; }
  634. <a name="l00863"></a>00863
  635. <a name="l00864"></a>00864 <span class="comment">/* Attribute parsing starts: first letter of the name</span>
  636. <a name="l00865"></a>00865 <span class="comment"> returns: the next char after the value end quote</span>
  637. <a name="l00866"></a>00866 <span class="comment"> */</span>
  638. <a name="l00867"></a>00867 <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 );
  639. <a name="l00868"></a>00868
  640. <a name="l00869"></a>00869 <span class="comment">// Prints this Attribute to a FILE stream.</span>
  641. <a name="l00870"></a><a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a">00870</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" 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>{
  642. <a name="l00871"></a>00871 <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" title="All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...">Print</a>( cfile, depth, 0 );
  643. <a name="l00872"></a>00872 }
  644. <a name="l00873"></a>00873 <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a" 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, TIXML_STRING* str ) <span class="keyword">const</span>;
  645. <a name="l00874"></a>00874
  646. <a name="l00875"></a>00875 <span class="comment">// [internal use]</span>
  647. <a name="l00876"></a>00876 <span class="comment">// Set the document pointer so the attribute can report errors.</span>
  648. <a name="l00877"></a>00877 <span class="keywordtype">void</span> SetDocument( <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* doc ) { document = doc; }
  649. <a name="l00878"></a>00878
  650. <a name="l00879"></a>00879 <span class="keyword">private</span>:
  651. <a name="l00880"></a>00880 <a class="code" href="classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1" title="Construct an empty attribute.">TiXmlAttribute</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>&amp; ); <span class="comment">// not implemented.</span>
  652. <a name="l00881"></a>00881 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>&amp; base ); <span class="comment">// not allowed.</span>
  653. <a name="l00882"></a>00882
  654. <a name="l00883"></a>00883 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>* document; <span class="comment">// A pointer back to a document, for error reporting.</span>
  655. <a name="l00884"></a>00884 TIXML_STRING name;
  656. <a name="l00885"></a>00885 TIXML_STRING value;
  657. <a name="l00886"></a>00886 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* prev;
  658. <a name="l00887"></a>00887 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* next;
  659. <a name="l00888"></a>00888 };
  660. <a name="l00889"></a>00889
  661. <a name="l00890"></a>00890
  662. <a name="l00891"></a>00891 <span class="comment">/* A class used to manage a group of attributes.</span>
  663. <a name="l00892"></a>00892 <span class="comment"> It is only used internally, both by the ELEMENT and the DECLARATION.</span>
  664. <a name="l00893"></a>00893 <span class="comment"> </span>
  665. <a name="l00894"></a>00894 <span class="comment"> The set can be changed transparent to the Element and Declaration</span>
  666. <a name="l00895"></a>00895 <span class="comment"> classes that use it, but NOT transparent to the Attribute</span>
  667. <a name="l00896"></a>00896 <span class="comment"> which has to implement a next() and previous() method. Which makes</span>
  668. <a name="l00897"></a>00897 <span class="comment"> it a bit problematic and prevents the use of STL.</span>
  669. <a name="l00898"></a>00898 <span class="comment"></span>
  670. <a name="l00899"></a>00899 <span class="comment"> This version is implemented with circular lists because:</span>
  671. <a name="l00900"></a>00900 <span class="comment"> - I like circular lists</span>
  672. <a name="l00901"></a>00901 <span class="comment"> - it demonstrates some independence from the (typical) doubly linked list.</span>
  673. <a name="l00902"></a>00902 <span class="comment">*/</span>
  674. <a name="l00903"></a>00903 <span class="keyword">class </span>TiXmlAttributeSet
  675. <a name="l00904"></a>00904 {
  676. <a name="l00905"></a>00905 <span class="keyword">public</span>:
  677. <a name="l00906"></a>00906 TiXmlAttributeSet();
  678. <a name="l00907"></a>00907 ~TiXmlAttributeSet();
  679. <a name="l00908"></a>00908
  680. <a name="l00909"></a>00909 <span class="keywordtype">void</span> Add( <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* attribute );
  681. <a name="l00910"></a>00910 <span class="keywordtype">void</span> Remove( <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* attribute );
  682. <a name="l00911"></a>00911
  683. <a name="l00912"></a>00912 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* First()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
  684. <a name="l00913"></a>00913 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* First() { <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
  685. <a name="l00914"></a>00914 <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Last()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
  686. <a name="l00915"></a>00915 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Last() { <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
  687. <a name="l00916"></a>00916
  688. <a name="l00917"></a>00917 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Find( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) <span class="keyword">const</span>;
  689. <a name="l00918"></a>00918 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FindOrCreate( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name );
  690. <a name="l00919"></a>00919
  691. <a name="l00920"></a>00920 <span class="preprocessor"># ifdef TIXML_USE_STL</span>
  692. <a name="l00921"></a>00921 <span class="preprocessor"></span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* Find( <span class="keyword">const</span> std::string&amp; _name ) <span class="keyword">const</span>;
  693. <a name="l00922"></a>00922 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* FindOrCreate( <span class="keyword">const</span> std::string&amp; _name );
  694. <a name="l00923"></a>00923 <span class="preprocessor"># endif</span>
  695. <a name="l00924"></a>00924 <span class="preprocessor"></span>
  696. <a name="l00925"></a>00925
  697. <a name="l00926"></a>00926 <span class="keyword">private</span>:
  698. <a name="l00927"></a>00927 <span class="comment">//*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),</span>
  699. <a name="l00928"></a>00928 <span class="comment">//*ME: this class must be also use a hidden/disabled copy-constructor !!!</span>
  700. <a name="l00929"></a>00929 TiXmlAttributeSet( <span class="keyword">const</span> TiXmlAttributeSet&amp; ); <span class="comment">// not allowed</span>
  701. <a name="l00930"></a>00930 <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> TiXmlAttributeSet&amp; ); <span class="comment">// not allowed (as TiXmlAttribute)</span>
  702. <a name="l00931"></a>00931
  703. <a name="l00932"></a>00932 <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a> sentinel;
  704. <a name="l00933"></a>00933 };
  705. <a name="l00934"></a>00934
  706. <a name="l00935"></a>00935
  707. <a name="l00940"></a><a class="code" href="classTiXmlElement.html">00940</a> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</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>
  708. <a name="l00941"></a>00941 {
  709. <a name="l00942"></a>00942 <span class="keyword">public</span>:
  710. <a name="l00944"></a>00944 <a class="code" href="classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60" title="Construct an element.">TiXmlElement</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * in_value);
  711. <a name="l00945"></a>00945
  712. <a name="l00946"></a>00946 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  713. <a name="l00948"></a>00948 <span class="preprocessor"> TiXmlElement( const std::string&amp; _value );</span>
  714. <a name="l00949"></a>00949 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  715. <a name="l00950"></a>00950 <span class="preprocessor"></span>
  716. <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>&amp; );
  717. <a name="l00952"></a>00952
  718. <a name="l00953"></a>00953 <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>&amp; operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html" title="The element is a container class.">TiXmlElement</a>&amp; base );
  719. <a name="l00954"></a>00954
  720. <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>();
  721. <a name="l00956"></a>00956
  722. <a name="l00960"></a>00960 <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="keyword">const</span>;
  723. <a name="l00961"></a>00961
  724. <a name="l00968"></a>00968 <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">int</span>* i ) <span class="keyword">const</span>;
  725. <a name="l00969"></a>00969
  726. <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>;
  727. <a name="l00977"></a>00977
  728. <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>;
  729. <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>;
  730. <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>;
  731. <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>;
  732. <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>{
  733. <a name="l00997"></a>00997 <span class="keywordtype">double</span> d;
  734. <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, &amp;d );
  735. <a name="l00999"></a>00999 <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) {
  736. <a name="l01000"></a>01000 *_value = (float)d;
  737. <a name="l01001"></a>01001 }
  738. <a name="l01002"></a>01002 <span class="keywordflow">return</span> result;
  739. <a name="l01003"></a>01003 }
  740. <a name="l01004"></a>01004
  741. <a name="l01005"></a>01005 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  742. <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>
  743. <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 );
  744. <a name="l01009"></a>01009 <span class="keywordflow">if</span> ( cstr ) {
  745. <a name="l01010"></a>01010 *_value = std::string( cstr );
  746. <a name="l01011"></a>01011 <span class="keywordflow">return</span> TIXML_SUCCESS;
  747. <a name="l01012"></a>01012 }
  748. <a name="l01013"></a>01013 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
  749. <a name="l01014"></a>01014 }
  750. <a name="l01015"></a>01015
  751. <a name="l01024"></a><a class="code" href="classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576">01024</a> <span class="keyword">template</span>&lt; <span class="keyword">typename</span> T &gt; <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string&amp; name, T* outValue )<span class="keyword"> const</span>
  752. <a name="l01025"></a>01025 <span class="keyword"> </span>{
  753. <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 );
  754. <a name="l01027"></a>01027 <span class="keywordflow">if</span> ( !node )
  755. <a name="l01028"></a>01028 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
  756. <a name="l01029"></a>01029
  757. <a name="l01030"></a>01030 std::stringstream sstream( node-&gt;<a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>() );
  758. <a name="l01031"></a>01031 sstream &gt;&gt; *outValue;
  759. <a name="l01032"></a>01032 <span class="keywordflow">if</span> ( !sstream.fail() )
  760. <a name="l01033"></a>01033 <span class="keywordflow">return</span> TIXML_SUCCESS;
  761. <a name="l01034"></a>01034 <span class="keywordflow">return</span> TIXML_WRONG_TYPE;
  762. <a name="l01035"></a>01035 }
  763. <a name="l01036"></a>01036
  764. <a name="l01037"></a>01037 <span class="keywordtype">int</span> QueryValueAttribute( <span class="keyword">const</span> std::string&amp; name, std::string* outValue )<span class="keyword"> const</span>
  765. <a name="l01038"></a>01038 <span class="keyword"> </span>{
  766. <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 );
  767. <a name="l01040"></a>01040 <span class="keywordflow">if</span> ( !node )
  768. <a name="l01041"></a>01041 <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
  769. <a name="l01042"></a>01042 *outValue = node-&gt;<a class="code" href="classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33" title="Return the value of this attribute.">ValueStr</a>();
  770. <a name="l01043"></a>01043 <span class="keywordflow">return</span> TIXML_SUCCESS;
  771. <a name="l01044"></a>01044 }
  772. <a name="l01045"></a>01045 <span class="preprocessor"> #endif</span>
  773. <a name="l01046"></a>01046 <span class="preprocessor"></span>
  774. <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 );
  775. <a name="l01051"></a>01051
  776. <a name="l01052"></a>01052 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  777. <a name="l01053"></a>01053 <span class="preprocessor"></span> <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string&amp; name ) <span class="keyword">const</span>;
  778. <a name="l01054"></a>01054 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
  779. <a name="l01055"></a>01055 <span class="keyword">const</span> std::string* Attribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
  780. <a name="l01056"></a>01056 <span class="keywordtype">int</span> QueryIntAttribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
  781. <a name="l01057"></a>01057 <span class="keywordtype">int</span> QueryDoubleAttribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
  782. <a name="l01058"></a>01058
  783. <a name="l01060"></a>01060 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::string&amp; _value );
  784. <a name="l01062"></a>01062 <span class="keywordtype">void</span> SetAttribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span> _value );
  785. <a name="l01064"></a>01064 <span class="keywordtype">void</span> SetDoubleAttribute( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span> value );
  786. <a name="l01065"></a>01065 <span class="preprocessor"> #endif</span>
  787. <a name="l01066"></a>01066 <span class="preprocessor"></span>
  788. <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 );
  789. <a name="l01071"></a>01071
  790. <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 );
  791. <a name="l01076"></a>01076
  792. <a name="l01079"></a>01079 <span class="keywordtype">void</span> RemoveAttribute( <span class="keyword">const</span> <span class="keywordtype">char</span> * name );
  793. <a name="l01080"></a>01080 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  794. <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&amp; name ) { <a class="code" href="classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a" title="STL std::string form.">RemoveAttribute</a> (name.c_str ()); }
  795. <a name="l01082"></a>01082 <span class="preprocessor"> #endif</span>
  796. <a name="l01083"></a>01083 <span class="preprocessor"></span>
  797. <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(); }
  798. <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(); }
  799. <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(); }
  800. <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(); }
  801. <a name="l01088"></a>01088
  802. <a name="l01121"></a>01121 <span class="keyword">const</span> <span class="keywordtype">char</span>* GetText() <span class="keyword">const</span>;
  803. <a name="l01122"></a>01122
  804. <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>;
  805. <a name="l01125"></a>01125 <span class="comment">// Print the Element to a FILE stream.</span>
  806. <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>;
  807. <a name="l01127"></a>01127
  808. <a name="l01128"></a>01128 <span class="comment">/* Attribtue parsing starts: next char past &#39;&lt;&#39;</span>
  809. <a name="l01129"></a>01129 <span class="comment"> returns: next char past &#39;&gt;&#39;</span>
  810. <a name="l01130"></a>01130 <span class="comment"> */</span>
  811. <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 );
  812. <a name="l01132"></a>01132
  813. <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>; }
  814. <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>; }
  815. <a name="l01135"></a>01135
  816. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
  817. <a name="l01139"></a>01139
  818. <a name="l01140"></a>01140 <span class="keyword">protected</span>:
  819. <a name="l01141"></a>01141
  820. <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>;
  821. <a name="l01143"></a>01143 <span class="keywordtype">void</span> ClearThis(); <span class="comment">// like clear, but initializes &#39;this&#39; object as well</span>
  822. <a name="l01144"></a>01144
  823. <a name="l01145"></a>01145 <span class="comment">// Used to be public [internal use]</span>
  824. <a name="l01146"></a>01146 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  825. <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 );
  826. <a name="l01148"></a>01148 <span class="preprocessor"> #endif</span>
  827. <a name="l01149"></a>01149 <span class="preprocessor"></span> <span class="comment">/* [internal use]</span>
  828. <a name="l01150"></a>01150 <span class="comment"> Reads the &quot;value&quot; of the element -- another element, or text.</span>
  829. <a name="l01151"></a>01151 <span class="comment"> This should terminate with the current end tag.</span>
  830. <a name="l01152"></a>01152 <span class="comment"> */</span>
  831. <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 );
  832. <a name="l01154"></a>01154
  833. <a name="l01155"></a>01155 <span class="keyword">private</span>:
  834. <a name="l01156"></a>01156 TiXmlAttributeSet attributeSet;
  835. <a name="l01157"></a>01157 };
  836. <a name="l01158"></a>01158
  837. <a name="l01159"></a>01159
  838. <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>
  839. <a name="l01163"></a>01163 {
  840. <a name="l01164"></a>01164 <span class="keyword">public</span>:
  841. <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 ) {}
  842. <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 ) {
  843. <a name="l01169"></a>01169 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( _value );
  844. <a name="l01170"></a>01170 }
  845. <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>&amp; );
  846. <a name="l01172"></a>01172 <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>&amp; operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>&amp; base );
  847. <a name="l01173"></a>01173
  848. <a name="l01174"></a>01174 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html" title="An XML comment.">TiXmlComment</a>() {}
  849. <a name="l01175"></a>01175
  850. <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>;
  851. <a name="l01178"></a>01178 <span class="comment">// Write this Comment to a FILE stream.</span>
  852. <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>;
  853. <a name="l01180"></a>01180
  854. <a name="l01181"></a>01181 <span class="comment">/* Attribtue parsing starts: at the ! of the !--</span>
  855. <a name="l01182"></a>01182 <span class="comment"> returns: next char past &#39;&gt;&#39;</span>
  856. <a name="l01183"></a>01183 <span class="comment"> */</span>
  857. <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 );
  858. <a name="l01185"></a>01185
  859. <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>; }
  860. <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>; }
  861. <a name="l01188"></a>01188
  862. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
  863. <a name="l01192"></a>01192
  864. <a name="l01193"></a>01193 <span class="keyword">protected</span>:
  865. <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>;
  866. <a name="l01195"></a>01195
  867. <a name="l01196"></a>01196 <span class="comment">// used to be public</span>
  868. <a name="l01197"></a>01197 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  869. <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 );
  870. <a name="l01199"></a>01199 <span class="preprocessor"> #endif</span>
  871. <a name="l01200"></a>01200 <span class="preprocessor"></span><span class="comment">// virtual void StreamOut( TIXML_OSTREAM * out ) const;</span>
  872. <a name="l01201"></a>01201
  873. <a name="l01202"></a>01202 <span class="keyword">private</span>:
  874. <a name="l01203"></a>01203
  875. <a name="l01204"></a>01204 };
  876. <a name="l01205"></a>01205
  877. <a name="l01206"></a>01206
  878. <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>
  879. <a name="l01213"></a>01213 {
  880. <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>;
  881. <a name="l01215"></a>01215 <span class="keyword">public</span>:
  882. <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)
  883. <a name="l01221"></a>01221 {
  884. <a name="l01222"></a>01222 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue );
  885. <a name="l01223"></a>01223 cdata = <span class="keyword">false</span>;
  886. <a name="l01224"></a>01224 }
  887. <a name="l01225"></a>01225 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>() {}
  888. <a name="l01226"></a>01226
  889. <a name="l01227"></a>01227 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  890. <a name="l01229"></a><a class="code" href="classTiXmlText.html#a439792f6183a3d3fb6f2bc2b16fa5691">01229</a> <span class="preprocessor"> TiXmlText( const std::string&amp; initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)</span>
  891. <a name="l01230"></a>01230 <span class="preprocessor"></span> {
  892. <a name="l01231"></a>01231 <a class="code" href="classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90" title="Changes the value of the node.">SetValue</a>( initValue );
  893. <a name="l01232"></a>01232 cdata = <span class="keyword">false</span>;
  894. <a name="l01233"></a>01233 }
  895. <a name="l01234"></a>01234 <span class="preprocessor"> #endif</span>
  896. <a name="l01235"></a>01235 <span class="preprocessor"></span>
  897. <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>&amp; 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> ); }
  898. <a name="l01237"></a>01237 <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>&amp; operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html" title="XML text.">TiXmlText</a>&amp; base ) { base.CopyTo( <span class="keyword">this</span> ); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
  899. <a name="l01238"></a>01238
  900. <a name="l01239"></a>01239 <span class="comment">// Write this text object to a FILE stream.</span>
  901. <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>;
  902. <a name="l01241"></a>01241
  903. <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; }
  904. <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; }
  905. <a name="l01246"></a>01246
  906. <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 );
  907. <a name="l01248"></a>01248
  908. <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>; }
  909. <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>; }
  910. <a name="l01251"></a>01251
  911. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
  912. <a name="l01255"></a>01255
  913. <a name="l01256"></a>01256 <span class="keyword">protected</span> :
  914. <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>;
  915. <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>;
  916. <a name="l01260"></a>01260
  917. <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>
  918. <a name="l01262"></a>01262 <span class="comment">// [internal use]</span>
  919. <a name="l01263"></a>01263 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  920. <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 );
  921. <a name="l01265"></a>01265 <span class="preprocessor"> #endif</span>
  922. <a name="l01266"></a>01266 <span class="preprocessor"></span>
  923. <a name="l01267"></a>01267 <span class="keyword">private</span>:
  924. <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>
  925. <a name="l01269"></a>01269 };
  926. <a name="l01270"></a>01270
  927. <a name="l01271"></a>01271
  928. <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>
  929. <a name="l01286"></a>01286 {
  930. <a name="l01287"></a>01287 <span class="keyword">public</span>:
  931. <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 ) {}
  932. <a name="l01290"></a>01290
  933. <a name="l01291"></a>01291 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
  934. <a name="l01293"></a>01293 <span class="preprocessor"> TiXmlDeclaration( const std::string&amp; _version,</span>
  935. <a name="l01294"></a>01294 <span class="preprocessor"></span> <span class="keyword">const</span> std::string&amp; _encoding,
  936. <a name="l01295"></a>01295 <span class="keyword">const</span> std::string&amp; _standalone );
  937. <a name="l01296"></a>01296 <span class="preprocessor">#endif</span>
  938. <a name="l01297"></a>01297 <span class="preprocessor"></span>
  939. <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,
  940. <a name="l01300"></a>01300 <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding,
  941. <a name="l01301"></a>01301 <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone );
  942. <a name="l01302"></a>01302
  943. <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>&amp; copy );
  944. <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>&amp; 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>&amp; copy );
  945. <a name="l01305"></a>01305
  946. <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>() {}
  947. <a name="l01307"></a>01307
  948. <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 (); }
  949. <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 (); }
  950. <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 (); }
  951. <a name="l01314"></a>01314
  952. <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>;
  953. <a name="l01317"></a>01317 <span class="comment">// Print this declaration to a FILE stream.</span>
  954. <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>;
  955. <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>{
  956. <a name="l01320"></a>01320 Print( cfile, depth, 0 );
  957. <a name="l01321"></a>01321 }
  958. <a name="l01322"></a>01322
  959. <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 );
  960. <a name="l01324"></a>01324
  961. <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>; }
  962. <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>; }
  963. <a name="l01327"></a>01327
  964. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
  965. <a name="l01331"></a>01331
  966. <a name="l01332"></a>01332 <span class="keyword">protected</span>:
  967. <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>;
  968. <a name="l01334"></a>01334 <span class="comment">// used to be public</span>
  969. <a name="l01335"></a>01335 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  970. <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 );
  971. <a name="l01337"></a>01337 <span class="preprocessor"> #endif</span>
  972. <a name="l01338"></a>01338 <span class="preprocessor"></span>
  973. <a name="l01339"></a>01339 <span class="keyword">private</span>:
  974. <a name="l01340"></a>01340
  975. <a name="l01341"></a>01341 TIXML_STRING version;
  976. <a name="l01342"></a>01342 TIXML_STRING encoding;
  977. <a name="l01343"></a>01343 TIXML_STRING standalone;
  978. <a name="l01344"></a>01344 };
  979. <a name="l01345"></a>01345
  980. <a name="l01346"></a>01346
  981. <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&amp;#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>
  982. <a name="l01355"></a>01355 {
  983. <a name="l01356"></a>01356 <span class="keyword">public</span>:
  984. <a name="l01357"></a>01357 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#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 ) {}
  985. <a name="l01358"></a>01358 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>() {}
  986. <a name="l01359"></a>01359
  987. <a name="l01360"></a>01360 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#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&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>&amp; 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> ); }
  988. <a name="l01361"></a>01361 <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>&amp; operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>&amp; copy ) { copy.CopyTo( <span class="keyword">this</span> ); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
  989. <a name="l01362"></a>01362
  990. <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>;
  991. <a name="l01365"></a>01365 <span class="comment">// Print this Unknown to a FILE stream.</span>
  992. <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>;
  993. <a name="l01367"></a>01367
  994. <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 );
  995. <a name="l01369"></a>01369
  996. <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&amp;#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>; }
  997. <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&amp;#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>; }
  998. <a name="l01372"></a>01372
  999. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
  1000. <a name="l01376"></a>01376
  1001. <a name="l01377"></a>01377 <span class="keyword">protected</span>:
  1002. <a name="l01378"></a>01378 <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html" title="Any tag that tinyXml doesn&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>* target ) <span class="keyword">const</span>;
  1003. <a name="l01379"></a>01379
  1004. <a name="l01380"></a>01380 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1005. <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 );
  1006. <a name="l01382"></a>01382 <span class="preprocessor"> #endif</span>
  1007. <a name="l01383"></a>01383 <span class="preprocessor"></span>
  1008. <a name="l01384"></a>01384 <span class="keyword">private</span>:
  1009. <a name="l01385"></a>01385
  1010. <a name="l01386"></a>01386 };
  1011. <a name="l01387"></a>01387
  1012. <a name="l01388"></a>01388
  1013. <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>
  1014. <a name="l01394"></a>01394 {
  1015. <a name="l01395"></a>01395 <span class="keyword">public</span>:
  1016. <a name="l01397"></a>01397 <a class="code" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c" title="Create an empty document, that has no name.">TiXmlDocument</a>();
  1017. <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 );
  1018. <a name="l01400"></a>01400
  1019. <a name="l01401"></a>01401 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1020. <a name="l01403"></a>01403 <span class="preprocessor"> TiXmlDocument( const std::string&amp; documentName );</span>
  1021. <a name="l01404"></a>01404 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  1022. <a name="l01405"></a>01405 <span class="preprocessor"></span>
  1023. <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>&amp; copy );
  1024. <a name="l01407"></a>01407 <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>&amp; operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>&amp; copy );
  1025. <a name="l01408"></a>01408
  1026. <a name="l01409"></a>01409 <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html" title="Always the top level node.">TiXmlDocument</a>() {}
  1027. <a name="l01410"></a>01410
  1028. <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 );
  1029. <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>;
  1030. <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 );
  1031. <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>;
  1032. <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 );
  1033. <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>;
  1034. <a name="l01430"></a>01430
  1035. <a name="l01431"></a>01431 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1036. <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&amp; filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )
  1037. <a name="l01433"></a>01433 {
  1038. <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 );
  1039. <a name="l01435"></a>01435 }
  1040. <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&amp; filename ) <span class="keyword">const</span>
  1041. <a name="l01437"></a>01437 {
  1042. <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() );
  1043. <a name="l01439"></a>01439 }
  1044. <a name="l01440"></a>01440 <span class="preprocessor"> #endif</span>
  1045. <a name="l01441"></a>01441 <span class="preprocessor"></span>
  1046. <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 );
  1047. <a name="l01447"></a>01447
  1048. <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>(); }
  1049. <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>(); }
  1050. <a name="l01454"></a>01454
  1051. <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; }
  1052. <a name="l01461"></a>01461
  1053. <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 (); }
  1054. <a name="l01464"></a>01464
  1055. <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; }
  1056. <a name="l01469"></a>01469
  1057. <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; }
  1058. <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; }
  1059. <a name="l01479"></a>01479
  1060. <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; }
  1061. <a name="l01505"></a>01505
  1062. <a name="l01506"></a>01506 <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; }
  1063. <a name="l01507"></a>01507
  1064. <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>;
  1065. <a name="l01512"></a>01512 errorId = 0;
  1066. <a name="l01513"></a>01513 errorDesc = <span class="stringliteral">&quot;&quot;</span>;
  1067. <a name="l01514"></a>01514 errorLocation.row = errorLocation.col = 0;
  1068. <a name="l01515"></a>01515 <span class="comment">//errorLocation.last = 0; </span>
  1069. <a name="l01516"></a>01516 }
  1070. <a name="l01517"></a>01517
  1071. <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 (&amp;quot;pretty print&amp;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 (&amp;quot;pretty print&amp;quot;)...">Print</a>( stdout, 0 ); }
  1072. <a name="l01520"></a>01520
  1073. <a name="l01521"></a>01521 <span class="comment">/* Write the document to a string using formatted printing (&quot;pretty print&quot;). This</span>
  1074. <a name="l01522"></a>01522 <span class="comment"> will allocate a character array (new char[]) and return it as a pointer. The</span>
  1075. <a name="l01523"></a>01523 <span class="comment"> calling code pust call delete[] on the return char* to avoid a memory leak.</span>
  1076. <a name="l01524"></a>01524 <span class="comment"> */</span>
  1077. <a name="l01525"></a>01525 <span class="comment">//char* PrintToMemory() const; </span>
  1078. <a name="l01526"></a>01526
  1079. <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 (&amp;quot;pretty print&amp;quot;)...">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>;
  1080. <a name="l01529"></a>01529 <span class="comment">// [internal use]</span>
  1081. <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 );
  1082. <a name="l01531"></a>01531
  1083. <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>; }
  1084. <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>; }
  1085. <a name="l01534"></a>01534
  1086. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
  1087. <a name="l01538"></a>01538
  1088. <a name="l01539"></a>01539 <span class="keyword">protected</span> :
  1089. <a name="l01540"></a>01540 <span class="comment">// [internal use]</span>
  1090. <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>;
  1091. <a name="l01542"></a>01542 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1092. <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 );
  1093. <a name="l01544"></a>01544 <span class="preprocessor"> #endif</span>
  1094. <a name="l01545"></a>01545 <span class="preprocessor"></span>
  1095. <a name="l01546"></a>01546 <span class="keyword">private</span>:
  1096. <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>;
  1097. <a name="l01548"></a>01548
  1098. <a name="l01549"></a>01549 <span class="keywordtype">bool</span> error;
  1099. <a name="l01550"></a>01550 <span class="keywordtype">int</span> errorId;
  1100. <a name="l01551"></a>01551 TIXML_STRING errorDesc;
  1101. <a name="l01552"></a>01552 <span class="keywordtype">int</span> tabsize;
  1102. <a name="l01553"></a>01553 TiXmlCursor errorLocation;
  1103. <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>
  1104. <a name="l01555"></a>01555 };
  1105. <a name="l01556"></a>01556
  1106. <a name="l01557"></a>01557
  1107. <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>
  1108. <a name="l01639"></a>01639 {
  1109. <a name="l01640"></a>01640 <span class="keyword">public</span>:
  1110. <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-&gt;node = _node; }
  1111. <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>&amp; ref ) { this-&gt;node = ref.node; }
  1112. <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>&amp; ref ) { <span class="keywordflow">if</span> ( &amp;ref != <span class="keyword">this</span> ) this-&gt;node = ref.node; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
  1113. <a name="l01646"></a>01646
  1114. <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>;
  1115. <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>;
  1116. <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>;
  1117. <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>;
  1118. <a name="l01655"></a>01655
  1119. <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 &amp;quot;index&amp;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>;
  1120. <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 &amp;quot;index&amp;quot; child with the given name.">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
  1121. <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 &amp;quot;index&amp;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>;
  1122. <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 &amp;quot;index&amp;quot; child element with the given name.">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
  1123. <a name="l01674"></a>01674
  1124. <a name="l01675"></a>01675 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1125. <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&amp; _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() ); }
  1126. <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&amp; _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() ); }
  1127. <a name="l01678"></a>01678
  1128. <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 &amp;quot;index&amp;quot; child with the given name.">Child</a>( <span class="keyword">const</span> std::string&amp; _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 &amp;quot;index&amp;quot; child with the given name.">Child</a>( _value.c_str(), index ); }
  1129. <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 &amp;quot;index&amp;quot; child element with the given name.">ChildElement</a>( <span class="keyword">const</span> std::string&amp; _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 &amp;quot;index&amp;quot; child element with the given name.">ChildElement</a>( _value.c_str(), index ); }
  1130. <a name="l01681"></a>01681 <span class="preprocessor"> #endif</span>
  1131. <a name="l01682"></a>01682 <span class="preprocessor"></span>
  1132. <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; }
  1133. <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 &amp;&amp; node-&gt;ToElement() ) ? node-&gt;ToElement() : 0 ); }
  1134. <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 &amp;&amp; node-&gt;ToText() ) ? node-&gt;ToText() : 0 ); }
  1135. <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&amp;#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 &amp;&amp; node-&gt;ToUnknown() ) ? node-&gt;ToUnknown() : 0 ); }
  1136. <a name="l01695"></a>01695
  1137. <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>(); }
  1138. <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>(); }
  1139. <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>(); }
  1140. <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&amp;#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>(); }
  1141. <a name="l01712"></a>01712
  1142. <a name="l01713"></a>01713 <span class="keyword">private</span>:
  1143. <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;
  1144. <a name="l01715"></a>01715 };
  1145. <a name="l01716"></a>01716
  1146. <a name="l01717"></a>01717
  1147. <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 &amp;quot;Visitor pattern&amp;quot; (see the Accept() method...">TiXmlVisitor</a>
  1148. <a name="l01738"></a>01738 {
  1149. <a name="l01739"></a>01739 <span class="keyword">public</span>:
  1150. <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> ),
  1151. <a name="l01741"></a>01741 buffer(), indent( <span class="stringliteral">&quot; &quot;</span> ), lineBreak( <span class="stringliteral">&quot;\n&quot;</span> ) {}
  1152. <a name="l01742"></a>01742
  1153. <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>&amp; doc );
  1154. <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>&amp; doc );
  1155. <a name="l01745"></a>01745
  1156. <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>&amp; element, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html" title="An attribute is a name-value pair.">TiXmlAttribute</a>* firstAttribute );
  1157. <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>&amp; element );
  1158. <a name="l01748"></a>01748
  1159. <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>&amp; declaration );
  1160. <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>&amp; text );
  1161. <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>&amp; comment );
  1162. <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&amp;#39;t recognize is saved as an unknown.">TiXmlUnknown</a>&amp; unknown );
  1163. <a name="l01753"></a>01753
  1164. <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">&quot;&quot;</span> ; }
  1165. <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(); }
  1166. <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">&quot;&quot;</span>; }
  1167. <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(); }
  1168. <a name="l01767"></a>01767
  1169. <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 &amp;quot;stream printing&amp;quot; which is the most dense formatting without...">SetStreamPrinting</a>() { indent = <span class="stringliteral">&quot;&quot;</span>;
  1170. <a name="l01772"></a>01772 lineBreak = <span class="stringliteral">&quot;&quot;</span>;
  1171. <a name="l01773"></a>01773 }
  1172. <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(); }
  1173. <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(); }
  1174. <a name="l01778"></a>01778
  1175. <a name="l01779"></a>01779 <span class="preprocessor"> #ifdef TIXML_USE_STL</span>
  1176. <a name="l01781"></a><a class="code" href="classTiXmlPrinter.html#a3bd4daf44309b41f5813a833caa0d1c9">01781</a> <span class="preprocessor"> const std::string&amp; Str() { return buffer; }</span>
  1177. <a name="l01782"></a>01782 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
  1178. <a name="l01783"></a>01783 <span class="preprocessor"></span>
  1179. <a name="l01784"></a>01784 <span class="keyword">private</span>:
  1180. <a name="l01785"></a>01785 <span class="keywordtype">void</span> DoIndent() {
  1181. <a name="l01786"></a>01786 <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i&lt;depth; ++i )
  1182. <a name="l01787"></a>01787 buffer += indent;
  1183. <a name="l01788"></a>01788 }
  1184. <a name="l01789"></a>01789 <span class="keywordtype">void</span> DoLineBreak() {
  1185. <a name="l01790"></a>01790 buffer += lineBreak;
  1186. <a name="l01791"></a>01791 }
  1187. <a name="l01792"></a>01792
  1188. <a name="l01793"></a>01793 <span class="keywordtype">int</span> depth;
  1189. <a name="l01794"></a>01794 <span class="keywordtype">bool</span> simpleTextPrint;
  1190. <a name="l01795"></a>01795 TIXML_STRING buffer;
  1191. <a name="l01796"></a>01796 TIXML_STRING indent;
  1192. <a name="l01797"></a>01797 TIXML_STRING lineBreak;
  1193. <a name="l01798"></a>01798 };
  1194. <a name="l01799"></a>01799
  1195. <a name="l01800"></a>01800
  1196. <a name="l01801"></a>01801 <span class="preprocessor">#ifdef _MSC_VER</span>
  1197. <a name="l01802"></a>01802 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>
  1198. <a name="l01803"></a>01803 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  1199. <a name="l01804"></a>01804 <span class="preprocessor"></span>
  1200. <a name="l01805"></a>01805 <span class="preprocessor">#endif</span>
  1201. </pre></div></div>
  1202. <hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
  1203. <a href="http://www.doxygen.org/index.html">
  1204. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
  1205. </body>
  1206. </html>