diff options
Diffstat (limited to 'src/number.h')
-rw-r--r-- | src/number.h | 30 |
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 | |||
7 | class Number | ||
8 | { | ||
9 | public: | ||
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 | |||
25 | private: | ||
26 | int iOrd; | ||
27 | PackedIntArray aInt; | ||
28 | }; | ||
29 | |||
30 | #endif | ||