OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
ConsolidatedPriceLevel Class Reference

#include <OnixS/CME/MDH/ConsolidatedPriceLevel.h>

Public Member Functions

constexpr ConsolidatedPriceLevel () noexcept=default
constexpr ConsolidatedPriceLevel (const DirectPriceLevel &direct) noexcept
constexpr ConsolidatedPriceLevel (const ImpliedPriceLevel &implied) noexcept
constexpr ConsolidatedPriceLevel (const DirectPriceLevel &direct, const ImpliedPriceLevel &implied) noexcept
constexpr ConsolidatedPriceLevel (const ConsolidatedPriceLevel &other) noexcept=default
constexpr ConsolidatedPriceLevel (ConsolidatedPriceLevel &&other) noexcept=default
 ~ConsolidatedPriceLevel ()=default
constexpr bool exist () const noexcept
constexpr const Messaging::Decimal & price () const noexcept
constexpr MbpBookQuantity quantity () const noexcept
constexpr const DirectPriceLevel & direct () const noexcept
void consolidate (const DirectPriceLevel &direct) noexcept
constexpr const ImpliedPriceLevel & implied () const noexcept
void consolidate (const ImpliedPriceLevel &implied) noexcept
constexpr operator ImpliedPriceLevel () const noexcept
ConsolidatedPriceLevel & operator= (const ConsolidatedPriceLevel &other) noexcept=default
ConsolidatedPriceLevel & operator= (ConsolidatedPriceLevel &&other) noexcept=default

Detailed Description

Exposes combined direct and implied book data and keeps references to the component price levels used to calculate the consolidated values.

Definition at line 32 of file ConsolidatedPriceLevel.h.

Constructor & Destructor Documentation

◆ ConsolidatedPriceLevel() [1/6]

ConsolidatedPriceLevel ( )
constexprdefaultnoexcept

Constructs a price level with no consolidated data.

◆ ConsolidatedPriceLevel() [2/6]

ConsolidatedPriceLevel ( const DirectPriceLevel & direct)
inlineconstexprnoexcept

Constructs a price level from direct book data only.

Parameters
directDirect price level to reference.

Definition at line 40 of file ConsolidatedPriceLevel.h.

◆ ConsolidatedPriceLevel() [3/6]

ConsolidatedPriceLevel ( const ImpliedPriceLevel & implied)
inlineconstexprnoexcept

Constructs a price level from implied book data only.

Parameters
impliedImplied price level to reference.

Definition at line 48 of file ConsolidatedPriceLevel.h.

◆ ConsolidatedPriceLevel() [4/6]

ConsolidatedPriceLevel ( const DirectPriceLevel & direct,
const ImpliedPriceLevel & implied )
inlineconstexprnoexcept

Constructs a price level from direct and implied book data.

Parameters
directDirect price level to reference.
impliedImplied price level to reference.

Definition at line 57 of file ConsolidatedPriceLevel.h.

◆ ConsolidatedPriceLevel() [5/6]

ConsolidatedPriceLevel ( const ConsolidatedPriceLevel & other)
constexprdefaultnoexcept

Constructs a price level as a copy of another instance.

Parameters
otherPrice level whose component references are copied.

◆ ConsolidatedPriceLevel() [6/6]

ConsolidatedPriceLevel ( ConsolidatedPriceLevel && other)
constexprdefaultnoexcept

Constructs a price level by moving another instance.

Parameters
otherPrice level whose component references are moved.

◆ ~ConsolidatedPriceLevel()

~ConsolidatedPriceLevel ( )
default

Destroys the price level.

Member Function Documentation

◆ consolidate() [1/2]

void consolidate ( const DirectPriceLevel & direct)
inlinenoexcept

Replaces the direct component price level reference.

Parameters
directDirect price level to reference.

Definition at line 116 of file ConsolidatedPriceLevel.h.

◆ consolidate() [2/2]

void consolidate ( const ImpliedPriceLevel & implied)
inlinenoexcept

Replaces the implied component price level reference.

Parameters
impliedImplied price level to reference.

Definition at line 133 of file ConsolidatedPriceLevel.h.

◆ direct()

const DirectPriceLevel & direct ( ) const
inlineconstexprnoexcept

Gets the direct component price level.

Returns
Direct price level referenced by this consolidated level.
Note
Use exist() on the returned reference to check whether direct book data is available.

Definition at line 109 of file ConsolidatedPriceLevel.h.

◆ exist()

bool exist ( ) const
inlineconstexprnoexcept

Checks whether direct or implied data exists at this level.

Returns
true if at least one component price level exists; otherwise false.

Definition at line 77 of file ConsolidatedPriceLevel.h.

◆ implied()

const ImpliedPriceLevel & implied ( ) const
inlineconstexprnoexcept

Gets the implied component price level.

Returns
Implied price level referenced by this consolidated level.
Note
Use exist() on the returned reference to check whether implied book data is available.

Definition at line 126 of file ConsolidatedPriceLevel.h.

◆ operator ImpliedPriceLevel()

operator ImpliedPriceLevel ( ) const
inlineconstexprnoexcept

Converts the consolidated level to an implied-style price level.

Returns
Price level containing the consolidated price and aggregate quantity.

Definition at line 141 of file ConsolidatedPriceLevel.h.

◆ operator=() [1/2]

ConsolidatedPriceLevel & operator= ( ConsolidatedPriceLevel && other)
defaultnoexcept

Replaces this price level by moving another instance.

Parameters
otherPrice level whose component references are moved.
Returns
Reference to this price level.

◆ operator=() [2/2]

ConsolidatedPriceLevel & operator= ( const ConsolidatedPriceLevel & other)
defaultnoexcept

Replaces this price level with a copy of another instance.

Parameters
otherPrice level whose component references are copied.
Returns
Reference to this price level.

◆ price()

const Messaging::Decimal & price ( ) const
inlineconstexprnoexcept

Gets the consolidated price.

Returns
Price from the direct component when it exists; otherwise price from the implied component.
Note
The returned value is meaningful as book data only when exist() returns true. If the consolidated level is absent, this returns the stored/default price from the implied component.

Definition at line 88 of file ConsolidatedPriceLevel.h.

◆ quantity()

MbpBookQuantity quantity ( ) const
inlineconstexprnoexcept

Gets the consolidated aggregate quantity.

Returns
Sum of direct and implied component quantities.
Note
Absent component levels contribute their stored/default quantities. The returned value is meaningful as book data only when exist() returns true.

Definition at line 99 of file ConsolidatedPriceLevel.h.