OnixS C++ B3 BOE Binary Order Entry 1.3.0
API Documentation
Loading...
Searching...
No Matches
FloatingPointDecimal< MantissaType, ExponentType > Class Template Reference

Public Types

enum  
typedef MantissaType Mantissa
typedef ExponentType Exponent

Public Member Functions

std::string toString () const
constexpr FloatingPointDecimal () noexcept
constexpr FloatingPointDecimal (Mantissa mantissa, Exponent exponent) noexcept
constexpr FloatingPointDecimal (const FloatingPointDecimal &other) noexcept
Mantissa mantissa () const noexcept
Exponent exponent () const noexcept
FloatingPointDecimaloperator= (const FloatingPointDecimal &other) noexcept
template<class OtherMantissa, class OtherExponent>
 FloatingPointDecimal (const FloatingPointDecimal< OtherMantissa, OtherExponent > &other) noexcept
template<class OtherMantissa, class OtherExponent>
 FloatingPointDecimal (const FixedPointDecimal< OtherMantissa, OtherExponent > &other) noexcept
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimaloperator= (const FloatingPointDecimal< OtherMantissa, OtherExponent > &other) noexcept
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimaloperator= (const FixedPointDecimal< OtherMantissa, OtherExponent > &other) noexcept
void serialize (void *addr) const noexcept

Detailed Description

template<class MantissaType, class ExponentType>
class OnixS::B3::BOE::Messaging::FloatingPointDecimal< MantissaType, ExponentType >

Definition at line 38 of file Decimal.h.

Member Typedef Documentation

◆ Exponent

template<class MantissaType, class ExponentType>
typedef ExponentType Exponent

Exponent component type.

Definition at line 59 of file Decimal.h.

◆ Mantissa

template<class MantissaType, class ExponentType>
typedef MantissaType Mantissa

Mantissa component type.

Definition at line 56 of file Decimal.h.

Member Enumeration Documentation

◆ anonymous enum

template<class MantissaType, class ExponentType>
anonymous enum

Traits.

Enumerator
Size sizeof(Mantissa) + sizeof(Exponent) 

Size of the class in bytes.

Definition at line 62 of file Decimal.h.

Constructor & Destructor Documentation

◆ FloatingPointDecimal() [1/5]

template<class MantissaType, class ExponentType>
FloatingPointDecimal ( )
inlineconstexprnoexcept

Default (zero) initialization.

Definition at line 77 of file Decimal.h.

◆ FloatingPointDecimal() [2/5]

template<class MantissaType, class ExponentType>
FloatingPointDecimal ( Mantissa mantissa,
Exponent exponent )
inlineconstexprnoexcept

Explicitly initializes the instance from the mantissa and exponent values.

Definition at line 85 of file Decimal.h.

◆ FloatingPointDecimal() [3/5]

template<class MantissaType, class ExponentType>
FloatingPointDecimal ( const FloatingPointDecimal< MantissaType, ExponentType > & other)
inlineconstexprnoexcept

Initializes the instance as a copy of the given one.

Definition at line 93 of file Decimal.h.

◆ FloatingPointDecimal() [4/5]

template<class MantissaType, class ExponentType>
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimal ( const FloatingPointDecimal< OtherMantissa, OtherExponent > & other)
inlineexplicitnoexcept

Initializes the instance from the floating point decimal.

Definition at line 124 of file Decimal.h.

◆ FloatingPointDecimal() [5/5]

template<class MantissaType, class ExponentType>
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimal ( const FixedPointDecimal< OtherMantissa, OtherExponent > & other)
inlineexplicitnoexcept

Initializes the instance from the fixed point decimal.

Definition at line 132 of file Decimal.h.

Member Function Documentation

◆ exponent()

template<class MantissaType, class ExponentType>
Exponent exponent ( ) const
inlinenoexcept
Returns
exponent.

Definition at line 107 of file Decimal.h.

◆ mantissa()

template<class MantissaType, class ExponentType>
Mantissa mantissa ( ) const
inlinenoexcept
Returns
mantissa.

Definition at line 101 of file Decimal.h.

◆ operator=() [1/3]

template<class MantissaType, class ExponentType>
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimal & operator= ( const FixedPointDecimal< OtherMantissa, OtherExponent > & other)
inlinenoexcept

Re-initializes instance as a copy of the fixed point value.

Definition at line 161 of file Decimal.h.

◆ operator=() [2/3]

template<class MantissaType, class ExponentType>
FloatingPointDecimal & operator= ( const FloatingPointDecimal< MantissaType, ExponentType > & other)
inlinenoexcept

Re-initializes the instance as copy of the given one.

Definition at line 113 of file Decimal.h.

◆ operator=() [3/3]

template<class MantissaType, class ExponentType>
template<class OtherMantissa, class OtherExponent>
FloatingPointDecimal & operator= ( const FloatingPointDecimal< OtherMantissa, OtherExponent > & other)
inlinenoexcept

Re-initializes instance as a copy of the floating point value.

Definition at line 145 of file Decimal.h.

◆ serialize()

template<class MantissaType, class ExponentType>
void serialize ( void * addr) const
inlinenoexcept

Serializes to the given data buffer.

Definition at line 170 of file Decimal.h.

◆ toString()

template<class MantissaType, class ExponentType>
std::string toString ( ) const
inline
Returns
a human-readable presentation.

Definition at line 70 of file Decimal.h.