summaryrefslogtreecommitdiff
path: root/shared/tinyxml/tinyxml.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/tinyxml/tinyxml.h')
-rw-r--r--shared/tinyxml/tinyxml.h40
1 files changed, 23 insertions, 17 deletions
diff --git a/shared/tinyxml/tinyxml.h b/shared/tinyxml/tinyxml.h
index 226415c9..32801d0f 100644
--- a/shared/tinyxml/tinyxml.h
+++ b/shared/tinyxml/tinyxml.h
@@ -1,6 +1,6 @@
/*
www.sourceforge.net/projects/tinyxml
-Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
+Original code by Lee Thomason (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@@ -91,7 +91,7 @@ class TiXmlParsingData;
const int TIXML_MAJOR_VERSION = 2;
const int TIXML_MINOR_VERSION = 6;
-const int TIXML_PATCH_VERSION = 1;
+const int TIXML_PATCH_VERSION = 2;
/* Internal structure for tracking location of items
in the XML file.
@@ -146,7 +146,7 @@ public:
virtual bool Visit( const TiXmlText& /*text*/ ) { return true; }
/// Visit a comment node
virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; }
- /// Visit an unknow node
+ /// Visit an unknown node
virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; }
};
@@ -689,8 +689,8 @@ public:
#endif
/** Query the type (as an enumerated value, above) of this node.
- The possible types are: DOCUMENT, ELEMENT, COMMENT,
- UNKNOWN, TEXT, and DECLARATION.
+ The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT,
+ TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION.
*/
int Type() const { return type; }
@@ -965,7 +965,7 @@ public:
TiXmlElement( const TiXmlElement& );
- void operator=( const TiXmlElement& base );
+ TiXmlElement& operator=( const TiXmlElement& base );
virtual ~TiXmlElement();
@@ -998,6 +998,13 @@ public:
does not exist, then TIXML_NO_ATTRIBUTE is returned.
*/
int QueryIntAttribute( const char* name, int* _value ) const;
+ /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute().
+ int QueryUnsignedAttribute( const char* name, unsigned* _value ) const;
+ /** QueryBoolAttribute examines the attribute - see QueryIntAttribute().
+ Note that '1', 'true', or 'yes' are considered true, while '0', 'false'
+ and 'no' are considered false.
+ */
+ int QueryBoolAttribute( const char* name, bool* _value ) const;
/// QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
int QueryDoubleAttribute( const char* name, double* _value ) const;
/// QueryFloatAttribute examines the attribute - see QueryIntAttribute().
@@ -1182,7 +1189,7 @@ public:
SetValue( _value );
}
TiXmlComment( const TiXmlComment& );
- void operator=( const TiXmlComment& base );
+ TiXmlComment& operator=( const TiXmlComment& base );
virtual ~TiXmlComment() {}
@@ -1196,8 +1203,8 @@ public:
*/
virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
- virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
- virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+ virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+ virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
/** Walk the XML tree visiting this node and all of its children.
*/
@@ -1247,7 +1254,7 @@ public:
#endif
TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); }
- void operator=( const TiXmlText& base ) { base.CopyTo( this ); }
+ TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; }
// Write this text object to a FILE stream.
virtual void Print( FILE* cfile, int depth ) const;
@@ -1314,7 +1321,7 @@ public:
const char* _standalone );
TiXmlDeclaration( const TiXmlDeclaration& copy );
- void operator=( const TiXmlDeclaration& copy );
+ TiXmlDeclaration& operator=( const TiXmlDeclaration& copy );
virtual ~TiXmlDeclaration() {}
@@ -1372,7 +1379,7 @@ public:
virtual ~TiXmlUnknown() {}
TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); }
- void operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); }
+ TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; }
/// Creates a copy of this Unknown and returns it.
virtual TiXmlNode* Clone() const;
@@ -1381,8 +1388,8 @@ public:
virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
- virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
- virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+ virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+ virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
/** Walk the XML tree visiting this node and all of its children.
*/
@@ -1418,7 +1425,7 @@ public:
#endif
TiXmlDocument( const TiXmlDocument& copy );
- void operator=( const TiXmlDocument& copy );
+ TiXmlDocument& operator=( const TiXmlDocument& copy );
virtual ~TiXmlDocument() {}
@@ -1658,7 +1665,7 @@ public:
TiXmlHandle( TiXmlNode* _node ) { this->node = _node; }
/// Copy constructor
TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; }
- TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }
+ TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; }
/// Return a handle to the first child node.
TiXmlHandle FirstChild() const;
@@ -1823,4 +1830,3 @@ private:
#endif
#endif
-
bgstack15