43 template<
class MantissaType,
class ExponentType>
47 MantissaType mantissa_;
82 : mantissa_(other.mantissa_)
93 ONIXS_BATS_BOE_CONSTEXPR
102 mantissa_ = other.mantissa_;
109 template<
class Mantissa,
class Exponent>
116 template <
class Mantissa,
class Exponent>
123 template<
class Mantissa,
class Exponent>
126 return left.
mantissa() < right.mantissa();
130 template<
class Mantissa,
class Exponent>
137 template<
class Mantissa,
class Exponent>
140 return left.
mantissa() <= right.mantissa();
144 template<
class Mantissa,
class Exponent>
152 ONIXS_CBOE_CFE_BOE_API
void decimalToStr(std::string&, Int64, Int32);
155 template <
class Mantissa,
class Exponent>
162 template<
class Mantissa,
class Exponent>
173 template<
class Mantissa,
class Exponent>
174 std::ostream& operator << (std::ostream& stream, const FixedPointDecimal<Mantissa, Exponent>& number)
176 return stream <<
toStr(number);
Mantissa mantissa() const
Returns mantissa of given decimal.
FixedPointDecimal & operator=(const FixedPointDecimal &other)
Re-initializes instance as copy of the other one.
ONIXS_BATS_BOE_CONSTEXPR Exponent exponent() const
Returns exponent of given decimal.
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
ONIXS_CBOE_CFE_BOE_API void decimalToStr(std::string &, Int64, Int32)
void toStr(std::string &str, const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
ExponentType Exponent
Aliases exponent component type.
bool operator>=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
FixedPointDecimal(Mantissa mantissa)
Explicitly initializes instance from its mantissa value.
FixedPointDecimal(const FixedPointDecimal &other)
Initializes instance as copy of the other one.
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
MantissaType Mantissa
Aliases mantissa component type.
FixedPointDecimal()
Default (zero) initialization.