kbe/src/lib/dependencies/tinyxml/docs/tinyxml_8h_source.html
00001/\*00002www.sourceforge.net/projects/tinyxml00003Original code by Lee Thomason (www.grinninglizard.com)0000400005This software is provided 'as-is', without any express or implied00006warranty. In no event will the authors be held liable for any00007damages arising from the use of this software.0000800009Permission is granted to anyone to use this software for any00010purpose, including commercial applications, and to alter it and00011redistribute it freely, subject to the following restrictions:00012000131. The origin of this software must not be misrepresented; you must00014not claim that you wrote the original software. If you use this00015software in a product, an acknowledgment in the product documentation00016would be appreciated but is not required.00017000182. Altered source versions must be plainly marked as such, and00019must not be misrepresented as being the original software.00020000213. This notice may not be removed or altered from any source00022distribution.00023\*/00024
00025
00026#ifndef TINYXML\_INCLUDED00027#define TINYXML\_INCLUDED0002800029#ifdef \_MSC\_VER00030#pragma warning( push )00031#pragma warning( disable : 4530 )00032#pragma warning( disable : 4786 )00033#endif0003400035#include \<ctype.h\>00036#include \<stdio.h\>00037#include \<stdlib.h\>00038#include \<string.h\>00039#include \<assert.h\>00040
00041// Help out windows:00042#if defined( \_DEBUG ) && !defined( DEBUG )00043#define DEBUG00044#endif0004500046#ifdef TIXML\_USE\_STL00047 #include \<string\>00048 #include \<iostream\>00049 #include \<sstream\>00050 #define TIXML\_STRING std::string00051#else00052 #include "tinystr.h"00053 #define TIXML\_STRING TiXmlString00054#endif0005500056// Deprecated library function hell. Compilers want to use the00057// new safe versions. This probably doesn't fully address the problem,00058// but it gets closer. There are too many compilers for me to fully00059// test. If you get compilation troubles, undefine TIXML\_SAFE00060#define TIXML\_SAFE0006100062#ifdef TIXML\_SAFE00063 #if defined(\_MSC\_VER) && (\_MSC\_VER \>= 1400 )00064// Microsoft visual studio, version 2005 and higher.00065 #define TIXML\_SNPRINTF \_snprintf\_s00066 #define TIXML\_SSCANF sscanf\_s00067 #elif defined(\_MSC\_VER) && (\_MSC\_VER \>= 1200 )00068// Microsoft visual studio, version 6 and higher.00069//#pragma message( "Using \_sn\* functions." )00070 #define TIXML\_SNPRINTF \_snprintf00071 #define TIXML\_SSCANF sscanf00072 #elif defined(\_\_GNUC\_\_) && (\_\_GNUC\_\_ \>= 3 )00073// GCC version 3 and higher.s00074//#warning( "Using sn\* functions." )00075 #define TIXML\_SNPRINTF snprintf00076 #define TIXML\_SSCANF sscanf00077 #else00078 #define TIXML\_SNPRINTF snprintf00079 #define TIXML\_SSCANF sscanf00080 #endif00081#endif 0008200083class [TiXmlDocument](classTiXmlDocument.html "Always the top level node.");
00084class [TiXmlElement](classTiXmlElement.html "The element is a container class.");
00085class [TiXmlComment](classTiXmlComment.html "An XML comment.");
00086class [TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.");
00087class [TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.");
00088class [TiXmlText](classTiXmlText.html "XML text.");
00089class [TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.");
00090class TiXmlParsingData;
00091
00092constintTIXML_MAJOR_VERSION = 2;
00093constintTIXML_MINOR_VERSION = 6;
00094constintTIXML_PATCH_VERSION = 2;
00095
00096/\* Internal structure for tracking location of items 00097 in the XML file.00098\*/00099struct TiXmlCursor
00100 {
00101 TiXmlCursor() { Clear(); }
00102voidClear() { row = col = -1; }
00103
00104introw;// 0 based.00105intcol;// 0 based.00106 };
00107
00108[00128](classTiXmlVisitor.html)class [TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")00129 {
00130public:
00131virtual~[TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")() {}
00132[00134](classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0)virtualbool[VisitEnter](classTiXmlVisitor.html#a07baecb52dd7d8716ae2a48ad0956ee0 "Visit a document.")(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")&/\*doc\*/) {returntrue; }[00136](classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad)virtualbool[VisitExit](classTiXmlVisitor.html#aa0ade4f27087447e93974e975c3246ad "Visit a document.")(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")&/\*doc\*/) {returntrue; }
00137[00139](classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff)virtualbool[VisitEnter](classTiXmlVisitor.html#af6c6178ffa517bbdba95d70490875fff "Visit an element.")(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")&/\*element\*/,const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*/\*firstAttribute\*/) {returntrue; }[00141](classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c)virtualbool[VisitExit](classTiXmlVisitor.html#aec2b1f8116226d52f3a1b95dafd3a32c "Visit an element.")(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")&/\*element\*/) {returntrue; }
00142[00144](classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19)virtualbool[Visit](classTiXmlVisitor.html#afad71c71ce6473fb9b4b64cd92de4a19 "Visit a declaration.")(const[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")&/\*declaration\*/) {returntrue; }[00146](classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5)virtualbool[Visit](classTiXmlVisitor.html#a399b8ebca5cd14664974a32d2ce029e5 "Visit a text node.")(const[TiXmlText](classTiXmlText.html "XML text.")&/\*text\*/) {returntrue; }[00148](classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2)virtualbool[Visit](classTiXmlVisitor.html#a53a60e7a528627b31af3161972cc7fa2 "Visit a comment node.")(const[TiXmlComment](classTiXmlComment.html "An XML comment.")&/\*comment\*/) {returntrue; }[00150](classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28)virtualbool[Visit](classTiXmlVisitor.html#a7e284d607d275c51dac1adb58159ce28 "Visit an unknown node.")(const[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")&/\*unknown\*/) {returntrue; }
00151 };
00152
00153// Only used by Attribute::Query functions00154enum00155 {
00156 TIXML_SUCCESS,
00157 TIXML_NO_ATTRIBUTE,
00158 TIXML_WRONG_TYPE
00159 };
00160
00161
00162// Used by the parsing routines.00163enumTiXmlEncoding
00164 {
00165 TIXML_ENCODING_UNKNOWN,
00166 TIXML_ENCODING_UTF8,
00167 TIXML_ENCODING_LEGACY
00168 };
00169
00170constTiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
00171[00194](classTiXmlBase.html)class [TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")00195 {
00196friendclass [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.");
00197friendclass [TiXmlElement](classTiXmlElement.html "The element is a container class.");
00198friendclass [TiXmlDocument](classTiXmlDocument.html "Always the top level node.");
00199
00200public:
00201[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")() :[userData](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c "Field containing a generic user pointer.")(0) {}
00202virtual~[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")() {}
00203
00213virtualvoid[Print](classTiXmlBase.html#a0de56b3f2ef14c65091a3b916437b512 "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth )const= 0;
00214[00221](classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1)staticvoid[SetCondenseWhiteSpace](classTiXmlBase.html#a0f799ec645bfb8d8a969e83478f379c1 "The world does not agree on whether white space should be kept or not.")(boolcondense ) { condenseWhiteSpace = condense; }
00222[00224](classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438)staticbool[IsWhiteSpaceCondensed](classTiXmlBase.html#ad4b1472531c647a25b1840a87ae42438 "Return the current white space setting.")() {returncondenseWhiteSpace; }
00225[00244](classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853)int[Row](classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853 "Return the position, in the original source file, of this node or attribute.")() const {returnlocation.row + 1; }[00245](classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003)int[Column](classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003 "See Row().")() const {returnlocation.col + 1; }
00246[00247](classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d)void[SetUserData](classTiXmlBase.html#ac6b3e0f790930d4970ec30764e937b5d "Set a pointer to arbitrary user data.")(void* user ) {[userData](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c "Field containing a generic user pointer.")= user; }[00248](classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17)void*[GetUserData](classTiXmlBase.html#a6559a530ca6763fc301a14d77ed28c17 "Get a pointer to arbitrary user data.")() {return[userData](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c "Field containing a generic user pointer."); }[00249](classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4)constvoid*[GetUserData](classTiXmlBase.html#ad0120210e4680ef2088601753ce0ede4 "Get a pointer to arbitrary user data.")() const {return[userData](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c "Field containing a generic user pointer."); }
00250
00251// Table that returs, for a given lead byte, the total number of bytes00252// in the UTF-8 sequence.00253staticconstintutf8ByteTable[256];
00254
00255virtualconstchar*[Parse](classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378 "Parse the given null terminated block of xml data.")(constchar* p,
00256 TiXmlParsingData* data,
00257 TiXmlEncoding encoding/\*= TIXML\_ENCODING\_UNKNOWN \*/) = 0;
00258
00262staticvoid[EncodeString](classTiXmlBase.html#a6bd8c315c1acb09e34107b8736505948 "Expands entities in a string.")(constTIXML_STRING& str, TIXML_STRING* out );
00263
00264enum00265 {
00266 TIXML_NO_ERROR = 0,
00267 TIXML_ERROR,
00268 TIXML_ERROR_OPENING_FILE,
00269 TIXML_ERROR_PARSING_ELEMENT,
00270 TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
00271 TIXML_ERROR_READING_ELEMENT_VALUE,
00272 TIXML_ERROR_READING_ATTRIBUTES,
00273 TIXML_ERROR_PARSING_EMPTY,
00274 TIXML_ERROR_READING_END_TAG,
00275 TIXML_ERROR_PARSING_UNKNOWN,
00276 TIXML_ERROR_PARSING_COMMENT,
00277 TIXML_ERROR_PARSING_DECLARATION,
00278 TIXML_ERROR_DOCUMENT_EMPTY,
00279 TIXML_ERROR_EMBEDDED_NULL,
00280 TIXML_ERROR_PARSING_CDATA,
00281 TIXML_ERROR_DOCUMENT_TOP_ONLY,
00282
00283 TIXML_ERROR_STRING_COUNT
00284 };
00285
00286protected:
00287
00288staticconstchar* SkipWhiteSpace(constchar*, TiXmlEncoding encoding );
00289
00290inlinestaticboolIsWhiteSpace(charc )
00291 {
00292return( isspace( (unsignedchar) c ) || c =='\n'|| c =='\r');
00293 }
00294inlinestaticboolIsWhiteSpace(intc )
00295 {
00296if( c < 256 )
00297returnIsWhiteSpace( (char) c );
00298returnfalse;// Again, only truly correct for English/Latin...but usually works.00299 }
00300
00301 #ifdef TIXML\_USE\_STL00302staticboolStreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
00303staticboolStreamTo( std::istream * in,intcharacter, TIXML_STRING * tag );
00304 #endif0030500306/\* Reads an XML name into the string provided. Returns00307 a pointer just past the last character of the name,00308 or 0 if the function has an error.00309 \*/00310staticconstchar* ReadName(constchar* p, TIXML_STRING* name, TiXmlEncoding encoding );
00311
00312/\* Reads text. Returns a pointer past the given end tag.00313 Wickedly complex options, but it keeps the (sensitive) code in one place.00314 \*/00315staticconstchar* ReadText(constchar* in,// where to start00316 TIXML_STRING* text,// the string read00317boolignoreWhiteSpace,// whether to keep the white space00318constchar* endTag,// what ends this text00319boolignoreCase,// whether to ignore case in the end tag00320 TiXmlEncoding encoding );// the current encoding00321
00322// If an entity has been found, transform it into a character.00323staticconstchar* GetEntity(constchar* in,char* value,int* length, TiXmlEncoding encoding );
00324
00325// Get a character, while interpreting entities.00326// The length can be from 0 to 4 bytes.00327inlinestaticconstchar* GetChar(constchar* p,char* _value,int* length, TiXmlEncoding encoding )
00328 {
00329 assert( p );
00330if( encoding == TIXML_ENCODING_UTF8 )
00331 {
00332 *length = utf8ByteTable[*((constunsignedchar*)p)];
00333 assert( *length >= 0 && *length < 5 );
00334 }
00335else00336 {
00337 *length = 1;
00338 }
00339
00340if( *length == 1 )
00341 {
00342if( *p =='&')
00343returnGetEntity( p, _value, length, encoding );
00344 *_value = *p;
00345returnp+1;
00346 }
00347elseif( *length )
00348 {
00349//strncpy( \_value, p, \*length ); // lots of compilers don't like this function (unsafe),00350// and the null terminator isn't needed00351for(inti=0; p[i] && i<*length; ++i ) {
00352 _value[i] = p[i];
00353 }
00354returnp + (*length);
00355 }
00356else00357 {
00358// Not valid text.00359return0;
00360 }
00361 }
00362
00363// Return true if the next characters in the stream are any of the endTag sequences.00364// Ignore case only works for english, and should only be relied on when comparing00365// to English words: StringEqual( p, "version", true ) is fine.00366staticboolStringEqual(constchar* p,
00367constchar* endTag,
00368boolignoreCase,
00369 TiXmlEncoding encoding );
00370
00371staticconstchar* errorString[TIXML_ERROR_STRING_COUNT];
00372
00373 TiXmlCursor location;
00374[00376](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c)void*[userData](classTiXmlBase.html#ab242c01590191f644569fa89a080d97c "Field containing a generic user pointer.");
00377
00378// None of these methods are reliable for any language except English.00379// Good for approximation, not great for accuracy.00380staticintIsAlpha(unsignedcharanyByte, TiXmlEncoding encoding );
00381staticintIsAlphaNum(unsignedcharanyByte, TiXmlEncoding encoding );
00382inlinestaticintToLower(intv, TiXmlEncoding encoding )
00383 {
00384if( encoding == TIXML_ENCODING_UTF8 )
00385 {
00386if( v < 128 )returntolower( v );
00387returnv;
00388 }
00389else00390 {
00391returntolower( v );
00392 }
00393 }
00394staticvoidConvertUTF32ToUTF8(unsignedlonginput,char* output,int* length );
00395
00396private:
00397[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")(const[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")& );// not implemented.00398voidoperator=(const[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")& base );// not allowed.00399
00400struct Entity
00401 {
00402constchar* str;
00403unsignedintstrLength;
00404charchr;
00405 };
00406enum00407 {
00408 NUM_ENTITY = 5,
00409 MAX_ENTITY_LENGTH = 6
00410
00411 };
00412staticEntity entity[NUM_ENTITY];
00413staticboolcondenseWhiteSpace;
00414 };
00415
00416[00423](classTiXmlNode.html)class [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model."):public[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")00424 {
00425friendclass [TiXmlDocument](classTiXmlDocument.html "Always the top level node.");
00426friendclass [TiXmlElement](classTiXmlElement.html "The element is a container class.");
00427
00428public:
00429 #ifdef TIXML\_USE\_STL 0043000434friendstd::istream&[operator \>\>](classTiXmlNode.html#ab57bd426563c926844f65a78412e18b9 "An input stream operator, for every class.")(std::istream& in,[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& base);
00435
00452friendstd::ostream&[operator\<\<](classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7 "An output stream operator, for every class.")(std::ostream& out,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& base);
00453
00455friendstd::string&[operator\<\<](classTiXmlNode.html#a86cd49cfb17a844c0010b3136ac966c7 "An output stream operator, for every class.")(std::string& out,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& base );
00456
00457 #endif00458[00462](classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2)enum[NodeType](classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2 "The types of XML nodes supported by TinyXml.")00463 {
00464 TINYXML_DOCUMENT,
00465 TINYXML_ELEMENT,
00466 TINYXML_COMMENT,
00467 TINYXML_UNKNOWN,
00468 TINYXML_TEXT,
00469 TINYXML_DECLARATION,
00470 TINYXML_TYPECOUNT
00471 };
00472
00473virtual~[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")();
00474[00487](classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41)constchar*[Value](classTiXmlNode.html#a77943eb90d12c2892b1337a9f5918b41 "The meaning of 'value' changes for the specific type of TiXmlNode.")() const {returnvalue.c_str (); }
00488
00489 #ifdef TIXML\_USE\_STL00490[00494](classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5)conststd::string&[ValueStr](classTiXmlNode.html#a6d9e505619d39bf50bfd9609c9169ea5 "Return Value() as a std::string.")() const {returnvalue; }
00495 #endif0049600497constTIXML_STRING& ValueTStr() const {returnvalue; }
00498[00508](classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90)void[SetValue](classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90 "Changes the value of the node.")(constchar* _value) { value = _value;}
00509
00510 #ifdef TIXML\_USE\_STL[00512](classTiXmlNode.html#a2598d5f448042c1abbeae4503dd45ff2) void SetValue( const std::string& \_value ) { value = \_value; }00513 #endif0051400516void[Clear](classTiXmlNode.html#a708e7f953df61d4d2d12f73171550a4b "Delete all the children of this node. Does not affect 'this'.")();
00517[00519](classTiXmlNode.html#ab643043132ffd794f8602685d34a982e)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Parent](classTiXmlNode.html#ab643043132ffd794f8602685d34a982e "One step up the DOM.")() {returnparent; }
00520const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Parent](classTiXmlNode.html#ab643043132ffd794f8602685d34a982e "One step up the DOM.")() const {returnparent; }
00521[00522](classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0 "The first child of this node. Will be null if there are no children.")() const {returnfirstChild; }
00523[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0 "The first child of this node. Will be null if there are no children.")() {returnfirstChild; }
00524const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#a44c8eee26bbe2d1b2762038df9dde2f0 "The first child of this node. Will be null if there are no children.")(constchar* value )const;
00525[00526](classTiXmlNode.html#abc8bf32be6419ec453a731868de19554)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#abc8bf32be6419ec453a731868de19554 "The first child of this node with the matching 'value'. Will be null if none...")(constchar* _value ) {
00527// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)00528// call the method, cast the return back to non-const.00529returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>((const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->FirstChild( _value ));
00530 }
00531const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* LastChild() const {returnlastChild; }[00532](classTiXmlNode.html#a6432d2b2495f6caf9cb4278df706a031)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[LastChild](classTiXmlNode.html#a6432d2b2495f6caf9cb4278df706a031 "The last child of this node. Will be null if there are no children.")() {returnlastChild; }
00533
00534const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* LastChild(constchar* value )const;[00535](classTiXmlNode.html#abad5bf1059c48127b958711ef89e8e5d)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[LastChild](classTiXmlNode.html#abad5bf1059c48127b958711ef89e8e5d "The last child of this node matching 'value'. Will be null if there are no...")(constchar* _value ) {
00536returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>((const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->LastChild( _value ));
00537 }
00538
00539 #ifdef TIXML\_USE\_STL[00540](classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6 "STL std::string form.")(conststd::string& _value ) const {return[FirstChild](classTiXmlNode.html#a07f6200a5956c723c5b52d70f29c46f6 "STL std::string form.")(_value.c_str ()); }[00541](classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[FirstChild](classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6 "STL std::string form.")(conststd::string& _value ) {return[FirstChild](classTiXmlNode.html#a10d2669ccb5e29e02fcb0e4408685ef6 "STL std::string form.")(_value.c_str ()); }[00542](classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[LastChild](classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63 "STL std::string form.")(conststd::string& _value ) const {return[LastChild](classTiXmlNode.html#a256d0cdbfcfeccae83f3a1c9747a8b63 "STL std::string form.")(_value.c_str ()); }[00543](classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[LastChild](classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3 "STL std::string form.")(conststd::string& _value ) {return[LastChild](classTiXmlNode.html#a69772c9202f70553f940b15c06b07be3 "STL std::string form.")(_value.c_str ()); }
00544 #endif0054500562const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6 "An alternate way to walk the children of a node.")(const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous )const;
00563[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6 "An alternate way to walk the children of a node.")(const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous ) {
00564returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->IterateChildren( previous ) );
00565 }
00566
00568const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6 "An alternate way to walk the children of a node.")(constchar* value,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous )const;
00569[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a8621196ba3705fa226bef4a761cc51b6 "An alternate way to walk the children of a node.")(constchar* _value,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous ) {
00570returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->IterateChildren( _value, previous ) );
00571 }
00572
00573 #ifdef TIXML\_USE\_STL[00574](classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df "STL std::string form.")(conststd::string& _value,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous ) const {return[IterateChildren](classTiXmlNode.html#a1cbaaf8e82c09ad763d52616d75724df "STL std::string form.")(_value.c_str (), previous); }[00575](classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[IterateChildren](classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c "STL std::string form.")(conststd::string& _value,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* previous ) {return[IterateChildren](classTiXmlNode.html#a16e9ad53e2f5445b14bf325c90aa862c "STL std::string form.")(_value.c_str (), previous); }
00576 #endif0057700581[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[InsertEndChild](classTiXmlNode.html#ad7d4630e1a2a916edda16be22448a8ba "Add a new node related to this.")(const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& addThis );
00582
00583
00593[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[LinkEndChild](classTiXmlNode.html#a5d29442ae46de6d0168429156197bfc6 "Add a new node related to this.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* addThis );
00594
00598[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[InsertBeforeChild](classTiXmlNode.html#a0c146fa2fff0157b681594102f48cbc7 "Add a new node related to this.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* beforeThis,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& addThis );
00599
00603[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[InsertAfterChild](classTiXmlNode.html#ad9b75e54ec19301c8b4d5ff583d0b3d5 "Add a new node related to this.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* afterThis,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& addThis );
00604
00608[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[ReplaceChild](classTiXmlNode.html#a0c49e739a17b9938050c22cd89617fbd "Replace a child of this node.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* replaceThis,const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& withThis );
00609
00611bool[RemoveChild](classTiXmlNode.html#ae19d8510efc90596552f4feeac9a8fbf "Delete a child of this node.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* removeThis );
00612[00614](classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10 "Navigate to a sibling node.")() const {returnprev; }
00615[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10 "Navigate to a sibling node.")() {returnprev; }
00616
00618const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10 "Navigate to a sibling node.")(constchar* )const;
00619[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#ac2cd892768726270e511b2ab32de4d10 "Navigate to a sibling node.")(constchar*_prev ) {
00620returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->PreviousSibling( _prev ) );
00621 }
00622
00623 #ifdef TIXML\_USE\_STL[00624](classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab "STL std::string form.")(conststd::string& _value ) const {return[PreviousSibling](classTiXmlNode.html#a658276f57d35d5d4256d1dc1a2c398ab "STL std::string form.")(_value.c_str ()); }[00625](classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[PreviousSibling](classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912 "STL std::string form.")(conststd::string& _value ) {return[PreviousSibling](classTiXmlNode.html#acc8a0434c7f401d4a3b6dee77c1a5912 "STL std::string form.")(_value.c_str ()); }[00626](classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9 "STL std::string form.")(conststd::string& _value) const {return[NextSibling](classTiXmlNode.html#a1b94d2f7fa7ab25a5a8e8d4340c449c9 "STL std::string form.")(_value.c_str ()); }[00627](classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea "STL std::string form.")(conststd::string& _value) {return[NextSibling](classTiXmlNode.html#a1757c1f4d01e8c9596ffdbd561c76aea "STL std::string form.")(_value.c_str ()); }
00628 #endif00629[00631](classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e)const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e "Navigate to a sibling node.")() const {returnnext; }
00632[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e "Navigate to a sibling node.")() {returnnext; }
00633
00635const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e "Navigate to a sibling node.")(constchar* )const;
00636[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[NextSibling](classTiXmlNode.html#af854baeba384f5fe9859f5aee03b548e "Navigate to a sibling node.")(constchar* _next ) {
00637returnconst\_cast\<[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->NextSibling( _next ) );
00638 }
00639
00644const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1 "Convenience function to get through elements.")()const;
00645[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1 "Convenience function to get through elements.")() {
00646returnconst\_cast\<[TiXmlElement](classTiXmlElement.html "The element is a container class.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->NextSiblingElement() );
00647 }
00648
00653const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1 "Convenience function to get through elements.")(constchar* )const;
00654[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a73acf929d49d10bd0e5fb3d31b0372d1 "Convenience function to get through elements.")(constchar*_next ) {
00655returnconst\_cast\<[TiXmlElement](classTiXmlElement.html "The element is a container class.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->NextSiblingElement( _next ) );
00656 }
00657
00658 #ifdef TIXML\_USE\_STL[00659](classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463)const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463 "STL std::string form.")(conststd::string& _value) const {return[NextSiblingElement](classTiXmlNode.html#a7572d0af9d1e696ee3f05d8bb5ebb463 "STL std::string form.")(_value.c_str ()); }[00660](classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081)[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[NextSiblingElement](classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081 "STL std::string form.")(conststd::string& _value) {return[NextSiblingElement](classTiXmlNode.html#a506958e34406729a4e4c5326ea39d081 "STL std::string form.")(_value.c_str ()); }
00661 #endif0066200664const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")()const;
00665[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")() {
00666returnconst\_cast\<[TiXmlElement](classTiXmlElement.html "The element is a container class.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->FirstChildElement() );
00667 }
00668
00670const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")(constchar* _value )const;
00671[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")(constchar* _value ) {
00672returnconst\_cast\<[TiXmlElement](classTiXmlElement.html "The element is a container class.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->FirstChildElement( _value ) );
00673 }
00674
00675 #ifdef TIXML\_USE\_STL[00676](classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7)const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7 "STL std::string form.")(conststd::string& _value ) const {return[FirstChildElement](classTiXmlNode.html#a327ad4bbd90073c5dfc931b07314f5f7 "STL std::string form.")(_value.c_str ()); }[00677](classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45)[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[FirstChildElement](classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45 "STL std::string form.")(conststd::string& _value ) {return[FirstChildElement](classTiXmlNode.html#a7f1d7291880534c1e5cdeb392d8c1f45 "STL std::string form.")(_value.c_str ()); }
00678 #endif00679[00684](classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e)int[Type](classTiXmlNode.html#a57b99d5c97d67a42b9752f5210a1ba5e "Query the type (as an enumerated value, above) of this node.")() const {returntype; }
00685
00689const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[GetDocument](classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3 "Return a pointer to the Document this node lives in.")()const;
00690[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[GetDocument](classTiXmlNode.html#a80e397fa973cf5323e33b07154b024f3 "Return a pointer to the Document this node lives in.")() {
00691returnconst\_cast\<[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*\>( (const\_cast\<const [TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*\>(this))->GetDocument() );
00692 }
00693[00695](classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3)bool[NoChildren](classTiXmlNode.html#aeed21ad30630ef6e7faf096127edc9f3 "Returns true if this node has no children.")() const {return!firstChild; }
00696[00697](classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08)virtualconst[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[ToDocument](classTiXmlNode.html#a8a4cda4b15c29f64cff419309aebed08 "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }[00698](classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c)virtualconst[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[ToElement](classTiXmlNode.html#a72abed96dc9667ab9e0a2a275301bb1c "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }[00699](classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574)virtualconst[TiXmlComment](classTiXmlComment.html "An XML comment.")*[ToComment](classTiXmlNode.html#aa0a5086f9eaee910bbfdc7f975e26574 "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }[00700](classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2)virtualconst[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[ToUnknown](classTiXmlNode.html#afd7205cf31d7a376929f8a36930627a2 "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }[00701](classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69)virtualconst[TiXmlText](classTiXmlText.html "XML text.")*[ToText](classTiXmlNode.html#a95a46a52c525992d6b4ee08beb14cd69 "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }[00702](classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72)virtualconst[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")*[ToDeclaration](classTiXmlNode.html#a9f43e6984fc7d4afd6eb32714c6b7b72 "Cast to a more defined type. Will return null if not of the requested type.")() const {return0; }
00703[00704](classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae)virtual[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[ToDocument](classTiXmlNode.html#a6a4c8ac28ee7a745d059db6691e03bae "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }[00705](classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc)virtual[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[ToElement](classTiXmlNode.html#aa65d000223187d22a4dcebd7479e9ebc "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }[00706](classTiXmlNode.html#a383e06a0787f7063953934867990f849)virtual[TiXmlComment](classTiXmlComment.html "An XML comment.")*[ToComment](classTiXmlNode.html#a383e06a0787f7063953934867990f849 "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }[00707](classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d)virtual[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[ToUnknown](classTiXmlNode.html#a06de5af852668c7e4af0d09c205f0b0d "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }[00708](classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03)virtual[TiXmlText](classTiXmlText.html "XML text.")*[ToText](classTiXmlNode.html#a3ddfbcac78fbea041fad57e5c6d60a03 "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }[00709](classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df)virtual[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")*[ToDeclaration](classTiXmlNode.html#a4027136ca820ff4a636b607231b6a6df "Cast to a more defined type. Will return null if not of the requested type.")() {return0; }
00710
00714virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlNode.html#a4508cc3a2d7a98e96a54cc09c37a78a4 "Create an exact duplicate of this node and return it.")()const= 0;
00715
00738virtualbool[Accept](classTiXmlNode.html#acc0f88b7462c6cb73809d410a4f5bb86 "Accept a hierchical visit the nodes in the TinyXML DOM.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* visitor )const= 0;
00739
00740protected:
00741[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([NodeType](classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2 "The types of XML nodes supported by TinyXml.")_type );
00742
00743// Copy to the allocated object. Shared functionality between Clone, Copy constructor,00744// and the assignment operator.00745voidCopyTo([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* target )const;
00746
00747 #ifdef TIXML\_USE\_STL00748// The real work of the input operator.00749virtualvoidStreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
00750 #endif0075100752// Figure out what is at \*p, and parse it. Returns null if it is not an xml node.00753[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* Identify(constchar* start, TiXmlEncoding encoding );
00754
00755[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* parent;
00756[NodeType](classTiXmlNode.html#a836eded4920ab9e9ef28496f48cd95a2 "The types of XML nodes supported by TinyXml.")type;
00757
00758[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* firstChild;
00759[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* lastChild;
00760
00761 TIXML_STRING value;
00762
00763[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* prev;
00764[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* next;
00765
00766private:
00767[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")(const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& );// not implemented.00768voidoperator=(const[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")& base );// not allowed.00769 };
00770
00771[00779](classTiXmlAttribute.html)class [TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair."):public[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")00780 {
00781friendclass TiXmlAttributeSet;
00782
00783public:[00785](classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1)[TiXmlAttribute](classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1 "Construct an empty attribute.")() :[TiXmlBase](classTiXmlBase.html "TiXmlBase is a base class for every class in TinyXml.")()
00786 {
00787 document = 0;
00788 prev = next = 0;
00789 }
00790
00791 #ifdef TIXML\_USE\_STL[00793](classTiXmlAttribute.html#a052213522caac3979960e0714063861d) TiXmlAttribute( const std::string& \_name, const std::string& \_value )00794{
00795 name = _name;
00796 value = _value;
00797 document = 0;
00798 prev = next = 0;
00799 }
00800 #endif00801[00803](classTiXmlAttribute.html#a759d0b76fb8fcf765ecab243bc14f05e)[TiXmlAttribute](classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1 "Construct an empty attribute.")(constchar* _name,constchar* _value )
00804 {
00805 name = _name;
00806 value = _value;
00807 document = 0;
00808 prev = next = 0;
00809 }
00810[00811](classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d)constchar*[Name](classTiXmlAttribute.html#a298a57287d305904ba6bd96ae6f78d3d "Return the name of this attribute.")() const {returnname.c_str(); }[00812](classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3)constchar*[Value](classTiXmlAttribute.html#a0f874490eac8ca00ee0070765d0e97e3 "Return the value of this attribute.")() const {returnvalue.c_str(); }
00813 #ifdef TIXML\_USE\_STL[00814](classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33)conststd::string&[ValueStr](classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33 "Return the value of this attribute.")() const {returnvalue; }
00815 #endif00816int[IntValue](classTiXmlAttribute.html#aa1a20ad59dc7e89a0ab265396360d50f "Return the value of this attribute, converted to an integer.")()const;
00817double[DoubleValue](classTiXmlAttribute.html#a2880ddef53fc7522c99535273954d230 "Return the value of this attribute, converted to a double.")()const;
00818
00819// Get the tinyxml string representation00820constTIXML_STRING& NameTStr() const {returnname; }
00821
00831int[QueryIntValue](classTiXmlAttribute.html#ad6c93088ee21af41a107931223339344 "QueryIntValue examines the value string.")(int* _value )const;
00833int[QueryDoubleValue](classTiXmlAttribute.html#ac87b2a8489906a5d7aa2875f20be3513 "QueryDoubleValue examines the value string. See QueryIntValue().")(double* _value )const;
00834[00835](classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99)void[SetName](classTiXmlAttribute.html#ab7fa3d21ff8d7c5764cf9af15b667a99 "Set the name of this attribute.")(constchar* _name ) { name = _name; }[00836](classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0)void[SetValue](classTiXmlAttribute.html#a2dae44178f668b3cb48101be4f2236a0 "Set the value.")(constchar* _value ) { value = _value; }
00837
00838void[SetIntValue](classTiXmlAttribute.html#a7e065df640116a62ea4f4b7da5449cc8 "Set the value from an integer.")(int_value );
00839void[SetDoubleValue](classTiXmlAttribute.html#a0316da31373496c4368ad549bf711394 "Set the value from a double.")(double_value );
00840
00841 #ifdef TIXML\_USE\_STL[00843](classTiXmlAttribute.html#ab296ff0c9a8c701055cd257a8a976e57) void SetName( const std::string& \_name ) { name = \_name; } [00845](classTiXmlAttribute.html#ab43f67a0cc3ec1d80e62606500f0925f) void SetValue( const std::string& \_value ) { value = \_value; }00846 #endif0084700849const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[Next](classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67 "Get the next sibling attribute in the DOM. Returns null at end.")()const;
00850[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[Next](classTiXmlAttribute.html#a1c78e92e223a40843f644ba48ef69f67 "Get the next sibling attribute in the DOM. Returns null at end.")() {
00851returnconst\_cast\<[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*\>( (const\_cast\<const [TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*\>(this))->Next() );
00852 }
00853
00855const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[Previous](classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf "Get the previous sibling attribute in the DOM. Returns null at beginning.")()const;
00856[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[Previous](classTiXmlAttribute.html#a6ebbfe333fe76cd834bd6cbcca3130cf "Get the previous sibling attribute in the DOM. Returns null at beginning.")() {
00857returnconst\_cast\<[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*\>( (const\_cast\<const [TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*\>(this))->Previous() );
00858 }
00859
00860booloperator==(const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")& rhs ) const {returnrhs.name == name; }
00861booloperator<(const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")& rhs ) const {returnname < rhs.name; }
00862booloperator>(const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")& rhs ) const {returnname > rhs.name; }
00863
00864/\* Attribute parsing starts: first letter of the name00865 returns: the next char after the value end quote00866 \*/00867virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
00868
00869// Prints this Attribute to a FILE stream.[00870](classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a)virtualvoid[Print](classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth ) const {
00871[Print](classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( cfile, depth, 0 );
00872 }
00873void[Print](classTiXmlAttribute.html#acc04956c1d5c4c31fe74f7a7528d109a "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth, TIXML_STRING* str )const;
00874
00875// [internal use]00876// Set the document pointer so the attribute can report errors.00877voidSetDocument([TiXmlDocument](classTiXmlDocument.html "Always the top level node.")* doc ) { document = doc; }
00878
00879private:
00880[TiXmlAttribute](classTiXmlAttribute.html#a9cfa3c8179873fd485d83003b114f8e1 "Construct an empty attribute.")(const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")& );// not implemented.00881voidoperator=(const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")& base );// not allowed.00882
00883[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")* document;// A pointer back to a document, for error reporting.00884 TIXML_STRING name;
00885 TIXML_STRING value;
00886[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* prev;
00887[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* next;
00888 };
00889
00890
00891/\* A class used to manage a group of attributes.00892 It is only used internally, both by the ELEMENT and the DECLARATION.0089300894 The set can be changed transparent to the Element and Declaration00895 classes that use it, but NOT transparent to the Attribute00896 which has to implement a next() and previous() method. Which makes00897 it a bit problematic and prevents the use of STL.0089800899 This version is implemented with circular lists because:00900 - I like circular lists00901 - it demonstrates some independence from the (typical) doubly linked list.00902\*/00903class TiXmlAttributeSet
00904 {
00905public:
00906 TiXmlAttributeSet();
00907 ~TiXmlAttributeSet();
00908
00909voidAdd([TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* attribute );
00910voidRemove([TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* attribute );
00911
00912const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* First() const {return( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
00913[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* First() {return( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
00914const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* Last() const {return( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
00915[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* Last() {return( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
00916
00917[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* Find(constchar* _name )const;
00918[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* FindOrCreate(constchar* _name );
00919
00920# ifdef TIXML\_USE\_STL00921[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* Find(conststd::string& _name )const;
00922[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* FindOrCreate(conststd::string& _name );
00923# endif0092400925
00926private:
00927//\*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),00928//\*ME: this class must be also use a hidden/disabled copy-constructor !!!00929 TiXmlAttributeSet(constTiXmlAttributeSet& );// not allowed00930voidoperator=(constTiXmlAttributeSet& );// not allowed (as TiXmlAttribute)00931
00932[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")sentinel;
00933 };
00934
00935[00940](classTiXmlElement.html)class [TiXmlElement](classTiXmlElement.html "The element is a container class."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")00941 {
00942public:
00944[TiXmlElement](classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60 "Construct an element.")(constchar* in_value);
00945
00946 #ifdef TIXML\_USE\_STL00948 TiXmlElement( const std::string& \_value );00949 #endif0095000951[TiXmlElement](classTiXmlElement.html#a01bc3ab372d35da08efcbbe65ad90c60 "Construct an element.")(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")& );
00952
00953[TiXmlElement](classTiXmlElement.html "The element is a container class.")& operator=(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")& base );
00954
00955virtual~[TiXmlElement](classTiXmlElement.html "The element is a container class.")();
00956
00960constchar*[Attribute](classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d "Given an attribute name, Attribute() returns the value for the attribute of that...")(constchar* name )const;
00961
00968constchar*[Attribute](classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d "Given an attribute name, Attribute() returns the value for the attribute of that...")(constchar* name,int* i )const;
00969
00976constchar*[Attribute](classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d "Given an attribute name, Attribute() returns the value for the attribute of that...")(constchar* name,double* d )const;
00977
00985int[QueryIntAttribute](classTiXmlElement.html#aea0bfe471380f281c5945770ddbf52b9 "QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...")(constchar* name,int* _value )const;
00987int[QueryUnsignedAttribute](classTiXmlElement.html#ae48df644f890ab86fa19839ac401f00d "QueryUnsignedAttribute examines the attribute - see QueryIntAttribute().")(constchar* name,unsigned* _value )const;
00992int[QueryBoolAttribute](classTiXmlElement.html#af4a1d3f88c28eb0f3115dc39ebd83fff "QueryBoolAttribute examines the attribute - see QueryIntAttribute().")(constchar* name,bool* _value )const;
00994int[QueryDoubleAttribute](classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7 "QueryDoubleAttribute examines the attribute - see QueryIntAttribute().")(constchar* name,double* _value )const;[00996](classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be)int[QueryFloatAttribute](classTiXmlElement.html#aa04d3af11601ef5a5f88295203a843be "QueryFloatAttribute examines the attribute - see QueryIntAttribute().")(constchar* name,float* _value ) const {
00997doubled;
00998intresult =[QueryDoubleAttribute](classTiXmlElement.html#a898d7730ecc341f0bffc7a9dadbf1ce7 "QueryDoubleAttribute examines the attribute - see QueryIntAttribute().")( name, &d );
00999if( result == TIXML_SUCCESS ) {
01000 *_value = (float)d;
01001 }
01002returnresult;
01003 }
01004
01005 #ifdef TIXML\_USE\_STL[01007](classTiXmlElement.html#a14321ac360efe906ed449d9db3fd9961) int QueryStringAttribute( const char\* name, std::string\* \_value ) const {01008constchar* cstr =[Attribute](classTiXmlElement.html#ae419a442a9701a62b0c3d8fd1cbdd12d "Given an attribute name, Attribute() returns the value for the attribute of that...")( name );
01009if( cstr ) {
01010 *_value = std::string( cstr );
01011returnTIXML_SUCCESS;
01012 }
01013returnTIXML_NO_ATTRIBUTE;
01014 }
01015[01024](classTiXmlElement.html#ae3b9a03b0a56663a40801c7256683576)template<typenameT >intQueryValueAttribute(conststd::string& name, T* outValue ) const01025{
01026const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* node = attributeSet.Find( name );
01027if( !node )
01028returnTIXML_NO_ATTRIBUTE;
01029
01030 std::stringstream sstream( node->[ValueStr](classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33 "Return the value of this attribute.")() );
01031 sstream >> *outValue;
01032if( !sstream.fail() )
01033returnTIXML_SUCCESS;
01034returnTIXML_WRONG_TYPE;
01035 }
01036
01037intQueryValueAttribute(conststd::string& name, std::string* outValue ) const01038{
01039const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* node = attributeSet.Find( name );
01040if( !node )
01041returnTIXML_NO_ATTRIBUTE;
01042 *outValue = node->[ValueStr](classTiXmlAttribute.html#a87705c3ccf9ee9417beb4f7cbacd4d33 "Return the value of this attribute.")();
01043returnTIXML_SUCCESS;
01044 }
01045 #endif0104601050voidSetAttribute(constchar* name,constchar* _value );
01051
01052 #ifdef TIXML\_USE\_STL01053conststd::string* Attribute(conststd::string& name )const;
01054conststd::string* Attribute(conststd::string& name,int* i )const;
01055conststd::string* Attribute(conststd::string& name,double* d )const;
01056intQueryIntAttribute(conststd::string& name,int* _value )const;
01057intQueryDoubleAttribute(conststd::string& name,double* _value )const;
01058
01060voidSetAttribute(conststd::string& name,conststd::string& _value );
01062voidSetAttribute(conststd::string& name,int_value );
01064voidSetDoubleAttribute(conststd::string& name,doublevalue );
01065 #endif0106601070voidSetAttribute(constchar* name,intvalue );
01071
01075voidSetDoubleAttribute(constchar* name,doublevalue );
01076
01079voidRemoveAttribute(constchar* name );
01080 #ifdef TIXML\_USE\_STL[01081](classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a)void[RemoveAttribute](classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a "STL std::string form.")(conststd::string& name ) {[RemoveAttribute](classTiXmlElement.html#a1afa6aea716511326a608e4c05df4f3a "STL std::string form.")(name.c_str ()); }
01082 #endif01083[01084](classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592)const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[FirstAttribute](classTiXmlElement.html#a516054c9073647d6cb29b6abe9fa0592 "Access the first attribute in this element.")() const {returnattributeSet.First(); }
01085[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* FirstAttribute() {returnattributeSet.First(); }[01086](classTiXmlElement.html#a86191b49f9177be132b85b14655f1381)const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")*[LastAttribute](classTiXmlElement.html#a86191b49f9177be132b85b14655f1381 "Access the last attribute in this element.")() const {returnattributeSet.Last(); }
01087[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* LastAttribute() {returnattributeSet.Last(); }
01088
01121constchar* GetText()const;
01122
01124virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* Clone()const;
01125// Print the Element to a FILE stream.01126virtualvoidPrint( FILE* cfile,intdepth )const;
01127
01128/\* Attribtue parsing starts: next char past '\<'01129 returns: next char past '\>'01130 \*/01131virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
01132[01133](classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c)virtualconst[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[ToElement](classTiXmlElement.html#ac5b8d0e25fa23fd9acbb6d146082901c "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01134](classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a)virtual[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[ToElement](classTiXmlElement.html#a9def86337ea7a755eb41cac980f60c7a "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01135
01138virtualboolAccept([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* visitor )const;
01139
01140protected:
01141
01142voidCopyTo([TiXmlElement](classTiXmlElement.html "The element is a container class.")* target )const;
01143voidClearThis();// like clear, but initializes 'this' object as well01144
01145// Used to be public [internal use]01146 #ifdef TIXML\_USE\_STL01147virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01148 #endif01149/\* [internal use]01150 Reads the "value" of the element -- another element, or text.01151 This should terminate with the current end tag.01152 \*/01153constchar* ReadValue(constchar* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
01154
01155private:
01156 TiXmlAttributeSet attributeSet;
01157 };
01158
01159[01162](classTiXmlComment.html)class [TiXmlComment](classTiXmlComment.html "An XML comment."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")01163 {
01164public:[01166](classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7)[TiXmlComment](classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7 "Constructs an empty comment.")() :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")::TINYXML_COMMENT ) {}[01168](classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47)[TiXmlComment](classTiXmlComment.html#a37e7802ef17bc03ebe5ae79bf0713d47 "Construct a comment from text.")(constchar* _value ) :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")::TINYXML_COMMENT ) {
01169[SetValue](classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90 "Changes the value of the node.")( _value );
01170 }
01171[TiXmlComment](classTiXmlComment.html#aaa3252031d3e8bd3a2bf51a1c61201b7 "Constructs an empty comment.")(const[TiXmlComment](classTiXmlComment.html "An XML comment.")& );
01172[TiXmlComment](classTiXmlComment.html "An XML comment.")& operator=(const[TiXmlComment](classTiXmlComment.html "An XML comment.")& base );
01173
01174virtual~[TiXmlComment](classTiXmlComment.html "An XML comment.")() {}
01175
01177virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlComment.html#a0d6662bdc52488b9e12b3c7a0453d028 "Returns a copy of this Comment.")()const;
01178// Write this Comment to a FILE stream.01179virtualvoid[Print](classTiXmlComment.html#a6b316527aaa8da0370cd68c22a5a0f5f "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth )const;
01180
01181/\* Attribtue parsing starts: at the ! of the !--01182 returns: next char past '\>'01183 \*/01184virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
01185[01186](classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0)virtualconst[TiXmlComment](classTiXmlComment.html "An XML comment.")*[ToComment](classTiXmlComment.html#a00fb4215c20a2399ea05ac9b9e7e68a0 "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01187](classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df)virtual[TiXmlComment](classTiXmlComment.html "An XML comment.")*[ToComment](classTiXmlComment.html#acc7c7e07e13c23f17797d642981511df "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01188
01191virtualbool[Accept](classTiXmlComment.html#af3ac1b99fbbe9ea4fb6e14146156e43e "Walk the XML tree visiting this node and all of its children.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* visitor )const;
01192
01193protected:
01194voidCopyTo([TiXmlComment](classTiXmlComment.html "An XML comment.")* target )const;
01195
01196// used to be public01197 #ifdef TIXML\_USE\_STL01198virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01199 #endif01200// virtual void StreamOut( TIXML\_OSTREAM \* out ) const;01201
01202private:
01203
01204 };
01205
01206[01212](classTiXmlText.html)class [TiXmlText](classTiXmlText.html "XML text."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")01213 {
01214friendclass [TiXmlElement](classTiXmlElement.html "The element is a container class.");
01215public:[01220](classTiXmlText.html#af659e77c6b87d684827f35a8f4895960)[TiXmlText](classTiXmlText.html#af659e77c6b87d684827f35a8f4895960 "Constructor for text element.")(constchar* initValue ) :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")::TINYXML_TEXT)
01221 {
01222[SetValue](classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90 "Changes the value of the node.")( initValue );
01223 cdata =false;
01224 }
01225virtual~[TiXmlText](classTiXmlText.html "XML text.")() {}
01226
01227 #ifdef TIXML\_USE\_STL[01229](classTiXmlText.html#a439792f6183a3d3fb6f2bc2b16fa5691) TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML\_TEXT)01230{
01231[SetValue](classTiXmlNode.html#a2a38329ca5d3f28f98ce932b8299ae90 "Changes the value of the node.")( initValue );
01232 cdata =false;
01233 }
01234 #endif0123501236[TiXmlText](classTiXmlText.html#af659e77c6b87d684827f35a8f4895960 "Constructor for text element.")(const[TiXmlText](classTiXmlText.html "XML text.")& copy ) :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")::TINYXML_TEXT ) { copy.CopyTo(this); }
01237[TiXmlText](classTiXmlText.html "XML text.")& operator=(const[TiXmlText](classTiXmlText.html "XML text.")& base ) { base.CopyTo(this);return*this; }
01238
01239// Write this text object to a FILE stream.01240virtualvoid[Print](classTiXmlText.html#a0cafbf6f236c7f02d12b2bffc2b7976b "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth )const;
01241[01243](classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586)bool[CDATA](classTiXmlText.html#ad1a6a6b83fa2271022dd97c072a2b586 "Queries whether this represents text using a CDATA section.")() const {returncdata; }[01245](classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9)void[SetCDATA](classTiXmlText.html#acb17ff7c5d09b2c839393445a3de5ea9 "Turns on or off a CDATA representation of text.")(bool_cdata ) { cdata = _cdata; }
01246
01247virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
01248[01249](classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648)virtualconst[TiXmlText](classTiXmlText.html "XML text.")*[ToText](classTiXmlText.html#a895bf34ffad17f7439ab2a52b9651648 "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01250](classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b)virtual[TiXmlText](classTiXmlText.html "XML text.")*[ToText](classTiXmlText.html#ae7c3a8fd3e4dbf6c0c4363a943d72f5b "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01251
01254virtualbool[Accept](classTiXmlText.html#a8483d4415ce9de6c4fa8f63d067d5de6 "Walk the XML tree visiting this node and all of its children.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* content )const;
01255
01256protected:
01258virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlText.html#a0c411e93a27537369479d034cc82da3b "[internal use] Creates a new Element and returns it.")()const;
01259voidCopyTo([TiXmlText](classTiXmlText.html "XML text.")* target )const;
01260
01261boolBlank()const;// returns true if all white space and new lines01262// [internal use]01263 #ifdef TIXML\_USE\_STL01264virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01265 #endif0126601267private:
01268boolcdata;// true if this should be input and output as a CDATA style text element01269 };
01270
01271[01285](classTiXmlDeclaration.html)class [TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")01286 {
01287public:[01289](classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79)[TiXmlDeclaration](classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79 "Construct an empty declaration.")() :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")::TINYXML_DECLARATION ) {}
01290
01291#ifdef TIXML\_USE\_STL01293 TiXmlDeclaration( const std::string& \_version,01294conststd::string& _encoding,
01295conststd::string& _standalone );
01296#endif0129701299[TiXmlDeclaration](classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79 "Construct an empty declaration.")(constchar* _version,
01300constchar* _encoding,
01301constchar* _standalone );
01302
01303[TiXmlDeclaration](classTiXmlDeclaration.html#aa0484d059bea0ea1acb47c9094382d79 "Construct an empty declaration.")(const[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")& copy );
01304[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")& operator=(const[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")& copy );
01305
01306virtual~[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")() {}
01307[01309](classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76)constchar*[Version](classTiXmlDeclaration.html#a02ee557b1a4545c3219ed377c103ec76 "Version. Will return an empty string if none was found.")() const {returnversion.c_str (); }[01311](classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76)constchar*[Encoding](classTiXmlDeclaration.html#a5d974231f9e9a2f0542f15f3a46cdb76 "Encoding. Will return an empty string if none was found.")() const {returnencoding.c_str (); }[01313](classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9)constchar*[Standalone](classTiXmlDeclaration.html#a9ff06afc033d7ef730ec7c6825b97ad9 "Is this a standalone document?")() const {returnstandalone.c_str (); }
01314
01316virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlDeclaration.html#a7cf459186040141cda7a180a6585ce2e "Creates a copy of this Declaration and returns it.")()const;
01317// Print this declaration to a FILE stream.01318virtualvoidPrint( FILE* cfile,intdepth, TIXML_STRING* str )const;[01319](classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4)virtualvoid[Print](classTiXmlDeclaration.html#abf6303db4bd05b5be554036817ff1cb4 "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth ) const {
01320 Print( cfile, depth, 0 );
01321 }
01322
01323virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
01324[01325](classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967)virtualconst[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")*[ToDeclaration](classTiXmlDeclaration.html#a1e085d3fefd1dbf5ccdbff729931a967 "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01326](classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce)virtual[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")*[ToDeclaration](classTiXmlDeclaration.html#a6bd3d1daddcaeb9543c24bfd090969ce "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01327
01330virtualbool[Accept](classTiXmlDeclaration.html#a22315a535983b86535cdba3458669e3e "Walk the XML tree visiting this node and all of its children.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* visitor )const;
01331
01332protected:
01333voidCopyTo([TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")* target )const;
01334// used to be public01335 #ifdef TIXML\_USE\_STL01336virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01337 #endif0133801339private:
01340
01341 TIXML_STRING version;
01342 TIXML_STRING encoding;
01343 TIXML_STRING standalone;
01344 };
01345
01346[01354](classTiXmlUnknown.html)class [TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")01355 {
01356public:
01357[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")() :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")( TiXmlNode::TINYXML_UNKNOWN ) {}
01358virtual~[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")() {}
01359
01360[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")(const[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")& copy ) :[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo(this); }
01361[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")& operator=(const[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")& copy ) { copy.CopyTo(this);return*this; }
01362
01364virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlUnknown.html#a0960bb7428b3f341da46244229604d73 "Creates a copy of this Unknown and returns it.")()const;
01365// Print this Unknown to a FILE stream.01366virtualvoid[Print](classTiXmlUnknown.html#a31ba089a40fb5a1869750fce09b0bacb "All TinyXml classes can print themselves to a filestream or the string class (TiXmlString...")( FILE* cfile,intdepth )const;
01367
01368virtualconstchar* Parse(constchar* p, TiXmlParsingData* data, TiXmlEncoding encoding );
01369[01370](classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d)virtualconst[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[ToUnknown](classTiXmlUnknown.html#ab0313e5fe77987d746ac1a97a254419d "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01371](classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c)virtual[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[ToUnknown](classTiXmlUnknown.html#a67c9fd22940e8c47f706a72cdd2e332c "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01372
01375virtualbool[Accept](classTiXmlUnknown.html#ad7122e5135581b3c832a1a3217760a93 "Walk the XML tree visiting this node and all of its children.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* content )const;
01376
01377protected:
01378voidCopyTo([TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")* target )const;
01379
01380 #ifdef TIXML\_USE\_STL01381virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01382 #endif0138301384private:
01385
01386 };
01387
01388[01393](classTiXmlDocument.html)class [TiXmlDocument](classTiXmlDocument.html "Always the top level node."):public[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")01394 {
01395public:
01397[TiXmlDocument](classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c "Create an empty document, that has no name.")();
01399[TiXmlDocument](classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c "Create an empty document, that has no name.")(constchar* documentName );
01400
01401 #ifdef TIXML\_USE\_STL01403 TiXmlDocument( const std::string& documentName );01404 #endif0140501406[TiXmlDocument](classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c "Create an empty document, that has no name.")(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")& copy );
01407[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")& operator=(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")& copy );
01408
01409virtual~[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")() {}
01410
01415bool[LoadFile](classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f "Load a file using the current document value.")( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
01417bool[SaveFile](classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93 "Save a file using the current document value. Returns true if successful.")()const;
01419bool[LoadFile](classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f "Load a file using the current document value.")(constchar* filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
01421bool[SaveFile](classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93 "Save a file using the current document value. Returns true if successful.")(constchar* filename )const;
01427bool[LoadFile](classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f "Load a file using the current document value.")( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
01429bool[SaveFile](classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93 "Save a file using the current document value. Returns true if successful.")( FILE* )const;
01430
01431 #ifdef TIXML\_USE\_STL[01432](classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884)bool[LoadFile](classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f "Load a file using the current document value.")(conststd::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )
01433 {
01434return[LoadFile](classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f "Load a file using the current document value.")( filename.c_str(), encoding );
01435 }[01436](classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52)bool[SaveFile](classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93 "Save a file using the current document value. Returns true if successful.")(conststd::string& filename )const01437 {
01438return[SaveFile](classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93 "Save a file using the current document value. Returns true if successful.")( filename.c_str() );
01439 }
01440 #endif0144101446virtualconstchar*[Parse](classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378 "Parse the given null terminated block of xml data.")(constchar* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
01447[01452](classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be)const[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[RootElement](classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be "Get the root element -- the only top level element -- of the document.")() const {return[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")(); }
01453[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[RootElement](classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be "Get the root element -- the only top level element -- of the document.")() {return[FirstChildElement](classTiXmlNode.html#af4fb652f6bd79ae0d5ce7d0f7d3c0fba "Convenience function to get through elements.")(); }
01454[01460](classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29)bool[Error](classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29 "If an error occurs, Error will be set to true.")() const {returnerror; }
01461[01463](classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e)constchar*[ErrorDesc](classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e "Contains a textual (english) description of the error if one occurs.")() const {returnerrorDesc.c_str (); }
01464[01468](classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f)int[ErrorId](classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f "Generally, you probably want the error string ( ErrorDesc() ).")() const {returnerrorId; }
01469[01477](classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e)int[ErrorRow](classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e "Returns the location (if known) of the error.")() const {returnerrorLocation.row+1; }[01478](classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649)int[ErrorCol](classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649 "The column where the error occured. See ErrorRow().")() const {returnerrorLocation.col+1; }
01479[01504](classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e)void[SetTabSize](classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e "SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to...")(int_tabsize ) { tabsize = _tabsize; }
01505
01506intTabSize() const {returntabsize; }
01507[01511](classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35)void[ClearError](classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35 "If you have handled the error, it can be reset with this call.")() { error =false;
01512 errorId = 0;
01513 errorDesc ="";
01514 errorLocation.row = errorLocation.col = 0;
01515//errorLocation.last = 0; 01516 }
01517[01519](classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510)void[Print](classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510 "Write the document to standard out using formatted printing ("pretty print")...")() const {[Print](classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510 "Write the document to standard out using formatted printing ("pretty print")...")( stdout, 0 ); }
01520
01521/\* Write the document to a string using formatted printing ("pretty print"). This01522 will allocate a character array (new char[]) and return it as a pointer. The01523 calling code pust call delete[] on the return char\* to avoid a memory leak.01524 \*/01525//char\* PrintToMemory() const; 01526
01528virtualvoid[Print](classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510 "Write the document to standard out using formatted printing ("pretty print")...")( FILE* cfile,intdepth = 0 )const;
01529// [internal use]01530voidSetError(interr,constchar* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
01531[01532](classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4)virtualconst[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[ToDocument](classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4 "Cast to a more defined type. Will return null not of the requested type.")() const {returnthis; }[01533](classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42)virtual[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")*[ToDocument](classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42 "Cast to a more defined type. Will return null not of the requested type.")() {returnthis; }
01534
01537virtualbool[Accept](classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a "Walk the XML tree visiting this node and all of its children.")([TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")* content )const;
01538
01539protected:
01540// [internal use]01541virtual[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Clone](classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907 "Create an exact duplicate of this node and return it.")()const;
01542 #ifdef TIXML\_USE\_STL01543virtualvoidStreamIn( std::istream * in, TIXML_STRING * tag );
01544 #endif0154501546private:
01547voidCopyTo([TiXmlDocument](classTiXmlDocument.html "Always the top level node.")* target )const;
01548
01549boolerror;
01550interrorId;
01551 TIXML_STRING errorDesc;
01552inttabsize;
01553 TiXmlCursor errorLocation;
01554booluseMicrosoftBOM;// the UTF-8 BOM were found when read. Note this, and try to write.01555 };
01556
01557[01638](classTiXmlHandle.html)class [TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")01639 {
01640public:[01642](classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8)[TiXmlHandle](classTiXmlHandle.html#aba18fd7bdefb942ecdea4bf4b8e29ec8 "Create a handle from any node (at any depth of the tree.) This can be a null pointer...")([TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* _node ) { this->node = _node; }[01644](classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7)[TiXmlHandle](classTiXmlHandle.html#a236d7855e1e56ccc7b980630c48c7fd7 "Copy constructor.")(const[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")& ref ) { this->node = ref.node; }
01645[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")operator=(const[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")& ref ) {if( &ref !=this) this->node = ref.node;return*this; }
01646
01648[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChild](classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139 "Return a handle to the first child node.")()const;
01650[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChild](classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139 "Return a handle to the first child node.")(constchar* value )const;
01652[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChildElement](classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a "Return a handle to the first child element.")()const;
01654[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChildElement](classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a "Return a handle to the first child element.")(constchar* value )const;
01655
01659[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[Child](classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4 "Return a handle to the "index" child with the given name.")(constchar* value,intindex )const;
01663[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[Child](classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4 "Return a handle to the "index" child with the given name.")(intindex )const;
01668[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[ChildElement](classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d "Return a handle to the "index" child element with the given name.")(constchar* value,intindex )const;
01673[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[ChildElement](classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d "Return a handle to the "index" child element with the given name.")(intindex )const;
01674
01675 #ifdef TIXML\_USE\_STL01676[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChild](classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139 "Return a handle to the first child node.")(conststd::string& _value ) const {return[FirstChild](classTiXmlHandle.html#acdb1faaf88a700b40ca2c8d9aee21139 "Return a handle to the first child node.")( _value.c_str() ); }
01677[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[FirstChildElement](classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a "Return a handle to the first child element.")(conststd::string& _value ) const {return[FirstChildElement](classTiXmlHandle.html#a24d1112e995e937e4dddb202d4113d4a "Return a handle to the first child element.")( _value.c_str() ); }
01678
01679[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[Child](classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4 "Return a handle to the "index" child with the given name.")(conststd::string& _value,intindex ) const {return[Child](classTiXmlHandle.html#a072492b4be1acdb0db2d03cd8f71ccc4 "Return a handle to the "index" child with the given name.")( _value.c_str(), index ); }
01680[TiXmlHandle](classTiXmlHandle.html "A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly...")[ChildElement](classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d "Return a handle to the "index" child element with the given name.")(conststd::string& _value,intindex ) const {return[ChildElement](classTiXmlHandle.html#a979a3f850984a176ee884e394c7eed2d "Return a handle to the "index" child element with the given name.")( _value.c_str(), index ); }
01681 #endif01682[01685](classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[ToNode](classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3 "Return the handle as a TiXmlNode.")() const {returnnode; }[01688](classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e)[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[ToElement](classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e "Return the handle as a TiXmlElement.")() const {return( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }[01691](classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586)[TiXmlText](classTiXmlText.html "XML text.")*[ToText](classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586 "Return the handle as a TiXmlText.")() const {return( ( node && node->ToText() ) ? node->ToText() : 0 ); }[01694](classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674)[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[ToUnknown](classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674 "Return the handle as a TiXmlUnknown.")() const {return( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
01695[01699](classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376)[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")*[Node](classTiXmlHandle.html#ab44b723a8dc9af72838a303c079d0376)() const {return[ToNode](classTiXmlHandle.html#af678e5088e83be67baf76f699756f2c3 "Return the handle as a TiXmlNode.")(); }[01703](classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7)[TiXmlElement](classTiXmlElement.html "The element is a container class.")*[Element](classTiXmlHandle.html#acb5fe8388a526289ea65e817a51e05e7)() const {return[ToElement](classTiXmlHandle.html#abc6e7ed383a5fe1e52b0c0004b457b9e "Return the handle as a TiXmlElement.")(); }[01707](classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13)[TiXmlText](classTiXmlText.html "XML text.")*[Text](classTiXmlHandle.html#a9fc739c8a18d160006f82572fc143d13)() const {return[ToText](classTiXmlHandle.html#a4ac53a652296203a5b5e13854d923586 "Return the handle as a TiXmlText.")(); }[01711](classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465)[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")*[Unknown](classTiXmlHandle.html#a49675b74357ba2aae124657a9a1ef465)() const {return[ToUnknown](classTiXmlHandle.html#a1381c17507a130767b1e23afc93b3674 "Return the handle as a TiXmlUnknown.")(); }
01712
01713private:
01714[TiXmlNode](classTiXmlNode.html "The parent class for everything in the Document Object Model.")* node;
01715 };
01716
01717[01737](classTiXmlPrinter.html)class [TiXmlPrinter](classTiXmlPrinter.html "Print to memory functionality."):public[TiXmlVisitor](classTiXmlVisitor.html "Implements the interface to the "Visitor pattern" (see the Accept() method...")01738 {
01739public:
01740[TiXmlPrinter](classTiXmlPrinter.html "Print to memory functionality.")() : depth( 0 ), simpleTextPrint(false),
01741 buffer(), indent(" "), lineBreak("\n") {}
01742
01743virtualbool[VisitEnter](classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1 "Visit a document.")(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")& doc );
01744virtualbool[VisitExit](classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2 "Visit a document.")(const[TiXmlDocument](classTiXmlDocument.html "Always the top level node.")& doc );
01745
01746virtualbool[VisitEnter](classTiXmlPrinter.html#a799f4f0388570cbb54c0d3c345fef7c1 "Visit a document.")(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")& element,const[TiXmlAttribute](classTiXmlAttribute.html "An attribute is a name-value pair.")* firstAttribute );
01747virtualbool[VisitExit](classTiXmlPrinter.html#a66b33edd76c538b462f789b797a4fdf2 "Visit a document.")(const[TiXmlElement](classTiXmlElement.html "The element is a container class.")& element );
01748
01749virtualbool[Visit](classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38 "Visit a declaration.")(const[TiXmlDeclaration](classTiXmlDeclaration.html "In correct XML the declaration is the first entry in the file.")& declaration );
01750virtualbool[Visit](classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38 "Visit a declaration.")(const[TiXmlText](classTiXmlText.html "XML text.")& text );
01751virtualbool[Visit](classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38 "Visit a declaration.")(const[TiXmlComment](classTiXmlComment.html "An XML comment.")& comment );
01752virtualbool[Visit](classTiXmlPrinter.html#ace1b14d33eede2575c0743e2350f6a38 "Visit a declaration.")(const[TiXmlUnknown](classTiXmlUnknown.html "Any tag that tinyXml doesn't recognize is saved as an unknown.")& unknown );
01753[01757](classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e)void[SetIndent](classTiXmlPrinter.html#a213377a4070c7e625bae59716b089e5e "Set the indent characters for printing.")(constchar* _indent ) { indent = _indent ? _indent :""; }[01759](classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d)constchar*[Indent](classTiXmlPrinter.html#abb33ec7d4bad6aaeb57f4304394b133d "Query the indention string.")() {returnindent.c_str(); }[01764](classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6)void[SetLineBreak](classTiXmlPrinter.html#a4be1e37e69e3858c59635aa947174fe6 "Set the line breaking string.")(constchar* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak :""; }[01766](classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d)constchar*[LineBreak](classTiXmlPrinter.html#a11f1b4804a460b175ec244eb5724d96d "Query the current line breaking string.")() {returnlineBreak.c_str(); }
01767[01771](classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19)void[SetStreamPrinting](classTiXmlPrinter.html#ab23a90629e374cb1cadca090468bbd19 "Switch over to "stream printing" which is the most dense formatting without...")() { indent ="";
01772 lineBreak ="";
01773 }[01775](classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e)constchar*[CStr](classTiXmlPrinter.html#a859eede9597d3e0355b77757be48735e "Return the result.")() {returnbuffer.c_str(); }[01777](classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d)size\_t[Size](classTiXmlPrinter.html#ad01375ae9199bd2f48252eaddce3039d "Return the length of the result string.")() {returnbuffer.size(); }
01778
01779 #ifdef TIXML\_USE\_STL[01781](classTiXmlPrinter.html#a3bd4daf44309b41f5813a833caa0d1c9) const std::string& Str() { return buffer; }01782 #endif0178301784private:
01785voidDoIndent() {
01786for(inti=0; i<depth; ++i )
01787 buffer += indent;
01788 }
01789voidDoLineBreak() {
01790 buffer += lineBreak;
01791 }
01792
01793intdepth;
01794boolsimpleTextPrint;
01795 TIXML_STRING buffer;
01796 TIXML_STRING indent;
01797 TIXML_STRING lineBreak;
01798 };
01799
01800
01801#ifdef \_MSC\_VER01802#pragma warning( pop )01803#endif0180401805#endif