#ifndef TINYXML2_INCLUDED #define TINYXML2_INCLUDED #include #include #include #if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__) #ifndef DEBUG #define DEBUG #endif #endif #if defined(DEBUG) #if defined(_MSC_VER) #define TIXMLASSERT( x ) if ( !(x)) { _asm { int 3 } } //if ( !(x)) WinDebugBreak() #elif defined (ANDROID_NDK) #include #define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } #else #include #define TIXMLASSERT assert #endif #else #define TIXMLASSERT( x ) {} #endif namespace tinyxml2 { class XMLDocument; // internal - move to separate namespace struct CharBuffer { size_t length; char mem[1]; static CharBuffer* Construct( const char* in ); static void Free( CharBuffer* ); }; class XMLNode { friend class XMLDocument; public: XMLNode* InsertEndChild( XMLNode* addThis ); void Print( FILE* cfile, int depth ); // prints leading spaces. protected: XMLNode( XMLDocument* ); virtual ~XMLNode(); // Utility static const char* SkipWhiteSpace( const char* p ) { while( isspace( *p ) ) { ++p; } return p; } static char* SkipWhiteSpace( char* p ) { while( isspace( *p ) ) { ++p; } return p; } inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) { int n = 0; while( *p && *q && *p == *q && n