OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
MbpBook< EntryType, DepthType > Class Template Reference

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

Public Types

typedef EntryType Entry
typedef DepthType Depth
typedef VectorOverArray< Entry, Depth > Entries
typedef Entries::ConstIterator EntryIterator

Public Member Functions

 MbpBook (Depth capacity, Entry *bids, Entry *offers)
 ~MbpBook ()
Depth depth () const
Depth capacity () const
void depth (Depth depth)
Entries & bids ()
Entries & operator[] (const Bids &)
const Entries & bids () const
const Entries & operator[] (const Bids &) const
Entries & offers ()
Entries & operator[] (const Offers &)
const Entries & offers () const
const Entries & operator[] (const Offers &) const
BookState::Enum state () const
void state (BookState::Enum state)
void reset (BookState::Enum bookState)

Detailed Description

template<class EntryType, class DepthType>
class OnixS::CME::MDH::MbpBook< EntryType, DepthType >

Base attributes of order book.

A set of bids and offers data for the given security (bids are descending and offers are ascending).

Definition at line 60 of file MbpBook.h.

Member Typedef Documentation

◆ Depth

template<class EntryType, class DepthType>
typedef DepthType Depth

Aliases book dimension type.

Definition at line 69 of file MbpBook.h.

◆ Entries

template<class EntryType, class DepthType>
typedef VectorOverArray<Entry, Depth> Entries

Collection of price levels allowing modifications.

Definition at line 72 of file MbpBook.h.

◆ Entry

template<class EntryType, class DepthType>
typedef EntryType Entry

Indicates price level data type.

Definition at line 66 of file MbpBook.h.

◆ EntryIterator

template<class EntryType, class DepthType>
typedef Entries::ConstIterator EntryIterator

Iterator over bids and offers.

Definition at line 75 of file MbpBook.h.

Constructor & Destructor Documentation

◆ MbpBook()

template<class EntryType, class DepthType>
MbpBook ( Depth capacity,
Entry * bids,
Entry * offers )
inline

Initializes instance with given attributes.

Bids and offers are stored in given segments of plain arrays. Book constructs vectors over input arrays of fixed size. That provides more flexibility on memory layout for internally used data.

Definition at line 83 of file MbpBook.h.

◆ ~MbpBook()

template<class EntryType, class DepthType>
~MbpBook ( )
inline

Definition at line 92 of file MbpBook.h.

Member Function Documentation

◆ bids() [1/2]

template<class EntryType, class DepthType>
Entries & bids ( )
inline

List of descending bid prices.

Definition at line 125 of file MbpBook.h.

◆ bids() [2/2]

template<class EntryType, class DepthType>
const Entries & bids ( ) const
inline

List of descending bid prices.

Definition at line 137 of file MbpBook.h.

◆ capacity()

template<class EntryType, class DepthType>
Depth capacity ( ) const
inline

Indicates book capacity which is maximal value of book depth allowed.

Definition at line 102 of file MbpBook.h.

◆ depth() [1/2]

template<class EntryType, class DepthType>
Depth depth ( ) const
inline

Returns the maximal number of price levels.

Definition at line 95 of file MbpBook.h.

◆ depth() [2/2]

template<class EntryType, class DepthType>
void depth ( Depth depth)
inline

Updates the maximal number of price levels.

Definition at line 108 of file MbpBook.h.

◆ offers() [1/2]

template<class EntryType, class DepthType>
Entries & offers ( )
inline

List of ascending offer prices.

Definition at line 149 of file MbpBook.h.

◆ offers() [2/2]

template<class EntryType, class DepthType>
const Entries & offers ( ) const
inline

List of ascending offer prices.

Definition at line 161 of file MbpBook.h.

◆ operator[]() [1/4]

template<class EntryType, class DepthType>
Entries & operator[] ( const Bids & )
inline

List of descending bid prices.

Definition at line 131 of file MbpBook.h.

◆ operator[]() [2/4]

template<class EntryType, class DepthType>
const Entries & operator[] ( const Bids & ) const
inline

List of descending bid prices.

Definition at line 143 of file MbpBook.h.

◆ operator[]() [3/4]

template<class EntryType, class DepthType>
Entries & operator[] ( const Offers & )
inline

List of ascending offer prices.

Definition at line 155 of file MbpBook.h.

◆ operator[]() [4/4]

template<class EntryType, class DepthType>
const Entries & operator[] ( const Offers & ) const
inline

List of ascending offer prices.

Definition at line 167 of file MbpBook.h.

◆ reset()

template<class EntryType, class DepthType>
void reset ( BookState::Enum bookState)
inline

Wipes out all bids and offers and other data associated with book (like instance of last applied FIX message).

Definition at line 187 of file MbpBook.h.

◆ state() [1/2]

template<class EntryType, class DepthType>
BookState::Enum state ( ) const
inline

Indicates current state of book.

Definition at line 173 of file MbpBook.h.

◆ state() [2/2]

template<class EntryType, class DepthType>
void state ( BookState::Enum state)
inline

Updates state of book.

Definition at line 179 of file MbpBook.h.