Incapsulates float type. More...
#include <B2BITS_Decimal.h>
Public Member Functions | |
| Decimal () | |
| Default contructor. | |
| Decimal (System::i64 m, System::i32 e) | |
| Contructor Constructs object from mantissa and exponent. | |
| Decimal (double v) | |
| Contructor Constructs object from double. | |
| Decimal (System::i64 x) | |
| Contructor Constructs object from 64-bit integer. | |
| bool | equals (const Decimal &rv) const |
| Compares two Decimals. | |
| System::i32 | getExponent () const |
| Returns exponent part of the value. | |
| System::i64 | getMantissa () const |
| Returns mantissa part of the value. | |
| bool | operator!= (const Decimal &rv) const |
| Compares two Decimals. | |
| bool | operator== (const Decimal &rv) const |
| Compares two Decimals. | |
| double | toDouble () const |
| Converts stored value to double. | |
| float | toFloat () const |
| Converts stored value to float. | |
| char * | toString (char *buf) const |
| Converts decimal to FIX string. | |
| char * | toString (char *buf, size_t size) const |
| Converts decimal to FIX string. | |
Static Public Member Functions | |
| static Decimal | fromString (AsciiString str) |
| Converts string to Decimal. | |
| static Decimal | fromString (WideString str) |
| Converts wide-string to Decimal. | |
Static Public Attributes | |
| static unsigned int const | ValueSize = 2 + 63 + sizeof("18446744073709551616") |
| Maximum buffer size required to store value. | |
Incapsulates float type.
Definition at line 60 of file B2BITS_Decimal.h.
| Engine::Decimal::Decimal | ( | ) |
Default contructor.
| Engine::Decimal::Decimal | ( | System::i64 | m, |
| System::i32 | e | ||
| ) |
Contructor Constructs object from mantissa and exponent.
| m | Mantissa |
| e | Exponent |
| Engine::Decimal::Decimal | ( | double | v ) |
Contructor Constructs object from double.
| v | Value of the double type |
| precision | Precision |
| Engine::Decimal::Decimal | ( | System::i64 | x ) |
Contructor Constructs object from 64-bit integer.
| x | Value of the i64 type |
| bool Engine::Decimal::equals | ( | const Decimal & | rv ) | const |
Compares two Decimals.
| rv | Value to compare with. |
| static Decimal Engine::Decimal::fromString | ( | AsciiString | str ) | [static] |
Converts string to Decimal.
| static Decimal Engine::Decimal::fromString | ( | WideString | str ) | [static] |
Converts wide-string to Decimal.
| System::i32 Engine::Decimal::getExponent | ( | ) | const [inline] |
Returns exponent part of the value.
Definition at line 77 of file B2BITS_Decimal.h.
| System::i64 Engine::Decimal::getMantissa | ( | ) | const [inline] |
Returns mantissa part of the value.
Definition at line 73 of file B2BITS_Decimal.h.
| bool Engine::Decimal::operator!= | ( | const Decimal & | rv ) | const |
Compares two Decimals.
| rv | Value to compare with. |
| bool Engine::Decimal::operator== | ( | const Decimal & | rv ) | const |
Compares two Decimals.
| rv | Value to compare with. |
| double Engine::Decimal::toDouble | ( | ) | const |
Converts stored value to double.
| float Engine::Decimal::toFloat | ( | ) | const |
Converts stored value to float.
| char* Engine::Decimal::toString | ( | char * | buf ) | const |
Converts decimal to FIX string.
| [out] | buf | Buffer to convert to. Should be enough to store Engine::Decimal::ValueSize bytes. |
Referenced by Engine::PreparedMessage::set().
| char* Engine::Decimal::toString | ( | char * | buf, |
| size_t | size | ||
| ) | const |
Converts decimal to FIX string.
If result string is less than passed buffer, remain chars will be filled with zeros according to FIX protocol.
| [out] | buf | Buffer to convert to. |
| [in] | size | Size of the buffer. |
unsigned int const Engine::Decimal::ValueSize = 2 + 63 + sizeof("18446744073709551616") [static] |
Maximum buffer size required to store value.
Definition at line 69 of file B2BITS_Decimal.h.
1.7.2