From 25989c6d3911b1d29a5866e668bff52537893afb Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 16 Apr 2013 10:50:07 -0600 Subject: Added operators: -, ==, !=, <, >, <=, >= Still working on division, needed some other operators to make it work. --- src/number.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/number.h') 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: virtual ~Number(); Number &operator=( const Bu::String &sNum ); + Number operator+( const Number &rhs ) const; Number operator-( const Number &rhs ) const; Number operator*( const Number &rhs ) const; + Number operator/( const Number &rhs ) const; + Number operator-() const; + + bool operator==( const Number &rhs ) const; + bool operator!=( const Number &rhs ) const; + bool operator>( const Number &rhs ) const; + bool operator<( const Number &rhs ) const; + bool operator>=( const Number &rhs ) const; + bool operator<=( const Number &rhs ) const; void set( const Bu::String &sNum ); -- cgit v1.2.3