00001 #ifndef __Clong__ 00002 #define __Clong__ 00003 00004 // =========================================================================== 00005 00006 #include "CString.hpp" 00007 00008 // =========================================================================== 00009 00010 using Exponent::Basics::CString; 00011 00012 // =========================================================================== 00013 00014 namespace Exponent 00015 { 00016 namespace Basics 00017 { 00037 class CLong : public CCountedObject 00038 { 00040 EXPONENT_CLASS_DECLARATION; 00043 // =========================================================================== 00044 00045 public: 00046 00047 // =========================================================================== 00048 00053 CLong(const long value = 0); 00054 00058 virtual ~CLong(); 00059 00060 // =========================================================================== 00061 00067 CLong &operator = (const CLong &value); 00068 00074 CLong &operator = (const long value); 00075 00081 bool operator == (const CLong &value); 00082 00088 bool operator == (const long value); 00089 00095 bool operator != (const CLong &value); 00096 00102 bool operator != (const long value); 00103 00109 CLong &operator + (const CLong &value); 00110 00116 CLong &operator + (const long value); 00117 00123 CLong &operator - (const CLong &value); 00124 00130 CLong &operator - (const long value); 00131 00137 CLong &operator * (const CLong &value); 00138 00144 CLong &operator * (const long value); 00145 00151 CLong &operator / (const CLong &value); 00152 00158 CLong &operator / (const long value); 00159 00165 CLong &operator += (const CLong &value); 00166 00172 CLong &operator += (const long value); 00173 00179 CLong &operator -= (const CLong &value); 00180 00186 CLong &operator -= (const long value); 00187 00192 bool operator ! (); 00193 00194 // =========================================================================== 00195 00200 void setValue(const CLong &value); 00201 00206 void setValue(const long value); 00207 00212 long getValue() const; 00213 00219 CString getValueAsString(const long preceedingZeros = 2) const; 00220 00221 // =========================================================================== 00222 00228 virtual void getObjectDescription(char *string, const long size) const; 00229 00230 // =========================================================================== 00231 00232 protected: 00233 00234 // =========================================================================== 00235 00236 long m_value; 00238 }; 00239 } 00240 } 00241 #endif // End of CLong.hpp