87 operator Int32()
const;
97 operator Int64()
const;
214 throw std::domain_error(
215 "Cannot cast value to target type. ");
226 throw std::domain_error(
227 "Cannot cast value to target type. ");
238 throw std::domain_error(
239 "Cannot cast value to target type. ");
250 throw std::domain_error(
251 "Cannot cast value to target type. ");
262 throw std::domain_error(
263 "Cannot cast value to target type. ");
270 std::string presentation;
#define ONIXS_FIXENGINE_API
The Decimal type for a better precision.
Decimal(DecimalMantissa mantissa=0, DecimalExponent exponent=0)
Initializes an instance from compound components.
bool toNumber(Int32 &) const
Casts to the whole integer number as a regular floating point value is casted.
std::string toString() const
Returns the text presentation of the decimal.
static Decimal parse(const char *buffer, size_t bufferSize)
Parses the decimal from the string presentation.
bool toNumber(Int64 &) const
Casts to the whole integer number as a regular floating point value is casted.
Decimal(Double value, size_t precision=17)
Converts the Double value to a decimal.
DecimalExponent exponent() const
Returns the exponent part of the decimal.
static bool tryParse(const char *buffer, size_t bufferSize, Decimal &)
Attempts to parse the decimal value from its string/text presentation.
bool toNumber(Double &) const
Casts to the floating point number.
void toString(std::string &) const
Appends the text presentation to the given string.
bool toNumber(UInt64 &) const
Casts to the whole integer number as a regular floating point value is casted.
bool toNumber(UInt32 &) const
Casts to the whole integer number as a regular floating point value is casted.
DecimalMantissa mantissa() const
Returns the mantissa part of the decimal.
ONIXS_FIXENGINE_API std::ostream & operator<<(std::ostream &os, const Group &group)
Stream output.
short unsigned int UInt16
unsigned long long UInt64
The helper class for the conversion from a string to a number.
static bool tryParse(const char *buffer, size_t bufferSize, Int32 &number)
static bool tryParse(const char *buffer, size_t bufferSize, UInt32 &number)
static bool tryParse(const char *buffer, size_t bufferSize, UInt64 &number)
static bool tryParse(const char *buffer, size_t bufferSize, Decimal &number)
static bool tryParse(const char *buffer, size_t bufferSize, Double &number)
static bool tryParse(const char *buffer, size_t bufferSize, Int64 &number)