Html程序  |  1038行  |  129.1 KB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>TinyXml: tinyxml.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>tinyxml.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span>
<a name="l00003"></a>00003 <span class="comment">Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span>
<a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span>
<a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span>
<a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span>
<a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span>
<a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span>
<a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span>
<a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span>
<a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span>
<a name="l00020"></a>00020 <span class="comment"></span>
<a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span>
<a name="l00022"></a>00022 <span class="comment">distribution.</span>
<a name="l00023"></a>00023 <span class="comment">*/</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef TINYXML_INCLUDED</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TINYXML_INCLUDED</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4530 )</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4786 )</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="comment">// Help out windows:</span>
<a name="l00042"></a>00042 <span class="preprocessor">#if defined( _DEBUG ) &amp;&amp; !defined( DEBUG )</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#if defined( DEBUG ) &amp;&amp; defined( _MSC_VER )</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include &lt;windows.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#define TIXML_LOG OutputDebugString</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define TIXML_LOG printf</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">    #include &lt;string&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">    #include &lt;iostream&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">    #define TIXML_STRING    std::string</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">    #define TIXML_ISTREAM   std::istream</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">    #define TIXML_OSTREAM   std::ostream</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">    #include "tinystr.h"</span>
<a name="l00061"></a>00061 <span class="preprocessor">    #define TIXML_STRING    TiXmlString</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">    #define TIXML_OSTREAM   TiXmlOutStream</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00065"></a>00065 <span class="comment">// Deprecated library function hell. Compilers want to use the</span>
<a name="l00066"></a>00066 <span class="comment">// new safe versions. This probably doesn't fully address the problem,</span>
<a name="l00067"></a>00067 <span class="comment">// but it gets closer. There are too many compilers for me to fully</span>
<a name="l00068"></a>00068 <span class="comment">// test. If you get compilation troubles, undefine TIXML_SAFE</span>
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="preprocessor">#define TIXML_SAFE      // TinyXml isn't fully buffer overrun protected, safe code. This is work in progress.</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#ifdef TIXML_SAFE</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">    #if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1200 )</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span>        <span class="comment">// Microsoft visual studio, version 6 and higher.</span>
<a name="l00074"></a>00074         <span class="comment">//#pragma message( "Using _sn* functions." )</span>
<a name="l00075"></a>00075 <span class="preprocessor">        #define TIXML_SNPRINTF _snprintf</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SNSCANF  _snscanf</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">    #elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt;= 3 )</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>        <span class="comment">// GCC version 3 and higher.s</span>
<a name="l00079"></a>00079         <span class="comment">//#warning( "Using sn* functions." )</span>
<a name="l00080"></a>00080 <span class="preprocessor">        #define TIXML_SNPRINTF snprintf</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SNSCANF  snscanf</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#endif  </span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>
<a name="l00085"></a>00085 <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
<a name="l00086"></a>00086 <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
<a name="l00087"></a>00087 <span class="keyword">class </span><a class="code" href="classTiXmlComment.html">TiXmlComment</a>;
<a name="l00088"></a>00088 <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>;
<a name="l00089"></a>00089 <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>;
<a name="l00090"></a>00090 <span class="keyword">class </span><a class="code" href="classTiXmlText.html">TiXmlText</a>;
<a name="l00091"></a>00091 <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>;
<a name="l00092"></a>00092 <span class="keyword">class </span>TiXmlParsingData;
<a name="l00093"></a>00093 
<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MAJOR_VERSION = 2;
<a name="l00095"></a>00095 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MINOR_VERSION = 4;
<a name="l00096"></a>00096 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 0;
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="comment">/*  Internal structure for tracking location of items </span>
<a name="l00099"></a>00099 <span class="comment">    in the XML file.</span>
<a name="l00100"></a>00100 <span class="comment">*/</span>
<a name="l00101"></a>00101 <span class="keyword">struct </span>TiXmlCursor
<a name="l00102"></a>00102 {
<a name="l00103"></a>00103     TiXmlCursor()       { Clear(); }
<a name="l00104"></a>00104     <span class="keywordtype">void</span> Clear()        { row = col = -1; }
<a name="l00105"></a>00105 
<a name="l00106"></a>00106     <span class="keywordtype">int</span> row;    <span class="comment">// 0 based.</span>
<a name="l00107"></a>00107     <span class="keywordtype">int</span> col;    <span class="comment">// 0 based.</span>
<a name="l00108"></a>00108 };
<a name="l00109"></a>00109 
<a name="l00110"></a>00110 
<a name="l00111"></a>00111 <span class="comment">// Only used by Attribute::Query functions</span>
<a name="l00112"></a>00112 <span class="keyword">enum</span> 
<a name="l00113"></a>00113 { 
<a name="l00114"></a>00114     TIXML_SUCCESS,
<a name="l00115"></a>00115     TIXML_NO_ATTRIBUTE,
<a name="l00116"></a>00116     TIXML_WRONG_TYPE
<a name="l00117"></a>00117 };
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 <span class="comment">// Used by the parsing routines.</span>
<a name="l00121"></a>00121 <span class="keyword">enum</span> TiXmlEncoding
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123     TIXML_ENCODING_UNKNOWN,
<a name="l00124"></a>00124     TIXML_ENCODING_UTF8,
<a name="l00125"></a>00125     TIXML_ENCODING_LEGACY
<a name="l00126"></a>00126 };
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="keyword">const</span> TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
<a name="l00129"></a>00129 
<a name="l00152"></a><a class="code" href="classTiXmlBase.html">00152</a> <span class="keyword">class </span><a class="code" href="classTiXmlBase.html">TiXmlBase</a>
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html">TiXmlNode</a>;
<a name="l00155"></a>00155     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
<a name="l00156"></a>00156     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
<a name="l00157"></a>00157 
<a name="l00158"></a>00158 <span class="keyword">public</span>:
<a name="l00159"></a>00159     <a class="code" href="classTiXmlBase.html">TiXmlBase</a>() :   <a class="code" href="classTiXmlBase.html#p1">userData</a>(0) {}
<a name="l00160"></a>00160     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlBase.html">TiXmlBase</a>()                    {}
<a name="l00161"></a>00161 
<a name="l00167"></a>00167     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#a2">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const </span>= 0;
<a name="l00168"></a>00168 
<a name="l00175"></a><a class="code" href="classTiXmlBase.html#e0">00175</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#e0">SetCondenseWhiteSpace</a>( <span class="keywordtype">bool</span> condense )      { condenseWhiteSpace = condense; }
<a name="l00176"></a>00176 
<a name="l00178"></a><a class="code" href="classTiXmlBase.html#e1">00178</a>     <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlBase.html#e1">IsWhiteSpaceCondensed</a>()                     { <span class="keywordflow">return</span> condenseWhiteSpace; }
<a name="l00179"></a>00179 
<a name="l00198"></a><a class="code" href="classTiXmlBase.html#a3">00198</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#a3">Row</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> location.row + 1; }
<a name="l00199"></a><a class="code" href="classTiXmlBase.html#a4">00199</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#a4">Column</a>()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> location.col + 1; }    
<a name="l00200"></a>00200 
<a name="l00201"></a>00201     <span class="keywordtype">void</span>  SetUserData( <span class="keywordtype">void</span>* user )         { <a class="code" href="classTiXmlBase.html#p1">userData</a> = user; }
<a name="l00202"></a>00202     <span class="keywordtype">void</span>* GetUserData()                     { <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#p1">userData</a>; }
<a name="l00203"></a>00203 
<a name="l00204"></a>00204     <span class="comment">// Table that returs, for a given lead byte, the total number of bytes</span>
<a name="l00205"></a>00205     <span class="comment">// in the UTF-8 sequence.</span>
<a name="l00206"></a>00206     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> utf8ByteTable[256];
<a name="l00207"></a>00207 
<a name="l00208"></a>00208     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a12">Parse</a>(  <span class="keyword">const</span> <span class="keywordtype">char</span>* p, 
<a name="l00209"></a>00209                                 TiXmlParsingData* data, 
<a name="l00210"></a>00210                                 TiXmlEncoding encoding <span class="comment">/*= TIXML_ENCODING_UNKNOWN */</span> ) = 0;
<a name="l00211"></a>00211 
<a name="l00212"></a>00212     <span class="keyword">enum</span>
<a name="l00213"></a>00213     {
<a name="l00214"></a>00214         TIXML_NO_ERROR = 0,
<a name="l00215"></a>00215         TIXML_ERROR,
<a name="l00216"></a>00216         TIXML_ERROR_OPENING_FILE,
<a name="l00217"></a>00217         TIXML_ERROR_OUT_OF_MEMORY,
<a name="l00218"></a>00218         TIXML_ERROR_PARSING_ELEMENT,
<a name="l00219"></a>00219         TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
<a name="l00220"></a>00220         TIXML_ERROR_READING_ELEMENT_VALUE,
<a name="l00221"></a>00221         TIXML_ERROR_READING_ATTRIBUTES,
<a name="l00222"></a>00222         TIXML_ERROR_PARSING_EMPTY,
<a name="l00223"></a>00223         TIXML_ERROR_READING_END_TAG,
<a name="l00224"></a>00224         TIXML_ERROR_PARSING_UNKNOWN,
<a name="l00225"></a>00225         TIXML_ERROR_PARSING_COMMENT,
<a name="l00226"></a>00226         TIXML_ERROR_PARSING_DECLARATION,
<a name="l00227"></a>00227         TIXML_ERROR_DOCUMENT_EMPTY,
<a name="l00228"></a>00228         TIXML_ERROR_EMBEDDED_NULL,
<a name="l00229"></a>00229         TIXML_ERROR_PARSING_CDATA,
<a name="l00230"></a>00230 
<a name="l00231"></a>00231         TIXML_ERROR_STRING_COUNT
<a name="l00232"></a>00232     };
<a name="l00233"></a>00233 
<a name="l00234"></a>00234 <span class="keyword">protected</span>:
<a name="l00235"></a>00235 
<a name="l00236"></a>00236     <span class="comment">// See STL_STRING_BUG</span>
<a name="l00237"></a>00237     <span class="comment">// Utility class to overcome a bug.</span>
<a name="l00238"></a>00238     <span class="keyword">class </span>StringToBuffer
<a name="l00239"></a>00239     {
<a name="l00240"></a>00240       <span class="keyword">public</span>:
<a name="l00241"></a>00241         StringToBuffer( <span class="keyword">const</span> TIXML_STRING&amp; str );
<a name="l00242"></a>00242         ~StringToBuffer();
<a name="l00243"></a>00243         <span class="keywordtype">char</span>* buffer;
<a name="l00244"></a>00244     };
<a name="l00245"></a>00245 
<a name="l00246"></a>00246     <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 );
<a name="l00247"></a>00247     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span>  IsWhiteSpace( <span class="keywordtype">char</span> c )      
<a name="l00248"></a>00248     { 
<a name="l00249"></a>00249         <span class="keywordflow">return</span> ( isspace( (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) c ) || c == <span class="charliteral">'\n'</span> || c == <span class="charliteral">'\r'</span> ); 
<a name="l00250"></a>00250     }
<a name="l00251"></a>00251 
<a name="l00252"></a>00252     <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut (TIXML_OSTREAM *) <span class="keyword">const </span>= 0;
<a name="l00253"></a>00253 
<a name="l00254"></a>00254 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00255"></a>00255 <span class="preprocessor"></span>        <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamWhiteSpace( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l00256"></a>00256         <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamTo( TIXML_ISTREAM * in, <span class="keywordtype">int</span> character, TIXML_STRING * tag );
<a name="l00257"></a>00257 <span class="preprocessor">    #endif</span>
<a name="l00258"></a>00258 <span class="preprocessor"></span>
<a name="l00259"></a>00259     <span class="comment">/*  Reads an XML name into the string provided. Returns</span>
<a name="l00260"></a>00260 <span class="comment">        a pointer just past the last character of the name,</span>
<a name="l00261"></a>00261 <span class="comment">        or 0 if the function has an error.</span>
<a name="l00262"></a>00262 <span class="comment">    */</span>
<a name="l00263"></a>00263     <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 );
<a name="l00264"></a>00264 
<a name="l00265"></a>00265     <span class="comment">/*  Reads text. Returns a pointer past the given end tag.</span>
<a name="l00266"></a>00266 <span class="comment">        Wickedly complex options, but it keeps the (sensitive) code in one place.</span>
<a name="l00267"></a>00267 <span class="comment">    */</span>
<a name="l00268"></a>00268     <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>
<a name="l00269"></a>00269                                     TIXML_STRING* text,         <span class="comment">// the string read</span>
<a name="l00270"></a>00270                                     <span class="keywordtype">bool</span> ignoreWhiteSpace,      <span class="comment">// whether to keep the white space</span>
<a name="l00271"></a>00271                                     <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,         <span class="comment">// what ends this text</span>
<a name="l00272"></a>00272                                     <span class="keywordtype">bool</span> ignoreCase,            <span class="comment">// whether to ignore case in the end tag</span>
<a name="l00273"></a>00273                                     TiXmlEncoding encoding );   <span class="comment">// the current encoding</span>
<a name="l00274"></a>00274 
<a name="l00275"></a>00275     <span class="comment">// If an entity has been found, transform it into a character.</span>
<a name="l00276"></a>00276     <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 );
<a name="l00277"></a>00277 
<a name="l00278"></a>00278     <span class="comment">// Get a character, while interpreting entities.</span>
<a name="l00279"></a>00279     <span class="comment">// The length can be from 0 to 4 bytes.</span>
<a name="l00280"></a>00280     <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 )
<a name="l00281"></a>00281     {
<a name="l00282"></a>00282         assert( p );
<a name="l00283"></a>00283         <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
<a name="l00284"></a>00284         {
<a name="l00285"></a>00285             *length = utf8ByteTable[ *((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)p) ];
<a name="l00286"></a>00286             assert( *length &gt;= 0 &amp;&amp; *length &lt; 5 );
<a name="l00287"></a>00287         }
<a name="l00288"></a>00288         <span class="keywordflow">else</span>
<a name="l00289"></a>00289         {
<a name="l00290"></a>00290             *length = 1;
<a name="l00291"></a>00291         }
<a name="l00292"></a>00292 
<a name="l00293"></a>00293         <span class="keywordflow">if</span> ( *length == 1 )
<a name="l00294"></a>00294         {
<a name="l00295"></a>00295             <span class="keywordflow">if</span> ( *p == <span class="charliteral">'&amp;'</span> )
<a name="l00296"></a>00296                 <span class="keywordflow">return</span> GetEntity( p, _value, length, encoding );
<a name="l00297"></a>00297             *_value = *p;
<a name="l00298"></a>00298             <span class="keywordflow">return</span> p+1;
<a name="l00299"></a>00299         }
<a name="l00300"></a>00300         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( *length )
<a name="l00301"></a>00301         {
<a name="l00302"></a>00302             <span class="comment">//strncpy( _value, p, *length );    // lots of compilers don't like this function (unsafe),</span>
<a name="l00303"></a>00303                                                 <span class="comment">// and the null terminator isn't needed</span>
<a name="l00304"></a>00304             <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; p[i] &amp;&amp; i&lt;*length; ++i ) {
<a name="l00305"></a>00305                 _value[i] = p[i];
<a name="l00306"></a>00306             }
<a name="l00307"></a>00307             <span class="keywordflow">return</span> p + (*length);
<a name="l00308"></a>00308         }
<a name="l00309"></a>00309         <span class="keywordflow">else</span>
<a name="l00310"></a>00310         {
<a name="l00311"></a>00311             <span class="comment">// Not valid text.</span>
<a name="l00312"></a>00312             <span class="keywordflow">return</span> 0;
<a name="l00313"></a>00313         }
<a name="l00314"></a>00314     }
<a name="l00315"></a>00315 
<a name="l00316"></a>00316     <span class="comment">// Puts a string to a stream, expanding entities as it goes.</span>
<a name="l00317"></a>00317     <span class="comment">// Note this should not contian the '&lt;', '&gt;', etc, or they will be transformed into entities!</span>
<a name="l00318"></a>00318     <span class="keyword">static</span> <span class="keywordtype">void</span> PutString( <span class="keyword">const</span> TIXML_STRING&amp; str, TIXML_OSTREAM* out );
<a name="l00319"></a>00319 
<a name="l00320"></a>00320     <span class="keyword">static</span> <span class="keywordtype">void</span> PutString( <span class="keyword">const</span> TIXML_STRING&amp; str, TIXML_STRING* out );
<a name="l00321"></a>00321 
<a name="l00322"></a>00322     <span class="comment">// Return true if the next characters in the stream are any of the endTag sequences.</span>
<a name="l00323"></a>00323     <span class="comment">// Ignore case only works for english, and should only be relied on when comparing</span>
<a name="l00324"></a>00324     <span class="comment">// to English words: StringEqual( p, "version", true ) is fine.</span>
<a name="l00325"></a>00325     <span class="keyword">static</span> <span class="keywordtype">bool</span> StringEqual(    <span class="keyword">const</span> <span class="keywordtype">char</span>* p,
<a name="l00326"></a>00326                                 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,
<a name="l00327"></a>00327                                 <span class="keywordtype">bool</span> ignoreCase,
<a name="l00328"></a>00328                                 TiXmlEncoding encoding );
<a name="l00329"></a>00329 
<a name="l00330"></a>00330     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* errorString[ TIXML_ERROR_STRING_COUNT ];
<a name="l00331"></a>00331 
<a name="l00332"></a>00332     TiXmlCursor location;
<a name="l00333"></a>00333 
<a name="l00335"></a><a class="code" href="classTiXmlBase.html#p1">00335</a>     <span class="keywordtype">void</span>*           <a class="code" href="classTiXmlBase.html#p1">userData</a>;
<a name="l00336"></a>00336     
<a name="l00337"></a>00337     <span class="comment">// None of these methods are reliable for any language except English.</span>
<a name="l00338"></a>00338     <span class="comment">// Good for approximation, not great for accuracy.</span>
<a name="l00339"></a>00339     <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlpha( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
<a name="l00340"></a>00340     <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlphaNum( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
<a name="l00341"></a>00341     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ToLower( <span class="keywordtype">int</span> v, TiXmlEncoding encoding )
<a name="l00342"></a>00342     {
<a name="l00343"></a>00343         <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
<a name="l00344"></a>00344         {
<a name="l00345"></a>00345             <span class="keywordflow">if</span> ( v &lt; 128 ) <span class="keywordflow">return</span> tolower( v );
<a name="l00346"></a>00346             <span class="keywordflow">return</span> v;
<a name="l00347"></a>00347         }
<a name="l00348"></a>00348         <span class="keywordflow">else</span>
<a name="l00349"></a>00349         {
<a name="l00350"></a>00350             <span class="keywordflow">return</span> tolower( v );
<a name="l00351"></a>00351         }
<a name="l00352"></a>00352     }
<a name="l00353"></a>00353     <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 );
<a name="l00354"></a>00354 
<a name="l00355"></a>00355 <span class="keyword">private</span>:
<a name="l00356"></a>00356     <a class="code" href="classTiXmlBase.html">TiXmlBase</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>&amp; );              <span class="comment">// not implemented.</span>
<a name="l00357"></a>00357     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>&amp; base );    <span class="comment">// not allowed.</span>
<a name="l00358"></a>00358 
<a name="l00359"></a>00359     <span class="keyword">struct </span>Entity
<a name="l00360"></a>00360     {
<a name="l00361"></a>00361         <span class="keyword">const</span> <span class="keywordtype">char</span>*     str;
<a name="l00362"></a>00362         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    strLength;
<a name="l00363"></a>00363         <span class="keywordtype">char</span>            chr;
<a name="l00364"></a>00364     };
<a name="l00365"></a>00365     <span class="keyword">enum</span>
<a name="l00366"></a>00366     {
<a name="l00367"></a>00367         NUM_ENTITY = 5,
<a name="l00368"></a>00368         MAX_ENTITY_LENGTH = 6
<a name="l00369"></a>00369 
<a name="l00370"></a>00370     };
<a name="l00371"></a>00371     <span class="keyword">static</span> Entity entity[ NUM_ENTITY ];
<a name="l00372"></a>00372     <span class="keyword">static</span> <span class="keywordtype">bool</span> condenseWhiteSpace;
<a name="l00373"></a>00373 };
<a name="l00374"></a>00374 
<a name="l00375"></a>00375 
<a name="l00382"></a><a class="code" href="classTiXmlNode.html">00382</a> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html">TiXmlNode</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>
<a name="l00383"></a>00383 {
<a name="l00384"></a>00384     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
<a name="l00385"></a>00385     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
<a name="l00386"></a>00386 
<a name="l00387"></a>00387 <span class="keyword">public</span>:
<a name="l00388"></a>00388 <span class="preprocessor">    #ifdef TIXML_USE_STL    </span>
<a name="l00389"></a>00389 <span class="preprocessor"></span>
<a name="l00393"></a>00393         <span class="keyword">friend</span> std::istream&amp; <a class="code" href="classTiXmlNode.html#n2">operator &gt;&gt; </a>(std::istream&amp; in, <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base);
<a name="l00394"></a>00394 
<a name="l00411"></a>00411         <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classTiXmlNode.html#n3">operator&lt;&lt; </a>(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base);
<a name="l00412"></a>00412 
<a name="l00414"></a>00414         <span class="keyword">friend</span> std::string&amp; <a class="code" href="classTiXmlNode.html#n3">operator&lt;&lt; </a>(std::string&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base );
<a name="l00415"></a>00415 
<a name="l00416"></a>00416 <span class="preprocessor">    #else</span>
<a name="l00417"></a>00417 <span class="preprocessor"></span>        <span class="comment">// Used internally, not part of the public API.</span>
<a name="l00418"></a>00418         <span class="keyword">friend</span> TIXML_OSTREAM&amp; <a class="code" href="classTiXmlNode.html#n3">operator&lt;&lt; </a>(TIXML_OSTREAM&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base);
<a name="l00419"></a>00419 <span class="preprocessor">    #endif</span>
<a name="l00420"></a>00420 <span class="preprocessor"></span>
<a name="l00424"></a><a class="code" href="classTiXmlNode.html#w7">00424</a>     <span class="keyword">enum</span> <a class="code" href="classTiXmlNode.html#w7">NodeType</a>
<a name="l00425"></a>00425     {
<a name="l00426"></a>00426         DOCUMENT,
<a name="l00427"></a>00427         ELEMENT,
<a name="l00428"></a>00428         COMMENT,
<a name="l00429"></a>00429         UNKNOWN,
<a name="l00430"></a>00430         TEXT,
<a name="l00431"></a>00431         DECLARATION,
<a name="l00432"></a>00432         TYPECOUNT
<a name="l00433"></a>00433     };
<a name="l00434"></a>00434 
<a name="l00435"></a>00435     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlNode.html">TiXmlNode</a>();
<a name="l00436"></a>00436 
<a name="l00449"></a><a class="code" href="classTiXmlNode.html#a1">00449</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlNode.html#a1">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str (); }
<a name="l00450"></a>00450 
<a name="l00451"></a>00451 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00452"></a>00452 <span class="preprocessor"></span>
<a name="l00456"></a><a class="code" href="classTiXmlNode.html#a2">00456</a>     <span class="keyword">const</span> std::string&amp; <a class="code" href="classTiXmlNode.html#a2">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
<a name="l00457"></a>00457 <span class="preprocessor">    #endif</span>
<a name="l00458"></a>00458 <span class="preprocessor"></span>
<a name="l00468"></a><a class="code" href="classTiXmlNode.html#a3">00468</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a3">SetValue</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * _value) { value = _value;}
<a name="l00469"></a>00469 
<a name="l00470"></a>00470 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00471"></a>00471 <span class="preprocessor"></span>
<a name="l00472"></a><a class="code" href="classTiXmlNode.html#a4">00472</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a3">SetValue</a>( <span class="keyword">const</span> std::string&amp; _value )    
<a name="l00473"></a>00473     {     
<a name="l00474"></a>00474         StringToBuffer buf( _value );
<a name="l00475"></a>00475         <a class="code" href="classTiXmlNode.html#a3">SetValue</a>( buf.buffer ? buf.buffer : <span class="stringliteral">""</span> );       
<a name="l00476"></a>00476     }   
<a name="l00477"></a>00477 <span class="preprocessor">    #endif</span>
<a name="l00478"></a>00478 <span class="preprocessor"></span>
<a name="l00480"></a>00480     <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#a5">Clear</a>();
<a name="l00481"></a>00481 
<a name="l00483"></a><a class="code" href="classTiXmlNode.html#a6">00483</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a6">Parent</a>()                         { <span class="keywordflow">return</span> parent; }
<a name="l00484"></a>00484     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a6">Parent</a>()<span class="keyword"> const             </span>{ <span class="keywordflow">return</span> parent; }
<a name="l00485"></a>00485 
<a name="l00486"></a><a class="code" href="classTiXmlNode.html#a8">00486</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">FirstChild</a>()<span class="keyword">   const   </span>{ <span class="keywordflow">return</span> firstChild; }      
<a name="l00487"></a>00487     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">FirstChild</a>()                 { <span class="keywordflow">return</span> firstChild; }
<a name="l00488"></a>00488     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;            
<a name="l00489"></a>00489     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value );                        
<a name="l00490"></a>00490 
<a name="l00491"></a>00491     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild()<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> lastChild; }       
<a name="l00492"></a><a class="code" href="classTiXmlNode.html#a13">00492</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild()  { <span class="keywordflow">return</span> lastChild; }
<a name="l00493"></a>00493     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;         
<a name="l00494"></a>00494     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ); 
<a name="l00495"></a>00495 
<a name="l00496"></a>00496 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00497"></a><a class="code" href="classTiXmlNode.html#a16">00497</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">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#a8">FirstChild</a> (_value.c_str ());    }   
<a name="l00498"></a><a class="code" href="classTiXmlNode.html#a17">00498</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a8">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value )              {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a8">FirstChild</a> (_value.c_str ());    }   
<a name="l00499"></a><a class="code" href="classTiXmlNode.html#a18">00499</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const   </span>{   <span class="keywordflow">return</span> LastChild (_value.c_str ()); }   
<a name="l00500"></a><a class="code" href="classTiXmlNode.html#a19">00500</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> std::string&amp; _value )               {   <span class="keywordflow">return</span> LastChild (_value.c_str ()); }   
<a name="l00501"></a>00501 <span class="preprocessor">    #endif</span>
<a name="l00502"></a>00502 <span class="preprocessor"></span>
<a name="l00519"></a>00519     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
<a name="l00520"></a>00520     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous );
<a name="l00521"></a>00521 
<a name="l00523"></a>00523     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
<a name="l00524"></a>00524     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value, <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous );
<a name="l00525"></a>00525 
<a name="l00526"></a>00526 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00527"></a><a class="code" href="classTiXmlNode.html#a24">00527</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous )<span class="keyword"> const  </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a> (_value.c_str (), previous); }   
<a name="l00528"></a><a class="code" href="classTiXmlNode.html#a25">00528</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) {  <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a20">IterateChildren</a> (_value.c_str (), previous); }   
<a name="l00529"></a>00529 <span class="preprocessor">    #endif</span>
<a name="l00530"></a>00530 <span class="preprocessor"></span>
<a name="l00534"></a>00534     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a26">InsertEndChild</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
<a name="l00535"></a>00535 
<a name="l00536"></a>00536 
<a name="l00546"></a>00546     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a27">LinkEndChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* addThis );
<a name="l00547"></a>00547 
<a name="l00551"></a>00551     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a28">InsertBeforeChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* beforeThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
<a name="l00552"></a>00552 
<a name="l00556"></a>00556     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a29">InsertAfterChild</a>(  <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* afterThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
<a name="l00557"></a>00557 
<a name="l00561"></a>00561     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a30">ReplaceChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* replaceThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; withThis );
<a name="l00562"></a>00562 
<a name="l00564"></a>00564     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#a31">RemoveChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* removeThis );
<a name="l00565"></a>00565 
<a name="l00567"></a><a class="code" href="classTiXmlNode.html#a32">00567</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a>()<span class="keyword"> const            </span>{ <span class="keywordflow">return</span> prev; }
<a name="l00568"></a>00568     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a>()                        { <span class="keywordflow">return</span> prev; }
<a name="l00569"></a>00569 
<a name="l00571"></a>00571     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00572"></a>00572     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * );
<a name="l00573"></a>00573 
<a name="l00574"></a>00574 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00575"></a><a class="code" href="classTiXmlNode.html#a36">00575</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">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#a32">PreviousSibling</a> (_value.c_str ());   }   
<a name="l00576"></a><a class="code" href="classTiXmlNode.html#a37">00576</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a>( <span class="keyword">const</span> std::string&amp; _value )             {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a32">PreviousSibling</a> (_value.c_str ());   }   
<a name="l00577"></a><a class="code" href="classTiXmlNode.html#a38">00577</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">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#a40">NextSibling</a> (_value.c_str ());   }   
<a name="l00578"></a><a class="code" href="classTiXmlNode.html#a39">00578</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">NextSibling</a>( <span class="keyword">const</span> std::string&amp; _value)                  {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a40">NextSibling</a> (_value.c_str ());   }   
<a name="l00579"></a>00579 <span class="preprocessor">    #endif</span>
<a name="l00580"></a>00580 <span class="preprocessor"></span>
<a name="l00582"></a><a class="code" href="classTiXmlNode.html#a40">00582</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">NextSibling</a>()<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> next; }
<a name="l00583"></a>00583     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">NextSibling</a>()                            { <span class="keywordflow">return</span> next; }
<a name="l00584"></a>00584 
<a name="l00586"></a>00586     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00587"></a>00587     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a40">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * );
<a name="l00588"></a>00588 
<a name="l00593"></a>00593     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a>() <span class="keyword">const</span>;
<a name="l00594"></a>00594     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a>();
<a name="l00595"></a>00595 
<a name="l00600"></a>00600     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
<a name="l00601"></a>00601     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * );
<a name="l00602"></a>00602 
<a name="l00603"></a>00603 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00604"></a><a class="code" href="classTiXmlNode.html#a48">00604</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">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#a44">NextSiblingElement</a> (_value.c_str ());    }   
<a name="l00605"></a><a class="code" href="classTiXmlNode.html#a49">00605</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a>( <span class="keyword">const</span> std::string&amp; _value)                {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a44">NextSiblingElement</a> (_value.c_str ());    }   
<a name="l00606"></a>00606 <span class="preprocessor">    #endif</span>
<a name="l00607"></a>00607 <span class="preprocessor"></span>
<a name="l00609"></a>00609     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>() <span class="keyword">const</span>;
<a name="l00610"></a>00610     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>();
<a name="l00611"></a>00611 
<a name="l00613"></a>00613     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l00614"></a>00614     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value );
<a name="l00615"></a>00615 
<a name="l00616"></a>00616 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00617"></a><a class="code" href="classTiXmlNode.html#a54">00617</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">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#a50">FirstChildElement</a> (_value.c_str ()); }   
<a name="l00618"></a><a class="code" href="classTiXmlNode.html#a55">00618</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value )                {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a> (_value.c_str ()); }   
<a name="l00619"></a>00619 <span class="preprocessor">    #endif</span>
<a name="l00620"></a>00620 <span class="preprocessor"></span>
<a name="l00625"></a><a class="code" href="classTiXmlNode.html#a56">00625</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classTiXmlNode.html#a56">Type</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> type; }
<a name="l00626"></a>00626 
<a name="l00630"></a>00630     <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a57">GetDocument</a>() <span class="keyword">const</span>;
<a name="l00631"></a>00631     <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a57">GetDocument</a>();
<a name="l00632"></a>00632 
<a name="l00634"></a><a class="code" href="classTiXmlNode.html#a59">00634</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#a59">NoChildren</a>()<span class="keyword"> const                     </span>{ <span class="keywordflow">return</span> !firstChild; }
<a name="l00635"></a>00635 
<a name="l00636"></a><a class="code" href="classTiXmlNode.html#a60">00636</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a60">ToDocument</a>()<span class="keyword">   const       </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == DOCUMENT ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*) <span class="keyword">this</span> : 0; } 
<a name="l00637"></a><a class="code" href="classTiXmlNode.html#a61">00637</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*  <a class="code" href="classTiXmlNode.html#a61">ToElement</a>()<span class="keyword"> const          </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == ELEMENT  ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00638"></a><a class="code" href="classTiXmlNode.html#a62">00638</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*  <a class="code" href="classTiXmlNode.html#a62">ToComment</a>()<span class="keyword"> const          </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == COMMENT  ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00639"></a><a class="code" href="classTiXmlNode.html#a63">00639</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*  <a class="code" href="classTiXmlNode.html#a63">ToUnknown</a>()<span class="keyword"> const          </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == UNKNOWN  ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00640"></a><a class="code" href="classTiXmlNode.html#a64">00640</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>*       <a class="code" href="classTiXmlNode.html#a64">ToText</a>()<span class="keyword">    const        </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == TEXT     ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>*)     <span class="keyword">this</span> : 0; } 
<a name="l00641"></a><a class="code" href="classTiXmlNode.html#a65">00641</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* <a class="code" href="classTiXmlNode.html#a65">ToDeclaration</a>()<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == DECLARATION ) ? (<span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>*) <span class="keyword">this</span> : 0; } 
<a name="l00642"></a>00642 
<a name="l00643"></a><a class="code" href="classTiXmlNode.html#a66">00643</a>     <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#a60">ToDocument</a>()         { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == DOCUMENT ) ? (<a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*) <span class="keyword">this</span> : 0; } 
<a name="l00644"></a><a class="code" href="classTiXmlNode.html#a67">00644</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*  <a class="code" href="classTiXmlNode.html#a61">ToElement</a>()          { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == ELEMENT  ) ? (<a class="code" href="classTiXmlElement.html">TiXmlElement</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00645"></a><a class="code" href="classTiXmlNode.html#a68">00645</a>     <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*  <a class="code" href="classTiXmlNode.html#a62">ToComment</a>()          { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == COMMENT  ) ? (<a class="code" href="classTiXmlComment.html">TiXmlComment</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00646"></a><a class="code" href="classTiXmlNode.html#a69">00646</a>     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*  <a class="code" href="classTiXmlNode.html#a63">ToUnknown</a>()          { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == UNKNOWN  ) ? (<a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*)  <span class="keyword">this</span> : 0; } 
<a name="l00647"></a><a class="code" href="classTiXmlNode.html#a70">00647</a>     <a class="code" href="classTiXmlText.html">TiXmlText</a>*     <a class="code" href="classTiXmlNode.html#a64">ToText</a>()             { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == TEXT     ) ? (<a class="code" href="classTiXmlText.html">TiXmlText</a>*)     <span class="keyword">this</span> : 0; } 
<a name="l00648"></a><a class="code" href="classTiXmlNode.html#a71">00648</a>     <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* <a class="code" href="classTiXmlNode.html#a65">ToDeclaration</a>()   { <span class="keywordflow">return</span> ( <span class="keyword">this</span> &amp;&amp; type == DECLARATION ) ? (<a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>*) <span class="keyword">this</span> : 0; } 
<a name="l00649"></a>00649 
<a name="l00653"></a>00653     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#a72">Clone</a>() <span class="keyword">const </span>= 0;
<a name="l00654"></a>00654 
<a name="l00655"></a>00655 <span class="keyword">protected</span>:
<a name="l00656"></a>00656     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html#w7">NodeType</a> _type );
<a name="l00657"></a>00657 
<a name="l00658"></a>00658     <span class="comment">// Copy to the allocated object. Shared functionality between Clone, Copy constructor,</span>
<a name="l00659"></a>00659     <span class="comment">// and the assignment operator.</span>
<a name="l00660"></a>00660     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* target ) <span class="keyword">const</span>;
<a name="l00661"></a>00661 
<a name="l00662"></a>00662 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00663"></a>00663 <span class="preprocessor"></span>        <span class="comment">// The real work of the input operator.</span>
<a name="l00664"></a>00664         <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM* in, TIXML_STRING* tag ) = 0;
<a name="l00665"></a>00665 <span class="preprocessor">    #endif</span>
<a name="l00666"></a>00666 <span class="preprocessor"></span>
<a name="l00667"></a>00667     <span class="comment">// Figure out what is at *p, and parse it. Returns null if it is not an xml node.</span>
<a name="l00668"></a>00668     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* Identify( <span class="keyword">const</span> <span class="keywordtype">char</span>* start, TiXmlEncoding encoding );
<a name="l00669"></a>00669 
<a name="l00670"></a>00670     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      parent;
<a name="l00671"></a>00671     <a class="code" href="classTiXmlNode.html#w7">NodeType</a>        type;
<a name="l00672"></a>00672 
<a name="l00673"></a>00673     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      firstChild;
<a name="l00674"></a>00674     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      lastChild;
<a name="l00675"></a>00675 
<a name="l00676"></a>00676     TIXML_STRING    value;
<a name="l00677"></a>00677 
<a name="l00678"></a>00678     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      prev;
<a name="l00679"></a>00679     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      next;
<a name="l00680"></a>00680 
<a name="l00681"></a>00681 <span class="keyword">private</span>:
<a name="l00682"></a>00682     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; );              <span class="comment">// not implemented.</span>
<a name="l00683"></a>00683     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base );    <span class="comment">// not allowed.</span>
<a name="l00684"></a>00684 };
<a name="l00685"></a>00685 
<a name="l00686"></a>00686 
<a name="l00694"></a><a class="code" href="classTiXmlAttribute.html">00694</a> <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>
<a name="l00695"></a>00695 {
<a name="l00696"></a>00696     <span class="keyword">friend</span> <span class="keyword">class </span>TiXmlAttributeSet;
<a name="l00697"></a>00697 
<a name="l00698"></a>00698 <span class="keyword">public</span>:
<a name="l00700"></a><a class="code" href="classTiXmlAttribute.html#a0">00700</a>     <a class="code" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a>() : <a class="code" href="classTiXmlBase.html">TiXmlBase</a>()
<a name="l00701"></a>00701     {
<a name="l00702"></a>00702         document = 0;
<a name="l00703"></a>00703         prev = next = 0;
<a name="l00704"></a>00704     }
<a name="l00705"></a>00705 
<a name="l00706"></a>00706 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00707"></a>00707 <span class="preprocessor"></span>
<a name="l00708"></a><a class="code" href="classTiXmlAttribute.html#a1">00708</a>     <a class="code" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a>( <span class="keyword">const</span> std::string&amp; _name, <span class="keyword">const</span> std::string&amp; _value )
<a name="l00709"></a>00709     {
<a name="l00710"></a>00710         name = _name;
<a name="l00711"></a>00711         value = _value;
<a name="l00712"></a>00712         document = 0;
<a name="l00713"></a>00713         prev = next = 0;
<a name="l00714"></a>00714     }
<a name="l00715"></a>00715 <span class="preprocessor">    #endif</span>
<a name="l00716"></a>00716 <span class="preprocessor"></span>
<a name="l00718"></a><a class="code" href="classTiXmlAttribute.html#a2">00718</a>     <a class="code" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value )
<a name="l00719"></a>00719     {
<a name="l00720"></a>00720         name = _name;
<a name="l00721"></a>00721         value = _value;
<a name="l00722"></a>00722         document = 0;
<a name="l00723"></a>00723         prev = next = 0;
<a name="l00724"></a>00724     }
<a name="l00725"></a>00725 
<a name="l00726"></a><a class="code" href="classTiXmlAttribute.html#a3">00726</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>*     <a class="code" href="classTiXmlAttribute.html#a3">Name</a>()<span class="keyword">  const       </span>{ <span class="keywordflow">return</span> name.c_str (); }       
<a name="l00727"></a><a class="code" href="classTiXmlAttribute.html#a4">00727</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>*     <a class="code" href="classTiXmlAttribute.html#a4">Value</a>()<span class="keyword"> const       </span>{ <span class="keywordflow">return</span> value.c_str (); }      
<a name="l00728"></a>00728     <span class="keywordtype">int</span>             <a class="code" href="classTiXmlAttribute.html#a5">IntValue</a>() <span class="keyword">const</span>;                                   
<a name="l00729"></a>00729     <span class="keywordtype">double</span>          <a class="code" href="classTiXmlAttribute.html#a6">DoubleValue</a>() <span class="keyword">const</span>;                                
<a name="l00730"></a>00730 
<a name="l00740"></a>00740     <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#a7">QueryIntValue</a>( <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
<a name="l00742"></a>00742     <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#a8">QueryDoubleValue</a>( <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
<a name="l00743"></a>00743 
<a name="l00744"></a><a class="code" href="classTiXmlAttribute.html#a9">00744</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a9">SetName</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name )   { name = _name; }               
<a name="l00745"></a><a class="code" href="classTiXmlAttribute.html#a10">00745</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a10">SetValue</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) { value = _value; }             
<a name="l00746"></a>00746 
<a name="l00747"></a>00747     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a11">SetIntValue</a>( <span class="keywordtype">int</span> _value );                                     
<a name="l00748"></a>00748     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a12">SetDoubleValue</a>( <span class="keywordtype">double</span> _value );                               
<a name="l00749"></a>00749 
<a name="l00750"></a>00750 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00751"></a>00751 <span class="preprocessor"></span>
<a name="l00752"></a><a class="code" href="classTiXmlAttribute.html#a13">00752</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a9">SetName</a>( <span class="keyword">const</span> std::string&amp; _name )    
<a name="l00753"></a>00753     {   
<a name="l00754"></a>00754         StringToBuffer buf( _name );
<a name="l00755"></a>00755         <a class="code" href="classTiXmlAttribute.html#a9">SetName</a> ( buf.buffer ? buf.buffer : <span class="stringliteral">"error"</span> );  
<a name="l00756"></a>00756     }
<a name="l00758"></a><a class="code" href="classTiXmlAttribute.html#a14">00758</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a10">SetValue</a>( <span class="keyword">const</span> std::string&amp; _value )  
<a name="l00759"></a>00759     {   
<a name="l00760"></a>00760         StringToBuffer buf( _value );
<a name="l00761"></a>00761         <a class="code" href="classTiXmlAttribute.html#a10">SetValue</a>( buf.buffer ? buf.buffer : <span class="stringliteral">"error"</span> );  
<a name="l00762"></a>00762     }
<a name="l00763"></a>00763 <span class="preprocessor">    #endif</span>
<a name="l00764"></a>00764 <span class="preprocessor"></span>
<a name="l00766"></a>00766     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a15">Next</a>() <span class="keyword">const</span>;
<a name="l00767"></a>00767     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a15">Next</a>();
<a name="l00769"></a>00769     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a17">Previous</a>() <span class="keyword">const</span>;
<a name="l00770"></a>00770     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#a17">Previous</a>();
<a name="l00771"></a>00771 
<a name="l00772"></a>00772     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rhs.<a class="code" href="classTiXmlAttribute.html#r1">name</a> == name; }
<a name="l00773"></a>00773     <span class="keywordtype">bool</span> operator&lt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword">  const </span>{ <span class="keywordflow">return</span> name &lt; rhs.<a class="code" href="classTiXmlAttribute.html#r1">name</a>; }
<a name="l00774"></a>00774     <span class="keywordtype">bool</span> operator&gt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword">  const </span>{ <span class="keywordflow">return</span> name &gt; rhs.<a class="code" href="classTiXmlAttribute.html#r1">name</a>; }
<a name="l00775"></a>00775 
<a name="l00776"></a>00776     <span class="comment">/*  Attribute parsing starts: first letter of the name</span>
<a name="l00777"></a>00777 <span class="comment">                         returns: the next char after the value end quote</span>
<a name="l00778"></a>00778 <span class="comment">    */</span>
<a name="l00779"></a>00779     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l00780"></a>00780 
<a name="l00781"></a>00781     <span class="comment">// Prints this Attribute to a FILE stream.</span>
<a name="l00782"></a>00782     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#a23">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l00783"></a>00783 
<a name="l00784"></a>00784     <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut( TIXML_OSTREAM * out ) <span class="keyword">const</span>;
<a name="l00785"></a>00785     <span class="comment">// [internal use]</span>
<a name="l00786"></a>00786     <span class="comment">// Set the document pointer so the attribute can report errors.</span>
<a name="l00787"></a>00787     <span class="keywordtype">void</span> SetDocument( <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* doc )  { document = doc; }
<a name="l00788"></a>00788 
<a name="l00789"></a>00789 <span class="keyword">private</span>:
<a name="l00790"></a>00790     <a class="code" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; );                <span class="comment">// not implemented.</span>
<a name="l00791"></a>00791     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; base );   <span class="comment">// not allowed.</span>
<a name="l00792"></a>00792 
<a name="l00793"></a>00793     <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*  document;   <span class="comment">// A pointer back to a document, for error reporting.</span>
<a name="l00794"></a>00794     TIXML_STRING name;
<a name="l00795"></a>00795     TIXML_STRING value;
<a name="l00796"></a>00796     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* prev;
<a name="l00797"></a>00797     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* next;
<a name="l00798"></a>00798 };
<a name="l00799"></a>00799 
<a name="l00800"></a>00800 
<a name="l00801"></a>00801 <span class="comment">/*  A class used to manage a group of attributes.</span>
<a name="l00802"></a>00802 <span class="comment">    It is only used internally, both by the ELEMENT and the DECLARATION.</span>
<a name="l00803"></a>00803 <span class="comment">    </span>
<a name="l00804"></a>00804 <span class="comment">    The set can be changed transparent to the Element and Declaration</span>
<a name="l00805"></a>00805 <span class="comment">    classes that use it, but NOT transparent to the Attribute</span>
<a name="l00806"></a>00806 <span class="comment">    which has to implement a next() and previous() method. Which makes</span>
<a name="l00807"></a>00807 <span class="comment">    it a bit problematic and prevents the use of STL.</span>
<a name="l00808"></a>00808 <span class="comment"></span>
<a name="l00809"></a>00809 <span class="comment">    This version is implemented with circular lists because:</span>
<a name="l00810"></a>00810 <span class="comment">        - I like circular lists</span>
<a name="l00811"></a>00811 <span class="comment">        - it demonstrates some independence from the (typical) doubly linked list.</span>
<a name="l00812"></a>00812 <span class="comment">*/</span>
<a name="l00813"></a>00813 <span class="keyword">class </span>TiXmlAttributeSet
<a name="l00814"></a>00814 {
<a name="l00815"></a>00815 <span class="keyword">public</span>:
<a name="l00816"></a>00816     TiXmlAttributeSet();
<a name="l00817"></a>00817     ~TiXmlAttributeSet();
<a name="l00818"></a>00818 
<a name="l00819"></a>00819     <span class="keywordtype">void</span> Add( <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* attribute );
<a name="l00820"></a>00820     <span class="keywordtype">void</span> Remove( <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* attribute );
<a name="l00821"></a>00821 
<a name="l00822"></a>00822     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* First()<span class="keyword">   const   </span>{ <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
<a name="l00823"></a>00823     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* First()                 { <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
<a name="l00824"></a>00824     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Last()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
<a name="l00825"></a>00825     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Last()                  { <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
<a name="l00826"></a>00826 
<a name="l00827"></a>00827     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>*   Find( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ) <span class="keyword">const</span>;
<a name="l00828"></a>00828     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Find( <span class="keyword">const</span> <span class="keywordtype">char</span> * name );
<a name="l00829"></a>00829 
<a name="l00830"></a>00830 <span class="keyword">private</span>:
<a name="l00831"></a>00831     <span class="comment">//*ME:  Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),</span>
<a name="l00832"></a>00832     <span class="comment">//*ME:  this class must be also use a hidden/disabled copy-constructor !!!</span>
<a name="l00833"></a>00833     TiXmlAttributeSet( <span class="keyword">const</span> TiXmlAttributeSet&amp; );  <span class="comment">// not allowed</span>
<a name="l00834"></a>00834     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> TiXmlAttributeSet&amp; ); <span class="comment">// not allowed (as TiXmlAttribute)</span>
<a name="l00835"></a>00835 
<a name="l00836"></a>00836     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a> sentinel;
<a name="l00837"></a>00837 };
<a name="l00838"></a>00838 
<a name="l00839"></a>00839 
<a name="l00844"></a><a class="code" href="classTiXmlElement.html">00844</a> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l00845"></a>00845 {
<a name="l00846"></a>00846 <span class="keyword">public</span>:
<a name="l00848"></a>00848     <a class="code" href="classTiXmlElement.html#a0">TiXmlElement</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * in_value);
<a name="l00849"></a>00849 
<a name="l00850"></a>00850 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00851"></a>00851 <span class="preprocessor"></span>
<a name="l00852"></a>00852     <a class="code" href="classTiXmlElement.html#a0">TiXmlElement</a>( <span class="keyword">const</span> std::string&amp; _value );
<a name="l00853"></a>00853 <span class="preprocessor">    #endif</span>
<a name="l00854"></a>00854 <span class="preprocessor"></span>
<a name="l00855"></a>00855     <a class="code" href="classTiXmlElement.html#a0">TiXmlElement</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; );
<a name="l00856"></a>00856 
<a name="l00857"></a>00857     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; base );
<a name="l00858"></a>00858 
<a name="l00859"></a>00859     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlElement.html">TiXmlElement</a>();
<a name="l00860"></a>00860 
<a name="l00864"></a>00864     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name ) <span class="keyword">const</span>;
<a name="l00865"></a>00865 
<a name="l00872"></a>00872     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
<a name="l00873"></a>00873 
<a name="l00880"></a>00880     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
<a name="l00881"></a>00881 
<a name="l00889"></a>00889     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a8">QueryIntAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
<a name="l00891"></a>00891     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a9">QueryDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
<a name="l00893"></a><a class="code" href="classTiXmlElement.html#a10">00893</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a10">QueryFloatAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">float</span>* _value )<span class="keyword"> const </span>{
<a name="l00894"></a>00894         <span class="keywordtype">double</span> d;
<a name="l00895"></a>00895         <span class="keywordtype">int</span> result = <a class="code" href="classTiXmlElement.html#a9">QueryDoubleAttribute</a>( name, &amp;d );
<a name="l00896"></a>00896         <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) {
<a name="l00897"></a>00897             *_value = (float)d;
<a name="l00898"></a>00898         }
<a name="l00899"></a>00899         <span class="keywordflow">return</span> result;
<a name="l00900"></a>00900     }
<a name="l00901"></a>00901 
<a name="l00905"></a>00905     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value );
<a name="l00906"></a>00906 
<a name="l00907"></a>00907 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00908"></a>00908 <span class="preprocessor"></span>    <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> std::string&amp; name )<span class="keyword"> const              </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( name.c_str() ); }
<a name="l00909"></a>00909     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* i )<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( name.c_str(), i ); }
<a name="l00910"></a>00910     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* d )<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlElement.html#a5">Attribute</a>( name.c_str(), d ); }
<a name="l00911"></a>00911     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a8">QueryIntAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlElement.html#a8">QueryIntAttribute</a>( name.c_str(), _value ); }
<a name="l00912"></a>00912     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a9">QueryDoubleAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* _value )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlElement.html#a9">QueryDoubleAttribute</a>( name.c_str(), _value ); }
<a name="l00913"></a>00913 
<a name="l00915"></a><a class="code" href="classTiXmlElement.html#a17">00915</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::string&amp; _value ) 
<a name="l00916"></a>00916     {   
<a name="l00917"></a>00917         StringToBuffer n( name );
<a name="l00918"></a>00918         StringToBuffer v( _value );
<a name="l00919"></a>00919         <span class="keywordflow">if</span> ( n.buffer &amp;&amp; v.buffer )
<a name="l00920"></a>00920             <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a> (n.buffer, v.buffer ); 
<a name="l00921"></a>00921     }   
<a name="l00923"></a>00923     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span> _value )    
<a name="l00924"></a>00924     {   
<a name="l00925"></a>00925         StringToBuffer n( name );
<a name="l00926"></a>00926         <span class="keywordflow">if</span> ( n.buffer )
<a name="l00927"></a>00927             <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a> (n.buffer, _value);    
<a name="l00928"></a>00928     }   
<a name="l00929"></a>00929 <span class="preprocessor">    #endif</span>
<a name="l00930"></a>00930 <span class="preprocessor"></span>
<a name="l00934"></a>00934     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a11">SetAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">int</span> value );
<a name="l00935"></a>00935 
<a name="l00939"></a>00939     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a20">SetDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">double</span> value );
<a name="l00940"></a>00940 
<a name="l00943"></a>00943     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a21">RemoveAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name );
<a name="l00944"></a>00944 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l00945"></a><a class="code" href="classTiXmlElement.html#a22">00945</a> <span class="preprocessor"></span>    <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a21">RemoveAttribute</a>( <span class="keyword">const</span> std::string&amp; name ) {   <a class="code" href="classTiXmlElement.html#a21">RemoveAttribute</a> (name.c_str ());    }   
<a name="l00946"></a>00946 <span class="preprocessor">    #endif</span>
<a name="l00947"></a>00947 <span class="preprocessor"></span>
<a name="l00948"></a><a class="code" href="classTiXmlElement.html#a23">00948</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a23">FirstAttribute</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> attributeSet.First(); }        
<a name="l00949"></a>00949     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a23">FirstAttribute</a>()                { <span class="keywordflow">return</span> attributeSet.First(); }
<a name="l00950"></a><a class="code" href="classTiXmlElement.html#a25">00950</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a25">LastAttribute</a>()<span class="keyword">   const   </span>{ <span class="keywordflow">return</span> attributeSet.Last(); }     
<a name="l00951"></a>00951     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#a25">LastAttribute</a>()                 { <span class="keywordflow">return</span> attributeSet.Last(); }
<a name="l00952"></a>00952 
<a name="l00985"></a>00985     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#a27">GetText</a>() <span class="keyword">const</span>;
<a name="l00986"></a>00986 
<a name="l00988"></a>00988     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlElement.html#a28">Clone</a>() <span class="keyword">const</span>;
<a name="l00989"></a>00989     <span class="comment">// Print the Element to a FILE stream.</span>
<a name="l00990"></a>00990     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#a29">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l00991"></a>00991 
<a name="l00992"></a>00992     <span class="comment">/*  Attribtue parsing starts: next char past '&lt;'</span>
<a name="l00993"></a>00993 <span class="comment">                         returns: next char past '&gt;'</span>
<a name="l00994"></a>00994 <span class="comment">    */</span>
<a name="l00995"></a>00995     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l00996"></a>00996 
<a name="l00997"></a>00997 <span class="keyword">protected</span>:
<a name="l00998"></a>00998 
<a name="l00999"></a>00999     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* target ) <span class="keyword">const</span>;
<a name="l01000"></a>01000     <span class="keywordtype">void</span> ClearThis();   <span class="comment">// like clear, but initializes 'this' object as well</span>
<a name="l01001"></a>01001 
<a name="l01002"></a>01002     <span class="comment">// Used to be public [internal use]</span>
<a name="l01003"></a>01003 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01004"></a>01004 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01005"></a>01005 <span class="preprocessor">    #endif</span>
<a name="l01006"></a>01006 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut( TIXML_OSTREAM * out ) <span class="keyword">const</span>;
<a name="l01007"></a>01007 
<a name="l01008"></a>01008     <span class="comment">/*  [internal use]</span>
<a name="l01009"></a>01009 <span class="comment">        Reads the "value" of the element -- another element, or text.</span>
<a name="l01010"></a>01010 <span class="comment">        This should terminate with the current end tag.</span>
<a name="l01011"></a>01011 <span class="comment">    */</span>
<a name="l01012"></a>01012     <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadValue( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
<a name="l01013"></a>01013 
<a name="l01014"></a>01014 <span class="keyword">private</span>:
<a name="l01015"></a>01015 
<a name="l01016"></a>01016     TiXmlAttributeSet attributeSet;
<a name="l01017"></a>01017 };
<a name="l01018"></a>01018 
<a name="l01019"></a>01019 
<a name="l01022"></a><a class="code" href="classTiXmlComment.html">01022</a> <span class="keyword">class </span><a class="code" href="classTiXmlComment.html">TiXmlComment</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l01023"></a>01023 {
<a name="l01024"></a>01024 <span class="keyword">public</span>:
<a name="l01026"></a><a class="code" href="classTiXmlComment.html#a0">01026</a>     <a class="code" href="classTiXmlComment.html#a0">TiXmlComment</a>() : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::COMMENT ) {}
<a name="l01027"></a>01027     <a class="code" href="classTiXmlComment.html#a0">TiXmlComment</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; );
<a name="l01028"></a>01028     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; base );
<a name="l01029"></a>01029 
<a name="l01030"></a>01030     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html">TiXmlComment</a>() {}
<a name="l01031"></a>01031 
<a name="l01033"></a>01033     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlComment.html#a4">Clone</a>() <span class="keyword">const</span>;
<a name="l01035"></a>01035     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlComment.html#a5">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01036"></a>01036 
<a name="l01037"></a>01037     <span class="comment">/*  Attribtue parsing starts: at the ! of the !--</span>
<a name="l01038"></a>01038 <span class="comment">                         returns: next char past '&gt;'</span>
<a name="l01039"></a>01039 <span class="comment">    */</span>
<a name="l01040"></a>01040     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01041"></a>01041 
<a name="l01042"></a>01042 <span class="keyword">protected</span>:
<a name="l01043"></a>01043     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlComment.html">TiXmlComment</a>* target ) <span class="keyword">const</span>;
<a name="l01044"></a>01044 
<a name="l01045"></a>01045     <span class="comment">// used to be public</span>
<a name="l01046"></a>01046 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01047"></a>01047 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01048"></a>01048 <span class="preprocessor">    #endif</span>
<a name="l01049"></a>01049 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut( TIXML_OSTREAM * out ) <span class="keyword">const</span>;
<a name="l01050"></a>01050 
<a name="l01051"></a>01051 <span class="keyword">private</span>:
<a name="l01052"></a>01052 
<a name="l01053"></a>01053 };
<a name="l01054"></a>01054 
<a name="l01055"></a>01055 
<a name="l01061"></a><a class="code" href="classTiXmlText.html">01061</a> <span class="keyword">class </span><a class="code" href="classTiXmlText.html">TiXmlText</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l01062"></a>01062 {
<a name="l01063"></a>01063     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
<a name="l01064"></a>01064 <span class="keyword">public</span>:
<a name="l01069"></a><a class="code" href="classTiXmlText.html#a0">01069</a>     <a class="code" href="classTiXmlText.html#a0">TiXmlText</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * initValue ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html">TiXmlNode</a>::TEXT)
<a name="l01070"></a>01070     {
<a name="l01071"></a>01071         <a class="code" href="classTiXmlNode.html#a3">SetValue</a>( initValue );
<a name="l01072"></a>01072         cdata = <span class="keyword">false</span>;
<a name="l01073"></a>01073     }
<a name="l01074"></a>01074     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html">TiXmlText</a>() {}
<a name="l01075"></a>01075 
<a name="l01076"></a>01076 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01077"></a>01077 <span class="preprocessor"></span>
<a name="l01078"></a><a class="code" href="classTiXmlText.html#a2">01078</a>     <a class="code" href="classTiXmlText.html#a0">TiXmlText</a>( <span class="keyword">const</span> std::string&amp; initValue ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html">TiXmlNode</a>::TEXT)
<a name="l01079"></a>01079     {
<a name="l01080"></a>01080         <a class="code" href="classTiXmlNode.html#a3">SetValue</a>( initValue );
<a name="l01081"></a>01081         cdata = <span class="keyword">false</span>;
<a name="l01082"></a>01082     }
<a name="l01083"></a>01083 <span class="preprocessor">    #endif</span>
<a name="l01084"></a>01084 <span class="preprocessor"></span>
<a name="l01085"></a>01085     <a class="code" href="classTiXmlText.html#a0">TiXmlText</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; copy ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::TEXT )   { copy.<a class="code" href="classTiXmlText.html#b1">CopyTo</a>( <span class="keyword">this</span> ); }
<a name="l01086"></a>01086     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; base )                             { base.<a class="code" href="classTiXmlText.html#b1">CopyTo</a>( <span class="keyword">this</span> ); }
<a name="l01087"></a>01087 
<a name="l01089"></a>01089     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#a5">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01090"></a>01090 
<a name="l01092"></a><a class="code" href="classTiXmlText.html#a6">01092</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#a6">CDATA</a>()                    { <span class="keywordflow">return</span> cdata; }
<a name="l01094"></a><a class="code" href="classTiXmlText.html#a7">01094</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#a7">SetCDATA</a>( <span class="keywordtype">bool</span> _cdata )    { cdata = _cdata; }
<a name="l01095"></a>01095 
<a name="l01096"></a>01096     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01097"></a>01097 
<a name="l01098"></a>01098 <span class="keyword">protected</span> :
<a name="l01100"></a>01100     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlText.html#b0">Clone</a>() <span class="keyword">const</span>;
<a name="l01101"></a>01101     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlText.html">TiXmlText</a>* target ) <span class="keyword">const</span>;
<a name="l01102"></a>01102 
<a name="l01103"></a>01103     <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut ( TIXML_OSTREAM * out ) <span class="keyword">const</span>;
<a name="l01104"></a>01104     <span class="keywordtype">bool</span> Blank() <span class="keyword">const</span>; <span class="comment">// returns true if all white space and new lines</span>
<a name="l01105"></a>01105     <span class="comment">// [internal use]</span>
<a name="l01106"></a>01106 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01107"></a>01107 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01108"></a>01108 <span class="preprocessor">    #endif</span>
<a name="l01109"></a>01109 <span class="preprocessor"></span>
<a name="l01110"></a>01110 <span class="keyword">private</span>:
<a name="l01111"></a>01111     <span class="keywordtype">bool</span> cdata;         <span class="comment">// true if this should be input and output as a CDATA style text element</span>
<a name="l01112"></a>01112 };
<a name="l01113"></a>01113 
<a name="l01114"></a>01114 
<a name="l01128"></a><a class="code" href="classTiXmlDeclaration.html">01128</a> <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l01129"></a>01129 {
<a name="l01130"></a>01130 <span class="keyword">public</span>:
<a name="l01132"></a><a class="code" href="classTiXmlDeclaration.html#a0">01132</a>     <a class="code" href="classTiXmlDeclaration.html#a0">TiXmlDeclaration</a>()   : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::DECLARATION ) {}
<a name="l01133"></a>01133 
<a name="l01134"></a>01134 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
<a name="l01135"></a>01135 <span class="preprocessor"></span>
<a name="l01136"></a>01136     <a class="code" href="classTiXmlDeclaration.html#a0">TiXmlDeclaration</a>(   <span class="keyword">const</span> std::string&amp; _version,
<a name="l01137"></a>01137                         <span class="keyword">const</span> std::string&amp; _encoding,
<a name="l01138"></a>01138                         <span class="keyword">const</span> std::string&amp; _standalone );
<a name="l01139"></a>01139 <span class="preprocessor">#endif</span>
<a name="l01140"></a>01140 <span class="preprocessor"></span>
<a name="l01142"></a>01142     <a class="code" href="classTiXmlDeclaration.html#a0">TiXmlDeclaration</a>(   <span class="keyword">const</span> <span class="keywordtype">char</span>* _version,
<a name="l01143"></a>01143                         <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding,
<a name="l01144"></a>01144                         <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone );
<a name="l01145"></a>01145 
<a name="l01146"></a>01146     <a class="code" href="classTiXmlDeclaration.html#a0">TiXmlDeclaration</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; copy );
<a name="l01147"></a>01147     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; copy );
<a name="l01148"></a>01148 
<a name="l01149"></a>01149     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>() {}
<a name="l01150"></a>01150 
<a name="l01152"></a><a class="code" href="classTiXmlDeclaration.html#a6">01152</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a6">Version</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> version.c_str (); }
<a name="l01154"></a><a class="code" href="classTiXmlDeclaration.html#a7">01154</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a7">Encoding</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> encoding.c_str (); }
<a name="l01156"></a><a class="code" href="classTiXmlDeclaration.html#a8">01156</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#a8">Standalone</a>()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> standalone.c_str (); }
<a name="l01157"></a>01157 
<a name="l01159"></a>01159     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlDeclaration.html#a9">Clone</a>() <span class="keyword">const</span>;
<a name="l01161"></a>01161     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDeclaration.html#a10">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01162"></a>01162 
<a name="l01163"></a>01163     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01164"></a>01164 
<a name="l01165"></a>01165 <span class="keyword">protected</span>:
<a name="l01166"></a>01166     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* target ) <span class="keyword">const</span>;
<a name="l01167"></a>01167     <span class="comment">// used to be public</span>
<a name="l01168"></a>01168 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01169"></a>01169 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01170"></a>01170 <span class="preprocessor">    #endif</span>
<a name="l01171"></a>01171 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut ( TIXML_OSTREAM * out) <span class="keyword">const</span>;
<a name="l01172"></a>01172 
<a name="l01173"></a>01173 <span class="keyword">private</span>:
<a name="l01174"></a>01174 
<a name="l01175"></a>01175     TIXML_STRING version;
<a name="l01176"></a>01176     TIXML_STRING encoding;
<a name="l01177"></a>01177     TIXML_STRING standalone;
<a name="l01178"></a>01178 };
<a name="l01179"></a>01179 
<a name="l01180"></a>01180 
<a name="l01188"></a><a class="code" href="classTiXmlUnknown.html">01188</a> <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l01189"></a>01189 {
<a name="l01190"></a>01190 <span class="keyword">public</span>:
<a name="l01191"></a>01191     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>() : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( TiXmlNode::UNKNOWN )    {}
<a name="l01192"></a>01192     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>() {}
<a name="l01193"></a>01193 
<a name="l01194"></a>01194     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; copy ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( TiXmlNode::UNKNOWN )      { copy.<a class="code" href="classTiXmlUnknown.html#b0">CopyTo</a>( <span class="keyword">this</span> ); }
<a name="l01195"></a>01195     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; copy )                                      { copy.<a class="code" href="classTiXmlUnknown.html#b0">CopyTo</a>( <span class="keyword">this</span> ); }
<a name="l01196"></a>01196 
<a name="l01198"></a>01198     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlUnknown.html#a4">Clone</a>() <span class="keyword">const</span>;
<a name="l01200"></a>01200     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlUnknown.html#a5">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
<a name="l01201"></a>01201 
<a name="l01202"></a>01202     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
<a name="l01203"></a>01203 
<a name="l01204"></a>01204 <span class="keyword">protected</span>:
<a name="l01205"></a>01205     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>* target ) <span class="keyword">const</span>;
<a name="l01206"></a>01206 
<a name="l01207"></a>01207 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01208"></a>01208 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01209"></a>01209 <span class="preprocessor">    #endif</span>
<a name="l01210"></a>01210 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut ( TIXML_OSTREAM * out ) <span class="keyword">const</span>;
<a name="l01211"></a>01211 
<a name="l01212"></a>01212 <span class="keyword">private</span>:
<a name="l01213"></a>01213 
<a name="l01214"></a>01214 };
<a name="l01215"></a>01215 
<a name="l01216"></a>01216 
<a name="l01221"></a><a class="code" href="classTiXmlDocument.html">01221</a> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
<a name="l01222"></a>01222 {
<a name="l01223"></a>01223 <span class="keyword">public</span>:
<a name="l01225"></a>01225     <a class="code" href="classTiXmlDocument.html#a0">TiXmlDocument</a>();
<a name="l01227"></a>01227     <a class="code" href="classTiXmlDocument.html#a0">TiXmlDocument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * documentName );
<a name="l01228"></a>01228 
<a name="l01229"></a>01229 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01230"></a>01230 <span class="preprocessor"></span>
<a name="l01231"></a>01231     <a class="code" href="classTiXmlDocument.html#a0">TiXmlDocument</a>( <span class="keyword">const</span> std::string&amp; documentName );
<a name="l01232"></a>01232 <span class="preprocessor">    #endif</span>
<a name="l01233"></a>01233 <span class="preprocessor"></span>
<a name="l01234"></a>01234     <a class="code" href="classTiXmlDocument.html#a0">TiXmlDocument</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; copy );
<a name="l01235"></a>01235     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; copy );
<a name="l01236"></a>01236 
<a name="l01237"></a>01237     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>() {}
<a name="l01238"></a>01238 
<a name="l01243"></a>01243     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6">LoadFile</a>( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01245"></a>01245     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a7">SaveFile</a>() <span class="keyword">const</span>;
<a name="l01247"></a>01247     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6">LoadFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01249"></a>01249     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a7">SaveFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename ) <span class="keyword">const</span>;
<a name="l01250"></a>01250 
<a name="l01251"></a>01251 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01252"></a><a class="code" href="classTiXmlDocument.html#a10">01252</a> <span class="preprocessor"></span>    <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a6">LoadFile</a>( <span class="keyword">const</span> std::string&amp; filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )           
<a name="l01253"></a>01253     {
<a name="l01254"></a>01254         StringToBuffer f( filename );
<a name="l01255"></a>01255         <span class="keywordflow">return</span> ( f.buffer &amp;&amp; LoadFile( f.buffer, encoding ));
<a name="l01256"></a>01256     }
<a name="l01257"></a><a class="code" href="classTiXmlDocument.html#a11">01257</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a7">SaveFile</a>( <span class="keyword">const</span> std::string&amp; filename ) <span class="keyword">const</span>      
<a name="l01258"></a>01258     {
<a name="l01259"></a>01259         StringToBuffer f( filename );
<a name="l01260"></a>01260         <span class="keywordflow">return</span> ( f.buffer &amp;&amp; SaveFile( f.buffer ));
<a name="l01261"></a>01261     }
<a name="l01262"></a>01262 <span class="preprocessor">    #endif</span>
<a name="l01263"></a>01263 <span class="preprocessor"></span>
<a name="l01268"></a>01268     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#a12">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
<a name="l01269"></a>01269 
<a name="l01274"></a><a class="code" href="classTiXmlDocument.html#a13">01274</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#a13">RootElement</a>()<span class="keyword"> const     </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>(); }
<a name="l01275"></a>01275     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#a13">RootElement</a>()                 { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#a50">FirstChildElement</a>(); }
<a name="l01276"></a>01276 
<a name="l01282"></a><a class="code" href="classTiXmlDocument.html#a15">01282</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a15">Error</a>()<span class="keyword"> const                      </span>{ <span class="keywordflow">return</span> error; }
<a name="l01283"></a>01283 
<a name="l01285"></a><a class="code" href="classTiXmlDocument.html#a16">01285</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classTiXmlDocument.html#a16">ErrorDesc</a>()<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> errorDesc.c_str (); }
<a name="l01286"></a>01286 
<a name="l01290"></a><a class="code" href="classTiXmlDocument.html#a17">01290</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#a17">ErrorId</a>()<span class="keyword">   const               </span>{ <span class="keywordflow">return</span> errorId; }
<a name="l01291"></a>01291 
<a name="l01299"></a><a class="code" href="classTiXmlDocument.html#a18">01299</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#a18">ErrorRow</a>()  { <span class="keywordflow">return</span> errorLocation.row+1; }
<a name="l01300"></a><a class="code" href="classTiXmlDocument.html#a19">01300</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#a19">ErrorCol</a>()  { <span class="keywordflow">return</span> errorLocation.col+1; } 
<a name="l01301"></a>01301 
<a name="l01326"></a><a class="code" href="classTiXmlDocument.html#a20">01326</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a20">SetTabSize</a>( <span class="keywordtype">int</span> _tabsize )     { tabsize = _tabsize; }
<a name="l01327"></a>01327 
<a name="l01328"></a>01328     <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; }
<a name="l01329"></a>01329 
<a name="l01333"></a><a class="code" href="classTiXmlDocument.html#a22">01333</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a22">ClearError</a>()                       {   error = <span class="keyword">false</span>; 
<a name="l01334"></a>01334                                                 errorId = 0; 
<a name="l01335"></a>01335                                                 errorDesc = <span class="stringliteral">""</span>; 
<a name="l01336"></a>01336                                                 errorLocation.row = errorLocation.col = 0; 
<a name="l01337"></a>01337                                                 <span class="comment">//errorLocation.last = 0; </span>
<a name="l01338"></a>01338                                             }
<a name="l01339"></a>01339 
<a name="l01341"></a><a class="code" href="classTiXmlDocument.html#a23">01341</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a23">Print</a>()<span class="keyword"> const                      </span>{ <a class="code" href="classTiXmlDocument.html#a23">Print</a>( stdout, 0 ); }
<a name="l01342"></a>01342 
<a name="l01344"></a>01344     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#a23">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>;
<a name="l01345"></a>01345     <span class="comment">// [internal use]</span>
<a name="l01346"></a>01346     <span class="keywordtype">void</span> SetError( <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
<a name="l01347"></a>01347 
<a name="l01348"></a>01348 <span class="keyword">protected</span> :
<a name="l01349"></a>01349     <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamOut ( TIXML_OSTREAM * out) <span class="keyword">const</span>;
<a name="l01350"></a>01350     <span class="comment">// [internal use]</span>
<a name="l01351"></a>01351     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlDocument.html#b1">Clone</a>() <span class="keyword">const</span>;
<a name="l01352"></a>01352 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01353"></a>01353 <span class="preprocessor"></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag );
<a name="l01354"></a>01354 <span class="preprocessor">    #endif</span>
<a name="l01355"></a>01355 <span class="preprocessor"></span>
<a name="l01356"></a>01356 <span class="keyword">private</span>:
<a name="l01357"></a>01357     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* target ) <span class="keyword">const</span>;
<a name="l01358"></a>01358 
<a name="l01359"></a>01359     <span class="keywordtype">bool</span> error;
<a name="l01360"></a>01360     <span class="keywordtype">int</span>  errorId;
<a name="l01361"></a>01361     TIXML_STRING errorDesc;
<a name="l01362"></a>01362     <span class="keywordtype">int</span> tabsize;
<a name="l01363"></a>01363     TiXmlCursor errorLocation;
<a name="l01364"></a>01364     <span class="keywordtype">bool</span> useMicrosoftBOM;       <span class="comment">// the UTF-8 BOM were found when read. Note this, and try to write.</span>
<a name="l01365"></a>01365 };
<a name="l01366"></a>01366 
<a name="l01367"></a>01367 
<a name="l01448"></a><a class="code" href="classTiXmlHandle.html">01448</a> <span class="keyword">class </span><a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>
<a name="l01449"></a>01449 {
<a name="l01450"></a>01450 <span class="keyword">public</span>:
<a name="l01452"></a><a class="code" href="classTiXmlHandle.html#a0">01452</a>     <a class="code" href="classTiXmlHandle.html#a0">TiXmlHandle</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* _node )                 { this-&gt;node = _node; }
<a name="l01454"></a><a class="code" href="classTiXmlHandle.html#a1">01454</a>     <a class="code" href="classTiXmlHandle.html#a0">TiXmlHandle</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>&amp; ref )           { this-&gt;node = ref.<a class="code" href="classTiXmlHandle.html#r0">node</a>; }
<a name="l01455"></a>01455     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>&amp; ref ) { this-&gt;node = ref.<a class="code" href="classTiXmlHandle.html#r0">node</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
<a name="l01456"></a>01456 
<a name="l01458"></a>01458     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a3">FirstChild</a>() <span class="keyword">const</span>;
<a name="l01460"></a>01460     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a3">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l01462"></a>01462     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a5">FirstChildElement</a>() <span class="keyword">const</span>;
<a name="l01464"></a>01464     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a5">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
<a name="l01465"></a>01465 
<a name="l01469"></a>01469     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a7">Child</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01473"></a>01473     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a7">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01478"></a>01478     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a9">ChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01483"></a>01483     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a9">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
<a name="l01484"></a>01484 
<a name="l01485"></a>01485 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
<a name="l01486"></a>01486 <span class="preprocessor"></span>    <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a3">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#a3">FirstChild</a>( _value.c_str() ); }
<a name="l01487"></a>01487     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a5">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#a5">FirstChildElement</a>( _value.c_str() ); }
<a name="l01488"></a>01488 
<a name="l01489"></a>01489     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a7">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#a7">Child</a>( _value.c_str(), index ); }
<a name="l01490"></a>01490     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#a9">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#a9">ChildElement</a>( _value.c_str(), index ); }
<a name="l01491"></a>01491 <span class="preprocessor">    #endif</span>
<a name="l01492"></a>01492 <span class="preprocessor"></span>
<a name="l01494"></a><a class="code" href="classTiXmlHandle.html#a15">01494</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#a15">Node</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> node; } 
<a name="l01496"></a><a class="code" href="classTiXmlHandle.html#a16">01496</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#a16">Element</a>()<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#a61">ToElement</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#a61">ToElement</a>() : 0 ); }
<a name="l01498"></a><a class="code" href="classTiXmlHandle.html#a17">01498</a>     <a class="code" href="classTiXmlText.html">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#a17">Text</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#a64">ToText</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#a64">ToText</a>() : 0 ); }
<a name="l01500"></a><a class="code" href="classTiXmlHandle.html#a18">01500</a>     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#a18">Unknown</a>()<span class="keyword"> const           </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#a63">ToUnknown</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#a63">ToUnknown</a>() : 0 ); }
<a name="l01501"></a>01501 
<a name="l01502"></a>01502 <span class="keyword">private</span>:
<a name="l01503"></a>01503     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* node;
<a name="l01504"></a>01504 };
<a name="l01505"></a>01505 
<a name="l01506"></a>01506 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l01507"></a>01507 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>
<a name="l01508"></a>01508 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01509"></a>01509 <span class="preprocessor"></span>
<a name="l01510"></a>01510 <span class="preprocessor">#endif</span>
<a name="l01511"></a>01511 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 14:15:30 2005 for TinyXml by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>