add missing uint64_t methods to XMLPrinter
add missing XMLElement::Unsigned64Attribute body
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 67eb00b..b1259dc 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -1580,6 +1580,13 @@
return i;
}
+uint64_t XMLElement::Unsigned64Attribute(const char* name, uint64_t defaultValue) const
+{
+ uint64_t i = defaultValue;
+ QueryUnsigned64Attribute(name, &i);
+ return i;
+}
+
bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const
{
bool b = defaultValue;
@@ -2664,6 +2671,14 @@
}
+void XMLPrinter::PushAttribute(const char* name, uint64_t v)
+{
+ char buf[BUF_SIZE];
+ XMLUtil::ToStr(v, buf, BUF_SIZE);
+ PushAttribute(name, buf);
+}
+
+
void XMLPrinter::PushAttribute( const char* name, bool v )
{
char buf[BUF_SIZE];
@@ -2733,6 +2748,7 @@
}
}
+
void XMLPrinter::PushText( int64_t value )
{
char buf[BUF_SIZE];
@@ -2740,6 +2756,15 @@
PushText( buf, false );
}
+
+void XMLPrinter::PushText( uint64_t value )
+{
+ char buf[BUF_SIZE];
+ XMLUtil::ToStr(value, buf, BUF_SIZE);
+ PushText(buf, false);
+}
+
+
void XMLPrinter::PushText( int value )
{
char buf[BUF_SIZE];