tinyxml.h
Go to the documentation of this file.
141 virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; }
325 static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding );
329 inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )
529 // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)
542 const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); }
544 const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); }
566 return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) );
572 return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) );
576 const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); }
577 TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); }
622 return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) );
626 const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); }
627 TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); }
628 const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); }
639 return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) );
648 return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() );
657 return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) );
661 const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); }
662 TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); }
668 return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() );
674 return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) );
678 const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); }
679 TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); }
859 return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() );
914 const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
916 const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
1238 TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); }
1362 TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); }
1448 virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
1532 void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
1647 TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; }
1678 TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); }
1679 TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); }
1681 TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); }
1682 TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); }
1690 TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
1696 TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
Definition: tinyxml.h:283 virtual TiXmlDeclaration * ToDeclaration() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:711 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) void SetDoubleAttribute(const std::string &name, double value) ~TiXmlAttributeSet() const TiXmlNode * PreviousSibling() const Navigate to a sibling node. Definition: tinyxml.h:616 virtual bool Accept(TiXmlVisitor *visitor) const virtual const TiXmlComment * ToComment() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:701 Definition: tinyxml.h:101 TiXmlElement * FirstChildElement(const char *_value) Definition: tinyxml.h:673 int QueryValueAttribute(const std::string &name, T *outValue) const Definition: tinyxml.h:1026 virtual TiXmlNode * Clone() const Creates a new Element and returns it - the returned element is a copy. TiXmlHandle ChildElement(const std::string &_value, int index) const Definition: tinyxml.h:1682 Definition: tinyxml.h:942 void Remove(TiXmlAttribute *attribute) virtual void Print(FILE *cfile, int depth) const Definition: tinyxml.h:1287 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) int IntValue() const Return the value of this attribute, converted to an integer. virtual bool VisitEnter(const TiXmlElement &, const TiXmlAttribute *) Visit an element. Definition: tinyxml.h:141 TiXmlComment(const char *_value) Construct a comment from text. Definition: tinyxml.h:1170 Definition: tinyxml.h:472 virtual void StreamIn(std::istream *in, TIXML_STRING *tag) virtual bool Accept(TiXmlVisitor *visitor) const =0 TiXmlNode * LinkEndChild(TiXmlNode *addThis) virtual void StreamIn(std::istream *in, TIXML_STRING *tag) virtual void Print(FILE *cfile, int depth) const virtual TiXmlElement * ToElement() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:707 virtual bool Visit(const TiXmlText &) Visit a text node. Definition: tinyxml.h:148 const TiXmlNode * PreviousSibling(const std::string &_value) const STL std::string form. Definition: tinyxml.h:626 Definition: tinyxml.h:469 Definition: tinyxml.h:270 friend std::ostream & operator<<(std::ostream &out, const TiXmlNode &base) const TiXmlAttribute * LastAttribute() const Access the last attribute in this element. Definition: tinyxml.h:1088 TiXmlNode * IterateChildren(const char *_value, const TiXmlNode *previous) Definition: tinyxml.h:571 virtual void Print(FILE *cfile, int depth) const Definition: tinyxml.h:169 int QueryFloatAttribute(const char *name, float *_value) const QueryFloatAttribute examines the attribute - see QueryIntAttribute(). Definition: tinyxml.h:998 Definition: tinyxml.h:158 static void ConvertUTF32ToUTF8(unsigned long input, char *output, int *length) virtual bool Visit(const TiXmlUnknown &) Visit an unknown node. Definition: tinyxml.h:152 Definition: tinyxml.h:279 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) virtual TiXmlNode * Clone() const =0 virtual TiXmlDeclaration * ToDeclaration() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1328 TiXmlNode * NextSibling(const std::string &_value) STL std::string form. Definition: tinyxml.h:629 virtual ~TiXmlNode() void RemoveAttribute(const std::string &name) STL std::string form. Definition: tinyxml.h:1083 virtual void StreamIn(std::istream *in, TIXML_STRING *tag) const TiXmlAttribute * Previous() const Get the previous sibling attribute in the DOM. Returns null at beginning. static const char * GetChar(const char *p, char *_value, int *length, TiXmlEncoding encoding) Definition: tinyxml.h:329 TiXmlHandle FirstChild(const std::string &_value) const Definition: tinyxml.h:1678 Definition: tinyxml.h:272 bool operator==(const TiXmlAttribute &rhs) const Definition: tinyxml.h:862 TiXmlNode(NodeType _type) virtual const TiXmlUnknown * ToUnknown() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:702 virtual bool Accept(TiXmlVisitor *content) const const char * ReadValue(const char *in, TiXmlParsingData *prevData, TiXmlEncoding encoding) Definition: tinyxml.h:1214 Definition: tinyxml.h:1739 Definition: tinyxml.h:1640 Definition: tinyxml.h:159 virtual bool Accept(TiXmlVisitor *visitor) const void * GetUserData() Get a pointer to arbitrary user data. Definition: tinyxml.h:250 virtual bool Accept(TiXmlVisitor *content) const virtual const TiXmlDeclaration * ToDeclaration() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:704 Definition: tinyxml.h:471 const void * GetUserData() const Get a pointer to arbitrary user data. Definition: tinyxml.h:251 const TiXmlNode * IterateChildren(const TiXmlNode *previous) const TiXmlDeclaration() Construct an empty declaration. Definition: tinyxml.h:1291 const TiXmlNode * LastChild(const std::string &_value) const STL std::string form. Definition: tinyxml.h:544 bool LoadFile(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) const TiXmlElement * FirstChildElement() const Convenience function to get through elements. Definition: tinyxml.h:160 Definition: tinyxml.h:274 const char * Encoding() const Encoding. Will return an empty string if none was found. Definition: tinyxml.h:1313 virtual void StreamIn(std::istream *in, TIXML_STRING *tag)=0 const char * Value() const Return the value of this attribute. Definition: tinyxml.h:814 Definition: tinyxml.h:275 void * userData Field containing a generic user pointer. Definition: tinyxml.h:378 static const char * ReadName(const char *p, TIXML_STRING *name, TiXmlEncoding encoding) const TiXmlNode * FirstChild() const The first child of this node. Will be null if there are no children. Definition: tinyxml.h:524 friend std::istream & operator>>(std::istream &in, TiXmlNode &base) virtual TiXmlComment * ToComment() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:708 Definition: tinyxml.h:268 const char * Version() const Version. Will return an empty string if none was found. Definition: tinyxml.h:1311 const TiXmlNode * NextSibling() const Navigate to a sibling node. Definition: tinyxml.h:633 Definition: tinyxml.h:470 virtual TiXmlText * ToText() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:710 TiXmlNode * Identify(const char *start, TiXmlEncoding encoding) TiXmlDeclaration & operator=(const TiXmlDeclaration ©) virtual TiXmlNode * Clone() const TiXmlAttribute * Find(const char *_name) const Definition: tinyxml.h:167 void CopyTo(TiXmlDeclaration *target) const TiXmlElement * FirstChildElement(const std::string &_value) STL std::string form. Definition: tinyxml.h:679 const TiXmlElement * NextSiblingElement(const std::string &_value) const STL std::string form. Definition: tinyxml.h:661 void SetAttribute(const char *name, const char *_value) static const char * GetEntity(const char *in, char *value, int *length, TiXmlEncoding encoding) virtual TiXmlUnknown * ToUnknown() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1373 double DoubleValue() const Return the value of this attribute, converted to a double. virtual void Print(FILE *cfile, int depth, TIXML_STRING *str) const int QueryBoolAttribute(const char *name, bool *_value) const TiXmlComment & operator=(const TiXmlComment &base) Definition: tinyxml.h:269 TiXmlNode * FirstChild(const std::string &_value) STL std::string form. Definition: tinyxml.h:543 static int IsAlpha(unsigned char anyByte, TiXmlEncoding encoding) static bool StreamTo(std::istream *in, int character, TIXML_STRING *tag) TiXmlElement & operator=(const TiXmlElement &base) static bool IsWhiteSpaceCondensed() Return the current white space setting. Definition: tinyxml.h:226 virtual const TiXmlDocument * ToDocument() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:699 TiXmlHandle Child(const char *value, int index) const static const char * SkipWhiteSpace(const char *, TiXmlEncoding encoding) void SetValue(const std::string &_value) STL std::string form. Definition: tinyxml.h:847 Definition: tinyxml.h:468 const std::string & ValueStr() const Return the value of this attribute. Definition: tinyxml.h:816 virtual const TiXmlDocument * ToDocument() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1534 void CopyTo(TiXmlComment *target) const virtual const TiXmlComment * ToComment() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1188 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0 TiXmlAttribute() Construct an empty attribute. Definition: tinyxml.h:787 virtual bool Accept(TiXmlVisitor *visitor) const virtual const TiXmlDeclaration * ToDeclaration() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1327 TiXmlAttribute(const char *_name, const char *_value) Construct an attribute with a name and value. Definition: tinyxml.h:805 void CopyTo(TiXmlNode *target) const Definition: tinyxml.h:905 int ErrorCol() const The column where the error occured. See ErrorRow() Definition: tinyxml.h:1480 const char * Name() const Return the name of this attribute. Definition: tinyxml.h:813 const TiXmlDocument * GetDocument() const Definition: tinyxml.h:196 virtual const TiXmlText * ToText() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1251 virtual bool VisitExit(const TiXmlElement &) Visit an element. Definition: tinyxml.h:143 virtual const TiXmlElement * ToElement() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:700 Definition: tinyxml.h:425 virtual ~TiXmlElement() TiXmlAttributeSet() int QueryDoubleValue(double *_value) const QueryDoubleValue examines the value string. See QueryIntValue(). virtual const char * Parse(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) virtual bool Visit(const TiXmlDeclaration &) Visit a declaration. Definition: tinyxml.h:146 void Add(TiXmlAttribute *attribute) TiXmlHandle FirstChildElement() const Return a handle to the first child element. virtual TiXmlNode * Clone() const [internal use] Creates a new Element and returns it. TiXmlNode * PreviousSibling(const std::string &_value) STL std::string form. Definition: tinyxml.h:627 bool LoadFile(const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) Definition: tinyxml.h:1434 void RemoveAttribute(const char *name) const TiXmlNode * FirstChild(const std::string &_value) const STL std::string form. Definition: tinyxml.h:542 static const char * ReadText(const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) TiXmlNode * InsertBeforeChild(TiXmlNode *beforeThis, const TiXmlNode &addThis) const char * Attribute(const char *name) const void CopyTo(TiXmlUnknown *target) const void SetCDATA(bool _cdata) Turns on or off a CDATA representation of text. Definition: tinyxml.h:1247 static const char * errorString[TIXML_ERROR_STRING_COUNT] Definition: tinyxml.h:373 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) void CopyTo(TiXmlElement *target) const TiXmlNode * InsertAfterChild(TiXmlNode *afterThis, const TiXmlNode &addThis) void SetName(const char *_name) Set the name of this attribute. Definition: tinyxml.h:837 virtual bool VisitEnter(const TiXmlDocument &) Visit a document. Definition: tinyxml.h:136 virtual TiXmlElement * ToElement() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1136 TiXmlAttribute * FindOrCreate(const char *_name) virtual void Print(FILE *cfile, int depth) const =0 const TiXmlElement * NextSiblingElement() const bool SaveFile() const Save a file using the current document value. Returns true if successful. void SetError(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding) int QueryStringAttribute(const char *name, std::string *_value) const QueryStringAttribute examines the attribute - see QueryIntAttribute(). Definition: tinyxml.h:1009 const TiXmlAttribute * Next() const Get the next sibling attribute in the DOM. Returns null at end. Definition: tinyxml.h:278 virtual TiXmlText * ToText() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1252 TiXmlNode * LastChild(const std::string &_value) STL std::string form. Definition: tinyxml.h:545 virtual TiXmlComment * ToComment() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1189 Definition: tinyxml.h:271 Definition: tinyxml.h:281 TiXmlNode * InsertEndChild(const TiXmlNode &addThis) virtual void StreamIn(std::istream *in, TIXML_STRING *tag) Definition: tinyxml.h:1356 bool Blank() const const TiXmlNode * NextSibling(const std::string &_value) const STL std::string form. Definition: tinyxml.h:628 static bool StringEqual(const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) int QueryIntValue(int *_value) const virtual void StreamIn(std::istream *in, TIXML_STRING *tag) static int IsAlphaNum(unsigned char anyByte, TiXmlEncoding encoding) virtual bool Visit(const TiXmlComment &) Visit a comment node. Definition: tinyxml.h:150 virtual TiXmlUnknown * ToUnknown() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:709 TiXmlElement * NextSiblingElement(const std::string &_value) STL std::string form. Definition: tinyxml.h:662 TiXmlNode * LastChild(const char *_value) The last child of this node matching 'value'. Will be null if there are no children. Definition: tinyxml.h:537 TiXmlHandle FirstChildElement(const std::string &_value) const Definition: tinyxml.h:1679 const char * Standalone() const Is this a standalone document? Definition: tinyxml.h:1315 bool CDATA() const Queries whether this represents text using a CDATA section. Definition: tinyxml.h:1245 Definition: tinyxml.h:1164 Definition: tinyxml.h:168 int QueryUnsignedAttribute(const char *name, unsigned *_value) const QueryUnsignedAttribute examines the attribute - see QueryIntAttribute(). Definition: tinyxml.h:781 virtual void StreamIn(std::istream *in, TIXML_STRING *tag) static bool StreamWhiteSpace(std::istream *in, TIXML_STRING *tag) Definition: tinyxml.h:285 TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous) STL std::string form. Definition: tinyxml.h:577 Definition: tinyxml.h:130 void SetUserData(void *user) Set a pointer to arbitrary user data. Definition: tinyxml.h:249 int QueryDoubleAttribute(const char *name, double *_value) const QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). virtual TiXmlNode * Clone() const Creates a copy of this Declaration and returns it. TiXmlNode * ReplaceChild(TiXmlNode *replaceThis, const TiXmlNode &withThis) bool NoChildren() const Returns true if this node has no children. Definition: tinyxml.h:697 TiXmlDocument & operator=(const TiXmlDocument ©) TiXmlNode * LastChild() The last child of this node. Will be null if there are no children. Definition: tinyxml.h:534 TiXmlNode * IterateChildren(const TiXmlNode *previous) Definition: tinyxml.h:565 void ClearThis() const char * ErrorDesc() const Contains a textual (english) description of the error if one occurs. Definition: tinyxml.h:1465 const TiXmlNode * IterateChildren(const std::string &_value, const TiXmlNode *previous) const STL std::string form. Definition: tinyxml.h:576 Definition: tinyxml.h:277 virtual const TiXmlText * ToText() const Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:703 TiXmlHandle(TiXmlNode *_node) Create a handle from any node (at any depth of the tree.) This can be a null pointer. Definition: tinyxml.h:1644 virtual TiXmlDocument * ToDocument() Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1535 const char * LineBreak() Query the current line breaking string. Definition: tinyxml.h:1768 Definition: tinyxml.h:466 virtual void Print(FILE *cfile, int depth) const virtual const TiXmlUnknown * ToUnknown() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1372 virtual TiXmlDocument * ToDocument() Cast to a more defined type. Will return null if not of the requested type. Definition: tinyxml.h:706 virtual const char * Parse(const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) Definition: tinyxml.h:467 virtual bool VisitExit(const TiXmlDocument &) Visit a document. Definition: tinyxml.h:138 Definition: tinyxml.h:276 static void EncodeString(const TIXML_STRING &str, TIXML_STRING *out) const TiXmlAttribute * FirstAttribute() const Access the first attribute in this element. Definition: tinyxml.h:1086 virtual const TiXmlElement * ToElement() const Cast to a more defined type. Will return null not of the requested type. Definition: tinyxml.h:1135 Definition: tinyxml.h:273 void CopyTo(TiXmlText *target) const const char * GetText() const TiXmlHandle(const TiXmlHandle &ref) Copy constructor. Definition: tinyxml.h:1646 bool SaveFile(const std::string &filename) const < STL std::string version. Definition: tinyxml.h:1438 Definition: tinyxml.h:1395 static void SetCondenseWhiteSpace(bool condense) Definition: tinyxml.h:223 TiXmlElement * NextSiblingElement(const char *_next) Definition: tinyxml.h:656 const TiXmlElement * FirstChildElement(const std::string &_value) const STL std::string form. Definition: tinyxml.h:678 TiXmlHandle ChildElement(const char *value, int index) const int QueryValueAttribute(const std::string &name, std::string *outValue) const Definition: tinyxml.h:1039 int QueryIntAttribute(const char *name, int *_value) const Definition: tinyxml.h:280 virtual bool Accept(TiXmlVisitor *content) const Definition: tinyxml.h:282 TiXmlHandle Child(const std::string &_value, int index) const Definition: tinyxml.h:1681 |