From f9bbc39bd9a14124c1cba696c99d051a39e34b60 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 8 Feb 2014 20:36:09 +0000 Subject: Implement long long support if PUGIXML_HAS_LONG_LONG is defined (autodetection is not implemented yet) git-svn-id: http://pugixml.googlecode.com/svn/trunk@962 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/pugixml.hpp') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index db1507a..ae43fd2 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -320,6 +320,11 @@ namespace pugi double as_double(double def = 0) const; float as_float(float def = 0) const; + #ifdef PUGIXML_HAS_LONG_LONG + long long as_llong(long long def = 0) const; + unsigned long long as_ullong(unsigned long long def = 0) const; + #endif + // Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty bool as_bool(bool def = false) const; @@ -333,6 +338,11 @@ namespace pugi bool set_value(double rhs); bool set_value(bool rhs); + #ifdef PUGIXML_HAS_LONG_LONG + bool set_value(long long rhs); + bool set_value(unsigned long long rhs); + #endif + // Set attribute value (equivalent to set_value without error checking) xml_attribute& operator=(const char_t* rhs); xml_attribute& operator=(int rhs); @@ -340,6 +350,11 @@ namespace pugi xml_attribute& operator=(double rhs); xml_attribute& operator=(bool rhs); + #ifdef PUGIXML_HAS_LONG_LONG + xml_attribute& operator=(long long rhs); + xml_attribute& operator=(unsigned long long rhs); + #endif + // Get next/previous attribute in the attribute list of the parent node xml_attribute next_attribute() const; xml_attribute previous_attribute() const; @@ -637,6 +652,11 @@ namespace pugi double as_double(double def = 0) const; float as_float(float def = 0) const; + #ifdef PUGIXML_HAS_LONG_LONG + long long as_llong(long long def = 0) const; + unsigned long long as_ullong(unsigned long long def = 0) const; + #endif + // Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty bool as_bool(bool def = false) const; @@ -649,6 +669,11 @@ namespace pugi bool set(double rhs); bool set(bool rhs); + #ifdef PUGIXML_HAS_LONG_LONG + bool set(long long rhs); + bool set(unsigned long long rhs); + #endif + // Set text (equivalent to set without error checking) xml_text& operator=(const char_t* rhs); xml_text& operator=(int rhs); @@ -656,6 +681,11 @@ namespace pugi xml_text& operator=(double rhs); xml_text& operator=(bool rhs); + #ifdef PUGIXML_HAS_LONG_LONG + xml_text& operator=(long long rhs); + xml_text& operator=(unsigned long long rhs); + #endif + // Get the data node (node_pcdata or node_cdata) for this object xml_node data() const; }; -- cgit v1.2.3