From f5e970f17e9bb3fc30cda214cf8522e4216de30f Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Mon, 12 Aug 2013 13:25:22 -0700 Subject: Fixing a few more things, added BigInt to ints conversions, and added the 64 bits read / write versions for LuaHandle. --- includes/BigInt.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'includes') 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 + 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); -- cgit v1.2.3