summaryrefslogtreecommitdiff
path: root/src/number.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-15 15:28:12 -0600
committerMike Buland <mike@xagasoft.com>2013-04-15 15:28:12 -0600
commitf34eb76357fdfc314d6451fd11a2e4d6fcfce434 (patch)
treed4769ae51a1c703b0e55af0ef38a31991f9f7c3a /src/number.h
downloadclic-f34eb76357fdfc314d6451fd11a2e4d6fcfce434.tar.gz
clic-f34eb76357fdfc314d6451fd11a2e4d6fcfce434.tar.bz2
clic-f34eb76357fdfc314d6451fd11a2e4d6fcfce434.tar.xz
clic-f34eb76357fdfc314d6451fd11a2e4d6fcfce434.zip
Initial checkin.
This project will most likely just be stuck into libbu++, but I didn't want to deal with building it all in windows.
Diffstat (limited to 'src/number.h')
-rw-r--r--src/number.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/number.h b/src/number.h
new file mode 100644
index 0000000..4ada829
--- /dev/null
+++ b/src/number.h
@@ -0,0 +1,30 @@
1#ifndef NUMBER_H
2#define NUMBER_H
3
4#include <bu/string.h>
5#include "packedintarray.h"
6
7class Number
8{
9public:
10 Number( int iOrd=0 );
11 Number( const Bu::String &sData, int iOrd=0 );
12 virtual ~Number();
13
14 Number operator+( const Number &rhs ) const;
15
16 operator Bu::String() const
17 {
18 return aInt.toString();
19 }
20
21 Bu::String toString() const { return aInt.toString(); }
22
23 int digit( int iOrder ) const;
24
25private:
26 int iOrd;
27 PackedIntArray aInt;
28};
29
30#endif