Fixed point decimal helper. More...
#include <Decimal.h>
Public Member Functions | |
| Decimal (const int64 i) | |
| Decimal (const int32 i) | |
| Decimal (const int16 i) | |
| Decimal (const Decimal &d) | |
| Decimal (const double d) | |
| Decimal (const float d) | |
| Decimal | Round () |
| Decimal & | operator= (const Decimal &d) |
| Decimal & | operator= (const int32 d) |
| Decimal & | operator= (const int64 d) |
| Decimal & | operator= (const float d) |
| Decimal & | operator= (const double d) |
| Decimal | operator+ (const Decimal &d) const |
| Decimal | operator- (const Decimal &d) const |
| Decimal | operator* (const Decimal &d) const |
| Decimal | operator/ (const Decimal &d) const |
| Decimal | operator+= (const Decimal &d) |
| Decimal | operator-= (const Decimal &d) |
| Decimal | operator*= (const Decimal &d) |
| Decimal | operator/= (const Decimal &d) |
| bool | operator== (const Decimal &) const |
| bool | operator!= (const Decimal &) const |
| bool | operator< (const Decimal &) const |
| bool | operator<= (const Decimal &) const |
| bool | operator> (const Decimal &) const |
| bool | operator>= (const Decimal &) const |
| virtual int | ToInt () const |
| virtual double | ToDouble () const |
| virtual StringPtr | ToString () const |
| int64 | ToLongInt (void) const |
| virtual int32 | HashCode () const |
| Decimal | Abs () |
| int64 | RawData () const |
| bool | Equals (Decimal *d) const |
| virtual bool | Equals (const IComparable *a) const |
| virtual int | Compare (const IComparable *a) const |
| virtual bool | Equals (const IComparable &a) const |
| virtual int | Compare (const IComparable &a) const |
| virtual int32 | MajicNumber () const |
| Class instances with the same majic number are of the same type (can be casted). Majic numbers above 0xFFFF are available for user applications. | |
| virtual void | ValidateMem () const |
| virtual void | CheckMem () const |
Static Public Member Functions | |
| static void | Initialize () |
| static Decimal | Parse (const String *str) |
| static Decimal | Parse (const String &str) |
Protected Member Functions | |
| Decimal (int64 intPart, int64 fractPart) | |
| void | Init (int64 intPart, int64 fractPart) |
Static Protected Member Functions | |
| static Decimal | Intern (int64 n) |
Protected Attributes | |
| int64 | n |
Static Protected Attributes | |
| static const int | precision = 4 |
| static const int64 | q = (int64)pow(10.0, (double)precision) |
Fixed point decimal helper.
Definition at line 35 of file Decimal.h.