#include <Decimal.h>
Decimal type for better precision.
Definition at line 42 of file Decimal.h.
Default constructor. Initializes the decimal value to zero.
Definition at line 176 of file Decimal.h.
Initializes instance from compound components.
Initializes instance with zero exponent.
Converts from Double value using default conversion precision.
Converts Double value to decimal.
- Parameters
-
value | double precision floating-point value. |
precision | defines conversion precision. |
Initializes as copy of given value.
Returns exponent part of decimal.
Definition at line 187 of file Decimal.h.
Returns mantissa part of decimal.
Definition at line 182 of file Decimal.h.
Casts to whole floating point as regular value is casted to a smaller precision.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 232 of file Decimal.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 192 of file Decimal.h.
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 212 of file Decimal.h.
operator UInt32 |
( |
| ) |
const |
|
inline |
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 202 of file Decimal.h.
operator UInt64 |
( |
| ) |
const |
|
inline |
Casts to whole integer number as regular floating point value is casted.
- Exceptions
-
domain_error | exception on failure. |
Definition at line 222 of file Decimal.h.
bool operator!= |
( |
const Decimal & |
| ) |
const |
Reinitializes instance from another one.
bool operator== |
( |
const Decimal & |
| ) |
const |
static Decimal parse |
( |
const char * |
buffer, |
|
|
size_t |
bufferSize |
|
) |
| |
|
static |
Parses decimal from string presentation.
- Exceptions
-
std::exception | on failure. |
bool toNumber |
( |
SInt32 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
UInt32 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
SInt64 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
UInt64 & |
| ) |
const |
Casts to whole integer number as regular floating point value is casted.
- Returns
- false if conversion fails.
bool toNumber |
( |
Double & |
| ) |
const |
Casts to floating point number.
- Returns
- false if conversion fails.
void toString |
( |
std::string & |
| ) |
const |
Appends text presentation to given string.
std::string toString |
( |
| ) |
const |
|
inline |
Returns text presentation of decimal.
Definition at line 242 of file Decimal.h.
static bool tryParse |
( |
const char * |
buffer, |
|
|
size_t |
bufferSize, |
|
|
Decimal & |
|
|
) |
| |
|
static |
Attempts to parse decimal value from its string/text presentation.
- Returns
- false on parsing failure.
The documentation for this class was generated from the following file:
- /work/include/OnixS/Tradeweb/MarketData/Apa/Decimal.h