summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-05 22:47:35 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-05 22:47:35 +0000
commit5a2fa3fe5079c8e917f7938602d3def7df71f210 (patch)
treea734b02f1cc27f9ba167e14efefd5ac836b95e90 /src/pugixml.hpp
parent81ef99a27b3ff96ee664ca58054b3b671b97be17 (diff)
Unsigned integer support for attributes (as_uint, operator=)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@101 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 6adbeca..5b317e2 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -459,6 +459,14 @@ namespace pugi
int as_int() const;
/**
+ * Cast attribute value as unsigned int.
+ *
+ * \return attribute value as unsigned int, or 0 if conversion did not succeed or attribute is empty
+ * \note values out of non-negative int range (usually [0, 2^31-1]) get clamped to range boundaries
+ */
+ unsigned int as_uint() const;
+
+ /**
* Cast attribute value as double.
*
* \return attribute value as double, or 0.0 if conversion did not succeed or attribute is empty
@@ -506,6 +514,14 @@ namespace pugi
* \param rhs - new attribute value
* \return self
*/
+ xml_attribute& operator=(unsigned int rhs);
+
+ /**
+ * Set attribute value to \a rhs.
+ *
+ * \param rhs - new attribute value
+ * \return self
+ */
xml_attribute& operator=(double rhs);
/**