|
@@ -614,8 +614,8 @@ public:
|
|
|
static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
|
|
static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
|
|
|
|
|
|
|
|
// converts primitive types to strings
|
|
// converts primitive types to strings
|
|
|
- static void ToStr( int v, char* buffer, int bufferSize );
|
|
|
|
|
- static void ToStr( unsigned v, char* buffer, int bufferSize );
|
|
|
|
|
|
|
+ static void ToStr( int32_t v, char* buffer, int bufferSize );
|
|
|
|
|
+ static void ToStr( uint32_t v, char* buffer, int bufferSize );
|
|
|
static void ToStr( bool v, char* buffer, int bufferSize );
|
|
static void ToStr( bool v, char* buffer, int bufferSize );
|
|
|
static void ToStr( float v, char* buffer, int bufferSize );
|
|
static void ToStr( float v, char* buffer, int bufferSize );
|
|
|
static void ToStr( double v, char* buffer, int bufferSize );
|
|
static void ToStr( double v, char* buffer, int bufferSize );
|
|
@@ -623,8 +623,8 @@ public:
|
|
|
static void ToStr(uint64_t v, char* buffer, int bufferSize);
|
|
static void ToStr(uint64_t v, char* buffer, int bufferSize);
|
|
|
|
|
|
|
|
// converts strings to primitive types
|
|
// converts strings to primitive types
|
|
|
- static bool ToInt( const char* str, int* value );
|
|
|
|
|
- static bool ToUnsigned( const char* str, unsigned* value );
|
|
|
|
|
|
|
+ static bool ToInt( const char* str, int32_t* value );
|
|
|
|
|
+ static bool ToUnsigned( const char* str, uint32_t* value );
|
|
|
static bool ToBool( const char* str, bool* value );
|
|
static bool ToBool( const char* str, bool* value );
|
|
|
static bool ToFloat( const char* str, float* value );
|
|
static bool ToFloat( const char* str, float* value );
|
|
|
static bool ToDouble( const char* str, double* value );
|
|
static bool ToDouble( const char* str, double* value );
|
|
@@ -1162,8 +1162,8 @@ public:
|
|
|
If the value isn't an integer, 0 will be returned. There is no error checking;
|
|
If the value isn't an integer, 0 will be returned. There is no error checking;
|
|
|
use QueryIntValue() if you need error checking.
|
|
use QueryIntValue() if you need error checking.
|
|
|
*/
|
|
*/
|
|
|
- int IntValue() const {
|
|
|
|
|
- int i = 0;
|
|
|
|
|
|
|
+ int32_t IntValue() const {
|
|
|
|
|
+ int32_t i = 0;
|
|
|
QueryIntValue(&i);
|
|
QueryIntValue(&i);
|
|
|
return i;
|
|
return i;
|
|
|
}
|
|
}
|
|
@@ -1181,8 +1181,8 @@ public:
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Query as an unsigned integer. See IntValue()
|
|
/// Query as an unsigned integer. See IntValue()
|
|
|
- unsigned UnsignedValue() const {
|
|
|
|
|
- unsigned i=0;
|
|
|
|
|
|
|
+ uint32_t UnsignedValue() const {
|
|
|
|
|
+ uint32_t i=0;
|
|
|
QueryUnsignedValue( &i );
|
|
QueryUnsignedValue( &i );
|
|
|
return i;
|
|
return i;
|
|
|
}
|
|
}
|
|
@@ -1209,9 +1209,9 @@ public:
|
|
|
in the provided parameter. The function will return XML_SUCCESS on success,
|
|
in the provided parameter. The function will return XML_SUCCESS on success,
|
|
|
and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
|
|
and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
|
|
|
*/
|
|
*/
|
|
|
- XMLError QueryIntValue( int* value ) const;
|
|
|
|
|
|
|
+ XMLError QueryIntValue( int32_t* value ) const;
|
|
|
/// See QueryIntValue
|
|
/// See QueryIntValue
|
|
|
- XMLError QueryUnsignedValue( unsigned int* value ) const;
|
|
|
|
|
|
|
+ XMLError QueryUnsignedValue( uint32_t* value ) const;
|
|
|
/// See QueryIntValue
|
|
/// See QueryIntValue
|
|
|
XMLError QueryInt64Value(int64_t* value) const;
|
|
XMLError QueryInt64Value(int64_t* value) const;
|
|
|
/// See QueryIntValue
|
|
/// See QueryIntValue
|
|
@@ -1226,9 +1226,9 @@ public:
|
|
|
/// Set the attribute to a string value.
|
|
/// Set the attribute to a string value.
|
|
|
void SetAttribute( const char* value );
|
|
void SetAttribute( const char* value );
|
|
|
/// Set the attribute to value.
|
|
/// Set the attribute to value.
|
|
|
- void SetAttribute( int value );
|
|
|
|
|
|
|
+ void SetAttribute(int32_t value );
|
|
|
/// Set the attribute to value.
|
|
/// Set the attribute to value.
|
|
|
- void SetAttribute( unsigned value );
|
|
|
|
|
|
|
+ void SetAttribute( uint32_t value );
|
|
|
/// Set the attribute to value.
|
|
/// Set the attribute to value.
|
|
|
void SetAttribute(int64_t value);
|
|
void SetAttribute(int64_t value);
|
|
|
/// Set the attribute to value.
|
|
/// Set the attribute to value.
|
|
@@ -1316,9 +1316,9 @@ public:
|
|
|
or if there is an error. (For a method with error
|
|
or if there is an error. (For a method with error
|
|
|
checking, see QueryIntAttribute()).
|
|
checking, see QueryIntAttribute()).
|
|
|
*/
|
|
*/
|
|
|
- int IntAttribute(const char* name, int defaultValue = 0) const;
|
|
|
|
|
|
|
+ int32_t IntAttribute(const char* name, int defaultValue = 0) const;
|
|
|
/// See IntAttribute()
|
|
/// See IntAttribute()
|
|
|
- unsigned UnsignedAttribute(const char* name, unsigned defaultValue = 0) const;
|
|
|
|
|
|
|
+ uint32_t UnsignedAttribute(const char* name, unsigned defaultValue = 0) const;
|
|
|
/// See IntAttribute()
|
|
/// See IntAttribute()
|
|
|
int64_t Int64Attribute(const char* name, int64_t defaultValue = 0) const;
|
|
int64_t Int64Attribute(const char* name, int64_t defaultValue = 0) const;
|
|
|
/// See IntAttribute()
|
|
/// See IntAttribute()
|
|
@@ -1343,7 +1343,7 @@ public:
|
|
|
QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
|
|
QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
|
|
|
@endverbatim
|
|
@endverbatim
|
|
|
*/
|
|
*/
|
|
|
- XMLError QueryIntAttribute( const char* name, int* value ) const {
|
|
|
|
|
|
|
+ XMLError QueryIntAttribute( const char* name, int32_t* value ) const {
|
|
|
const XMLAttribute* a = FindAttribute( name );
|
|
const XMLAttribute* a = FindAttribute( name );
|
|
|
if ( !a ) {
|
|
if ( !a ) {
|
|
|
return XML_NO_ATTRIBUTE;
|
|
return XML_NO_ATTRIBUTE;
|
|
@@ -1352,7 +1352,7 @@ public:
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// See QueryIntAttribute()
|
|
/// See QueryIntAttribute()
|
|
|
- XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const {
|
|
|
|
|
|
|
+ XMLError QueryUnsignedAttribute( const char* name, uint32_t* value ) const {
|
|
|
const XMLAttribute* a = FindAttribute( name );
|
|
const XMLAttribute* a = FindAttribute( name );
|
|
|
if ( !a ) {
|
|
if ( !a ) {
|
|
|
return XML_NO_ATTRIBUTE;
|
|
return XML_NO_ATTRIBUTE;
|
|
@@ -1432,11 +1432,11 @@ public:
|
|
|
QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
|
|
QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10
|
|
|
@endverbatim
|
|
@endverbatim
|
|
|
*/
|
|
*/
|
|
|
- XMLError QueryAttribute( const char* name, int* value ) const {
|
|
|
|
|
|
|
+ XMLError QueryAttribute( const char* name, int32_t* value ) const {
|
|
|
return QueryIntAttribute( name, value );
|
|
return QueryIntAttribute( name, value );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- XMLError QueryAttribute( const char* name, unsigned int* value ) const {
|
|
|
|
|
|
|
+ XMLError QueryAttribute( const char* name, uint32_t* value ) const {
|
|
|
return QueryUnsignedAttribute( name, value );
|
|
return QueryUnsignedAttribute( name, value );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1470,12 +1470,12 @@ public:
|
|
|
a->SetAttribute( value );
|
|
a->SetAttribute( value );
|
|
|
}
|
|
}
|
|
|
/// Sets the named attribute to value.
|
|
/// Sets the named attribute to value.
|
|
|
- void SetAttribute( const char* name, int value ) {
|
|
|
|
|
|
|
+ void SetAttribute( const char* name, int32_t value ) {
|
|
|
XMLAttribute* a = FindOrCreateAttribute( name );
|
|
XMLAttribute* a = FindOrCreateAttribute( name );
|
|
|
a->SetAttribute( value );
|
|
a->SetAttribute( value );
|
|
|
}
|
|
}
|
|
|
/// Sets the named attribute to value.
|
|
/// Sets the named attribute to value.
|
|
|
- void SetAttribute( const char* name, unsigned value ) {
|
|
|
|
|
|
|
+ void SetAttribute( const char* name, uint32_t value ) {
|
|
|
XMLAttribute* a = FindOrCreateAttribute( name );
|
|
XMLAttribute* a = FindOrCreateAttribute( name );
|
|
|
a->SetAttribute( value );
|
|
a->SetAttribute( value );
|
|
|
}
|
|
}
|
|
@@ -1586,9 +1586,9 @@ public:
|
|
|
*/
|
|
*/
|
|
|
void SetText( const char* inText );
|
|
void SetText( const char* inText );
|
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
|
- void SetText( int value );
|
|
|
|
|
|
|
+ void SetText( int32_t value );
|
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
|
- void SetText( unsigned value );
|
|
|
|
|
|
|
+ void SetText( uint32_t value );
|
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
|
void SetText(int64_t value);
|
|
void SetText(int64_t value);
|
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
/// Convenience method for setting text inside an element. See SetText() for important limitations.
|
|
@@ -1626,9 +1626,9 @@ public:
|
|
|
to the requested type, and XML_NO_TEXT_NODE if there is no child text to query.
|
|
to the requested type, and XML_NO_TEXT_NODE if there is no child text to query.
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
|
- XMLError QueryIntText( int* ival ) const;
|
|
|
|
|
|
|
+ XMLError QueryIntText( int32_t* ival ) const;
|
|
|
/// See QueryIntText()
|
|
/// See QueryIntText()
|
|
|
- XMLError QueryUnsignedText( unsigned* uval ) const;
|
|
|
|
|
|
|
+ XMLError QueryUnsignedText( uint32_t* uval ) const;
|
|
|
/// See QueryIntText()
|
|
/// See QueryIntText()
|
|
|
XMLError QueryInt64Text(int64_t* uval) const;
|
|
XMLError QueryInt64Text(int64_t* uval) const;
|
|
|
/// See QueryIntText()
|
|
/// See QueryIntText()
|
|
@@ -2258,8 +2258,8 @@ public:
|
|
|
void OpenElement( const char* name, bool compactMode=false );
|
|
void OpenElement( const char* name, bool compactMode=false );
|
|
|
/// If streaming, add an attribute to an open element.
|
|
/// If streaming, add an attribute to an open element.
|
|
|
void PushAttribute( const char* name, const char* value );
|
|
void PushAttribute( const char* name, const char* value );
|
|
|
- void PushAttribute( const char* name, int value );
|
|
|
|
|
- void PushAttribute( const char* name, unsigned value );
|
|
|
|
|
|
|
+ void PushAttribute( const char* name, int32_t value );
|
|
|
|
|
+ void PushAttribute( const char* name, uint32_t value );
|
|
|
void PushAttribute( const char* name, int64_t value );
|
|
void PushAttribute( const char* name, int64_t value );
|
|
|
void PushAttribute( const char* name, uint64_t value );
|
|
void PushAttribute( const char* name, uint64_t value );
|
|
|
void PushAttribute( const char* name, bool value );
|
|
void PushAttribute( const char* name, bool value );
|
|
@@ -2270,9 +2270,9 @@ public:
|
|
|
/// Add a text node.
|
|
/// Add a text node.
|
|
|
void PushText( const char* text, bool cdata=false );
|
|
void PushText( const char* text, bool cdata=false );
|
|
|
/// Add a text node from an integer.
|
|
/// Add a text node from an integer.
|
|
|
- void PushText( int value );
|
|
|
|
|
|
|
+ void PushText( int32_t value );
|
|
|
/// Add a text node from an unsigned.
|
|
/// Add a text node from an unsigned.
|
|
|
- void PushText( unsigned value );
|
|
|
|
|
|
|
+ void PushText( uint32_t value );
|
|
|
/// Add a text node from a signed 64bit integer.
|
|
/// Add a text node from a signed 64bit integer.
|
|
|
void PushText( int64_t value );
|
|
void PushText( int64_t value );
|
|
|
/// Add a text node from an unsigned 64bit integer.
|
|
/// Add a text node from an unsigned 64bit integer.
|