ability to set bool write values
This commit is contained in:
15
tinyxml2.h
15
tinyxml2.h
@@ -527,7 +527,7 @@ enum XMLError {
|
||||
/*
|
||||
Utility functionality.
|
||||
*/
|
||||
class XMLUtil
|
||||
class TINYXML2_LIB XMLUtil
|
||||
{
|
||||
public:
|
||||
static const char* SkipWhiteSpace( const char* p, int* curLineNumPtr ) {
|
||||
@@ -605,6 +605,19 @@ public:
|
||||
static bool ToFloat( const char* str, float* value );
|
||||
static bool ToDouble( const char* str, double* value );
|
||||
static bool ToInt64(const char* str, int64_t* value);
|
||||
|
||||
// Default to "true" and "false". If you
|
||||
// need different values, can assign them. (For instance
|
||||
// if you need "true" to be "1".)
|
||||
// Be careful: static, global, & not thread safe.
|
||||
// Be sure to set static const memory as parameters.
|
||||
// Shouldn't be set unless you have a special reason
|
||||
// such as back-compatibility or testing.
|
||||
static void SetBool(const char* writeTrue, const char* writeFalse);
|
||||
|
||||
private:
|
||||
static char* writeBoolTrue;
|
||||
static char* writeBoolFalse;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user