Definition at line 47 of file Numeric.h.
◆ Decimal() [1/2]
Initializes an instance from compound components.
Definition at line 168 of file Numeric.h.
◆ Decimal() [2/2]
Converts the Double value to a decimal.
- Parameters
-
value | The double precision floating-point value. |
precision | Defines the conversion precision. |
◆ exponent() [1/2]
Returns the exponent part of the decimal.
Definition at line 193 of file Numeric.h.
◆ exponent() [2/2]
Updates the exponent part of the decimal.
Definition at line 200 of file Numeric.h.
◆ mantissa() [1/2]
Returns the mantissa part of the decimal.
Definition at line 178 of file Numeric.h.
◆ mantissa() [2/2]
Updates the mantissa part of the decimal.
Definition at line 185 of file Numeric.h.
◆ operator Double()
Casts to the whole integer number as a regular floating point value is casted.
- Exceptions
-
The | domain_error exception on a failure. |
Definition at line 255 of file Numeric.h.
◆ operator Int32()
Casts to the whole integer number as a regular floating point value is casted.
- Exceptions
-
The | domain_error exception on a failure. |
Definition at line 207 of file Numeric.h.
◆ operator Int64()
Casts to the whole integer number as a regular floating point value is casted.
- Exceptions
-
The | domain_error exception on a failure. |
Definition at line 231 of file Numeric.h.
◆ operator UInt32()
Casts to the whole integer number as a regular floating point value is casted.
- Exceptions
-
The | domain_error exception on a failure. |
Definition at line 219 of file Numeric.h.
◆ operator UInt64()
Casts to the whole integer number as a regular floating point value is casted.
- Exceptions
-
The | domain_error exception on a failure. |
Definition at line 243 of file Numeric.h.
◆ operator!=()
bool operator!= |
( |
const Decimal & | | ) |
const |
◆ operator<()
bool operator< |
( |
const Decimal & | | ) |
const |
◆ operator==()
bool operator== |
( |
const Decimal & | | ) |
const |
◆ operator>()
bool operator> |
( |
const Decimal & | | ) |
const |
◆ parse()
Decimal parse |
( |
const char * | buffer, |
|
|
size_t | bufferSize ) |
|
static |
Parses the decimal from the string presentation.
- Exceptions
-
The | std::exception on a failure. |
◆ toNumber() [1/5]
bool toNumber |
( |
Double & | | ) |
const |
Casts to the floating point number.
- Returns
- false if the conversion fails.
◆ toNumber() [2/5]
bool toNumber |
( |
Int32 & | | ) |
const |
Casts to the whole integer number as a regular floating point value is casted.
- Returns
- false if the conversion fails.
◆ toNumber() [3/5]
bool toNumber |
( |
Int64 & | | ) |
const |
Casts to the whole integer number as a regular floating point value is casted.
- Returns
- false if the conversion fails.
◆ toNumber() [4/5]
bool toNumber |
( |
UInt32 & | | ) |
const |
Casts to the whole integer number as a regular floating point value is casted.
- Returns
- false if the conversion fails.
◆ toNumber() [5/5]
bool toNumber |
( |
UInt64 & | | ) |
const |
Casts to the whole integer number as a regular floating point value is casted.
- Returns
- false if the conversion fails.
◆ toString() [1/2]
std::string toString |
( |
| ) |
const |
|
inline |
Returns the text presentation of the decimal.
Definition at line 268 of file Numeric.h.
◆ toString() [2/2]
void toString |
( |
std::string & | | ) |
const |
Appends the text presentation to the given string.
◆ tryParse()
bool tryParse |
( |
const char * | buffer, |
|
|
size_t | bufferSize, |
|
|
Decimal & | ) |
|
static |
Attempts to parse the decimal value from its string/text presentation.
- Returns
- false on the parsing failure.