summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2013-08-12 13:25:22 -0700
committerNicolas Noble <pixel@nobis-crew.org>2013-08-12 13:25:22 -0700
commitf5e970f17e9bb3fc30cda214cf8522e4216de30f (patch)
tree6286fea5e5fd968114c6fae3c3f51ec983af21dd /includes
parenta91c3d3a6cb5e71c6376b1efe7d037f02b36f035 (diff)
Fixing a few more things, added BigInt to ints conversions, and added the 64 bits read / write versions for LuaHandle.
Diffstat (limited to 'includes')
-rw-r--r--includes/BigInt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/BigInt.h b/includes/BigInt.h
index a94396c..ae5b0f7 100644
--- a/includes/BigInt.h
+++ b/includes/BigInt.h
@@ -12,6 +12,8 @@ class BigInt {
BigInt(const BigInt &) throw (GeneralException);
BigInt(BigInt &&);
~BigInt();
+ template<class T>
+ BigInt(const T & v) : BigInt() { set(v); }
BigInt & operator=(const BigInt &) throw (GeneralException);
@@ -23,6 +25,11 @@ class BigInt {
void set(const String &, int radix = 10) throw (GeneralException);
void set2expt(int i) throw (GeneralException);
+ uint64_t to_uint64() const throw (GeneralException);
+ int64_t to_int64() const throw (GeneralException);
+ uint32_t to_uint32() const throw (GeneralException);
+ int32_t to_int32() const throw (GeneralException);
+
BigInt operator+(unsigned int) const throw (GeneralException);
BigInt operator+(const BigInt &) const throw (GeneralException);
BigInt operator-(unsigned int) const throw (GeneralException);