Decimal Class Reference

Fixed point decimal helper. More...

#include <Decimal.h>

Inheritance diagram for Decimal:
Numeric IComparable IMemoryValidate IHashable

List of all members.

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 ()
Decimaloperator= (const Decimal &d)
Decimaloperator= (const int32 d)
Decimaloperator= (const int64 d)
Decimaloperator= (const float d)
Decimaloperator= (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)

Detailed Description

Fixed point decimal helper.

Definition at line 35 of file Decimal.h.

The documentation for this class was generated from the following files: