44 MantissaType mantissa_;
62 Size =
sizeof(Mantissa)
82 : mantissa_(other.mantissa_)
103 mantissa_ = other.mantissa_;
119 <Mantissa, Exponent>& left,
122 <Mantissa, Exponent>& right)
124 return left.mantissa() == right.mantissa();
137 <Mantissa, Exponent>& left,
140 <Mantissa, Exponent>& right)
142 return left.mantissa() != right.mantissa();
155 <Mantissa, Exponent>& left,
158 <Mantissa, Exponent>& right)
160 return left.mantissa() < right.mantissa();
173 <Mantissa, Exponent>& left,
176 <Mantissa, Exponent>& right)
178 return left.mantissa() > right.mantissa();
191 <Mantissa, Exponent>& left,
194 <Mantissa, Exponent>& right)
196 return left.mantissa() <= right.mantissa();
209 <Mantissa, Exponent>& left,
212 <Mantissa, Exponent>& right)
214 return left.mantissa() >= right.mantissa();
251 : mantissa_(mantissa)
252 , exponent_(exponent)
259 : mantissa_(other.mantissa_)
260 , exponent_(other.exponent_)
273 <OtherMantissa, OtherExponent>& other)
274 : mantissa_(other.mantissa())
275 , exponent_(other.exponent())
296 mantissa_ = other.mantissa_;
297 exponent_ = other.exponent_;
312 <OtherMantissa, OtherExponent>& other)
315 exponent_ = other.exponent();
346 <Mantissa, Exponent>& right)
348 return (left ==
Decimal(right));
361 <Mantissa, Exponent>& left,
364 return (
Decimal(left) == right);
378 <Mantissa, Exponent>& right)
380 return (left !=
Decimal(right));
393 <Mantissa, Exponent>& left,
396 return (
Decimal(left) != right);
417 return (right < left);
431 <Mantissa, Exponent>& right)
433 return (left <
Decimal(right));
446 <Mantissa, Exponent>& left,
449 return (
Decimal(left) < right);
463 <Mantissa, Exponent>& right)
465 return (left >
Decimal(right));
478 <Mantissa, Exponent>& left,
481 return (
Decimal(left) > right);
538 <Mantissa, Exponent>& number)
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
std::string toStr(const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
bool fromStr(Decimal &, const char *, size_t)
Mantissa mantissa() const
Returns mantissa of given decimal.
Decimal(const Decimal &other)
Initializes instance as copy of the other one.
DecimalMantissa Mantissa
Aliases mantissa component type.
void decimalToStr(std::string &, Int64, Int32)
Serializes decimal presented by mantissa and exponent into a string.
Int64 DecimalMantissa
Aliases mantissa component type for the decimal type.
bool operator>=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
FixedPointDecimal()
Default (zero) initialization.
Represents real number with constant exponent.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
MantissaType Mantissa
Aliases mantissa component type.
Int32 DecimalExponent
Aliases exponent component type for the decimal type.
FixedPointDecimal(const FixedPointDecimal &other)
Initializes instance as copy of the other one.
ExponentType Exponent
Aliases exponent component type.
DecimalExponent Exponent
Aliases exponent component type.
Decimal()
Default (zero) initialization.
Exponent exponent() const
Returns exponent of given decimal.
Mantissa mantissa() const
Returns mantissa of given decimal.
Decimal(const FixedPointDecimal< OtherMantissa, OtherExponent > &other)
Initializes instance from the fixed point decimal.
A real number with floating exponent.
Decimal(Mantissa mantissa, Exponent exponent)
Explicitly initializes instance from its mantissa value.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const Decimal &right)
bool operator<=(const Decimal &left, const Decimal &right)
FixedPointDecimal(Mantissa mantissa)
Explicitly initializes instance from its mantissa value.
Exponent exponent() const
Returns exponent of given decimal.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN