OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
MbpBook< EntryType, DepthType > Class Template Reference

Public Types

typedef EntryType Entry
typedef DepthType Depth
typedef VectorOverArray< Entry, DepthEntries
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)
Entriesbids ()
Entriesoperator[] (const Bids &)
const Entriesbids () const
const Entriesoperator[] (const Bids &) const
Entriesoffers ()
Entriesoperator[] (const Offers &)
const Entriesoffers () const
const Entriesoperator[] (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::ConflatedUDP::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 70 of file MbpBook.h.

Member Typedef Documentation

◆ Depth

template<class EntryType, class DepthType>
typedef DepthType Depth

Aliases book dimension type.

Definition at line 82 of file MbpBook.h.

◆ Entries

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

Collection of price levels allowing modifications.

Definition at line 91 of file MbpBook.h.

◆ Entry

template<class EntryType, class DepthType>
typedef EntryType Entry

Indicates price level data type.

Definition at line 77 of file MbpBook.h.

◆ EntryIterator

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

Iterator over bids and offers.

Definition at line 97 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 105 of file MbpBook.h.

◆ ~MbpBook()

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

Definition at line 122 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 161 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 177 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 134 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 127 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 141 of file MbpBook.h.

◆ offers() [1/2]

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

List of ascending offer prices.

Definition at line 192 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 208 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 168 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 185 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 199 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 216 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 240 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 223 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 230 of file MbpBook.h.