OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler 1.12.0
API documentation
Loading...
Searching...
No Matches
FixedPointDecimal< MantissaType, ExponentType > Class Template Reference

Public Types

enum  
typedef MantissaType Mantissa
typedef ExponentType Exponent

Public Member Functions

 FixedPointDecimal ()
 FixedPointDecimal (Mantissa mantissa)
 FixedPointDecimal (const FixedPointDecimal &other)
Mantissa mantissa () const
ONIXS_BATS_BOE_CONSTEXPR Exponent exponent () const
FixedPointDecimaloperator= (const FixedPointDecimal &other)

Detailed Description

template<class MantissaType, class ExponentType>
class OnixS::CboeCFE::Trading::BOE::FixedPointDecimal< MantissaType, ExponentType >

Represents real number with constant exponent.

BOE Platform currently operates prices and scaling factors as real numbers with constant exponent. This class implements concept of fixed point decimal and lets to dramatically improve performance of book-related operations.

Definition at line 44 of file Decimal.h.

Member Typedef Documentation

◆ Exponent

template<class MantissaType, class ExponentType>
typedef ExponentType Exponent

Aliases exponent component type.

Definition at line 54 of file Decimal.h.

◆ Mantissa

template<class MantissaType, class ExponentType>
typedef MantissaType Mantissa

Aliases mantissa component type.

Definition at line 51 of file Decimal.h.

Member Enumeration Documentation

◆ anonymous enum

template<class MantissaType, class ExponentType>
anonymous enum

A few traits.

Enumerator
Size sizeof(Mantissa) 

Size of class in bytes.

Instantiations of given class are used while manipulating binary messages. Regular composites expose given characteristics so as this template class does.

Definition at line 57 of file Decimal.h.

Constructor & Destructor Documentation

◆ FixedPointDecimal() [1/3]

template<class MantissaType, class ExponentType>
FixedPointDecimal ( )
inline

Default (zero) initialization.

Definition at line 69 of file Decimal.h.

◆ FixedPointDecimal() [2/3]

template<class MantissaType, class ExponentType>
FixedPointDecimal ( Mantissa mantissa)
inlineexplicit

Explicitly initializes instance from its mantissa value.

Definition at line 75 of file Decimal.h.

◆ FixedPointDecimal() [3/3]

template<class MantissaType, class ExponentType>
FixedPointDecimal ( const FixedPointDecimal< MantissaType, ExponentType > & other)
inline

Initializes instance as copy of the other one.

Definition at line 81 of file Decimal.h.

Member Function Documentation

◆ exponent()

template<class MantissaType, class ExponentType>
ONIXS_BATS_BOE_CONSTEXPR Exponent exponent ( ) const
inline

Returns exponent of given decimal.

Definition at line 94 of file Decimal.h.

◆ mantissa()

template<class MantissaType, class ExponentType>
Mantissa mantissa ( ) const
inline

Returns mantissa of given decimal.

Definition at line 87 of file Decimal.h.

◆ operator=()

template<class MantissaType, class ExponentType>
FixedPointDecimal & operator= ( const FixedPointDecimal< MantissaType, ExponentType > & other)
inline

Re-initializes instance as copy of the other one.

Definition at line 100 of file Decimal.h.