Double Class Reference
[Types]

double helper type. More...

#include <Double.h>

Inheritance diagram for Double:
Numeric IComparable IMemoryValidate IHashable

List of all members.

Public Member Functions

 Double (const double d)
 Double (const Double &d)
virtual int32 HashCode () 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 int ToInt () const
virtual double ToDouble () const
virtual StringPtr ToString () const
 operator double ()
virtual void ValidateMem () const
virtual void CheckMem () const

Static Public Member Functions

static float64 Parse (const char *cp, const int cplen)
static float64 Parse (const String &str)
static float64 Parse (const String *str)
static bool IsDouble (const char *cp, const int cplen)
static bool IsDouble (const String &str)
static bool IsDouble (const String *str)
static bool IsFloat (const char *cp, const int cplen)
static bool IsFloat (const String &str)
static bool IsFloat (const String *str)
static StringPtr ToString (float64 i)
static StringPtr ToString (float32 i)
static bool IsNaN (double d)
static bool IsPositiveZero (double d)
static bool IsNegativeZero (double d)
static double PositiveInfinity ()
static double NegativeInfinity ()
static bool IsPositiveInfinity (double d)
static bool IsNegativeInfinity (double d)

Detailed Description

double helper type.

Definition at line 35 of file Double.h.


Member Function Documentation

static bool Double::IsDouble ( const String str  )  [inline, static]

Test if the argument can be parsed to a double.

Parameters:
str string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 119 of file Double.h.

References IsDouble().

Referenced by IsDouble().

static bool Double::IsDouble ( const String str  )  [inline, static]

Test if the argument can be parsed to a double.

Parameters:
str string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 111 of file Double.h.

References IsDouble().

Referenced by IsDouble().

bool Double::IsDouble ( const char *  cp,
const int  cplen 
) [static]

Test if the argument can be parsed to a double.

Parameters:
cp string representation of a floating point number.
cplen the length of cp.
Returns:
True if Parse() will succeed.

Definition at line 915 of file Numeric.cpp.

Referenced by IsFloat().

static bool Double::IsFloat ( const String str  )  [inline, static]

Test if the argument can be parsed to a float.

Parameters:
str string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 144 of file Double.h.

References IsDouble().

static bool Double::IsFloat ( const String str  )  [inline, static]

Test if the argument can be parsed to a float.

Parameters:
str string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 136 of file Double.h.

References IsDouble().

static bool Double::IsFloat ( const char *  cp,
const int  cplen 
) [inline, static]

Test if the argument can be parsed to a float.

Parameters:
cp string representation of a floating point number.
cplen the length of cp.
Returns:
True if Parse() will succeed.

Definition at line 128 of file Double.h.

References IsDouble().

bool Double::IsNaN ( double  d  )  [static]

Determine if target is not a number

Parameters:
d target number
Returns:
true if target represents the "not a number" value

Definition at line 875 of file Numeric.cpp.

static bool Double::IsNegativeInfinity ( double  d  )  [inline, static]

Determine if target is negative infinity

Parameters:
d target number
Returns:
true if target represents the value for negative infinity

Definition at line 219 of file Double.h.

References NegativeInfinity().

bool Double::IsNegativeZero ( double  d  )  [static]

Determine if target is negative 0

Parameters:
d target number
Returns:
true if target represents the value for negative 0

Definition at line 885 of file Numeric.cpp.

static bool Double::IsPositiveInfinity ( double  d  )  [inline, static]

Determine if target is positive infinity

Parameters:
d target number
Returns:
true if target represents the value for positive infinity

Definition at line 208 of file Double.h.

References PositiveInfinity().

bool Double::IsPositiveZero ( double  d  )  [static]

Determine if target is positive 0.

Parameters:
d target number
Returns:
true if target represents the value for positive 0.

Definition at line 880 of file Numeric.cpp.

double Double::NegativeInfinity (  )  [static]

Determine if target is negative infinity

Parameters:
d target number
Returns:
true if target represents the value for negative infinity

Definition at line 895 of file Numeric.cpp.

Referenced by IsNegativeInfinity().

static float64 Double::Parse ( const String str  )  [inline, static]

Convert the argument to a double.

Exceptions:
InvalidArgumentException if the argument cannot be parsed.
Parameters:
i string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 94 of file Double.h.

References Parse().

Referenced by Parse().

static float64 Double::Parse ( const String str  )  [inline, static]

Convert the argument to a double.

Exceptions:
InvalidArgumentException if the argument cannot be parsed.
Parameters:
str string representation of a floating point number.
Returns:
True if Parse() will succeed.

Definition at line 85 of file Double.h.

References Parse().

Referenced by Parse().

float64 Double::Parse ( const char *  cp,
const int  cplen 
) [static]

Convert the argument to a double.

Exceptions:
InvalidArgumentException if the argument cannot be parsed.
Parameters:
cp string representation of a floating point number.
cplen the length of cp in bytes.
Returns:
True if Parse() will succeed.

Definition at line 910 of file Numeric.cpp.

double Double::PositiveInfinity (  )  [static]

Determine if target is positive 0.

Parameters:
d target number
Returns:
true if target represents the value for positive 0.

Definition at line 890 of file Numeric.cpp.

Referenced by IsPositiveInfinity().

static StringPtr Double::ToString ( float32  i  )  [inline, static]

Creates a string representation of the value

Parameters:
i target number
Returns:
A string representation of the argument. Trailing zeros are truncated.

Definition at line 160 of file Double.h.

References ToString().

Referenced by ToString().

StringPtr Double::ToString ( float64  i  )  [static]

Creates a string representation of the value

Parameters:
i target number
Returns:
A string representation of the argument. Trailing zeros are truncated.

Definition at line 920 of file Numeric.cpp.


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