OnixS C++ CME MDP Premium Market Data Handler 5.10.2
Users' manual and API documentation
Loading...
Searching...
No Matches
FloatingPointDecimal< MantissaType, ExponentType > Class Template Reference

#include <OnixS/CME/MDH/messaging/Decimal.h>

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::CME::MDH::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 62 of file Decimal.h.

◆ Mantissa

template<class MantissaType, class ExponentType>
typedef MantissaType Mantissa

Mantissa component type.

Definition at line 59 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 65 of file Decimal.h.

Constructor & Destructor Documentation

◆ FloatingPointDecimal() [1/5]

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

Default (zero) initialization.

Definition at line 79 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 86 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 122 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 130 of file Decimal.h.

Member Function Documentation

◆ exponent()

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

Definition at line 106 of file Decimal.h.

◆ mantissa()

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

Definition at line 100 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 148 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 112 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 138 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 157 of file Decimal.h.

◆ toString()

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

Definition at line 73 of file Decimal.h.