diff options
Diffstat (limited to 'src/mir_core/src/tinyxml2.h')
-rw-r--r-- | src/mir_core/src/tinyxml2.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/mir_core/src/tinyxml2.h b/src/mir_core/src/tinyxml2.h index 44642078e9..7d5a151e67 100644 --- a/src/mir_core/src/tinyxml2.h +++ b/src/mir_core/src/tinyxml2.h @@ -98,12 +98,12 @@ distribution. /* Versioning, past 1.0.14: http://semver.org/ */ -static const int TIXML2_MAJOR_VERSION = 7; -static const int TIXML2_MINOR_VERSION = 1; +static const int TIXML2_MAJOR_VERSION = 8; +static const int TIXML2_MINOR_VERSION = 0; static const int TIXML2_PATCH_VERSION = 0; -#define TINYXML2_MAJOR_VERSION 7 -#define TINYXML2_MINOR_VERSION 1 +#define TINYXML2_MAJOR_VERSION 8 +#define TINYXML2_MINOR_VERSION 0 #define TINYXML2_PATCH_VERSION 0 // A fixed element depth limit is problematic. There needs to be a @@ -562,7 +562,7 @@ public: TIXMLASSERT( p ); return p; } - static char* SkipWhiteSpace( char* p, int* curLineNumPtr ) { + static char* SkipWhiteSpace( char* const p, int* curLineNumPtr ) { return const_cast<char*>( SkipWhiteSpace( const_cast<const char*>(p), curLineNumPtr ) ); } @@ -600,7 +600,7 @@ public: return strncmp( p, q, nChar ) == 0; } - inline static bool IsUTF8Continuation( char p ) { + inline static bool IsUTF8Continuation( const char p ) { return ( p & 0x80 ) != 0; } @@ -1647,7 +1647,22 @@ public: /// See QueryIntText() double DoubleText(double defaultValue = 0) const; /// See QueryIntText() - float FloatText(float defaultValue = 0) const; + float FloatText(float defaultValue = 0) const; + + /** + Convenience method to create a new XMLElement and add it as last (right) + child of this node. Returns the created and inserted element. + */ + XMLElement* InsertNewChildElement(const char* name); + /// See InsertNewChildElement() + XMLComment* InsertNewComment(const char* comment); + /// See InsertNewChildElement() + XMLText* InsertNewText(const char* text); + /// See InsertNewChildElement() + XMLDeclaration* InsertNewDeclaration(const char* text); + /// See InsertNewChildElement() + XMLUnknown* InsertNewUnknown(const char* text); + // internal: enum ElementClosingType { @@ -1904,7 +1919,7 @@ public: char* Identify( char* p, XMLNode** node ); // internal - void MarkInUse(XMLNode*); + void MarkInUse(const XMLNode* const); virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const { return 0; |