summaryrefslogtreecommitdiff
path: root/src/number.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-16 10:50:07 -0600
committerMike Buland <mike@xagasoft.com>2013-04-16 10:50:07 -0600
commit25989c6d3911b1d29a5866e668bff52537893afb (patch)
treedd07375016a8a3836605cf4e2d9eca829193693f /src/number.h
parent44542adf023315d60a8ffc4863f2b161b3c1eb90 (diff)
downloadclic-25989c6d3911b1d29a5866e668bff52537893afb.tar.gz
clic-25989c6d3911b1d29a5866e668bff52537893afb.tar.bz2
clic-25989c6d3911b1d29a5866e668bff52537893afb.tar.xz
clic-25989c6d3911b1d29a5866e668bff52537893afb.zip
Added operators: -, ==, !=, <, >, <=, >=
Still working on division, needed some other operators to make it work.
Diffstat (limited to 'src/number.h')
-rw-r--r--src/number.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/number.h b/src/number.h
index 1489623..7d65096 100644
--- a/src/number.h
+++ b/src/number.h
@@ -12,9 +12,19 @@ public:
12 virtual ~Number(); 12 virtual ~Number();
13 13
14 Number &operator=( const Bu::String &sNum ); 14 Number &operator=( const Bu::String &sNum );
15
15 Number operator+( const Number &rhs ) const; 16 Number operator+( const Number &rhs ) const;
16 Number operator-( const Number &rhs ) const; 17 Number operator-( const Number &rhs ) const;
17 Number operator*( const Number &rhs ) const; 18 Number operator*( const Number &rhs ) const;
19 Number operator/( const Number &rhs ) const;
20 Number operator-() const;
21
22 bool operator==( const Number &rhs ) const;
23 bool operator!=( const Number &rhs ) const;
24 bool operator>( const Number &rhs ) const;
25 bool operator<( const Number &rhs ) const;
26 bool operator>=( const Number &rhs ) const;
27 bool operator<=( const Number &rhs ) const;
18 28
19 void set( const Bu::String &sNum ); 29 void set( const Bu::String &sNum );
20 30