OnixS C++ CME Market Data Handler  2.56.0.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
BookBase< PriceLevelType > Class Template Reference

Base attributes of order book. More...

Public Types

typedef PriceLevelType PriceLevel
 Indicates price level data type.
 
typedef ArrayRef< const
PriceLevel, MarketDepth > 
PriceLevelsRef
 Indicates reference to array of immutable price levels.
 
typedef ArrayRef< PriceLevel,
MarketDepth > 
EditablePriceLevelsRef
 Indicates reference to array of mutable price levels.
 
typedef VectorOverArray
< PriceLevel, MarketDepth > 
EditablePriceLevels
 Collection of price levels allowing modifications.
 
typedef BookBase< PriceLevelType > This
 Identifies itself as a type.
 

Public Member Functions

SecurityId securityId () const
 Unique instrument Id (tag 48) as qualified by the exchange per tag 22-SecurityIDSource. More...
 
void securityId (SecurityId id)
 Updates unique instrument Id.
 
MarketDepth depth () const
 Returns the maximal number of price levels.
 
void depth (MarketDepth depth)
 Updates the maximal number of price levels.
 
const PriceLevelsRef bids () const
 List of descending bid prices for the security.
 
const PriceLevelsRef asks () const
 List of ascending ask prices for the security.
 
EditablePriceLevelsasks ()
 List of ascending ask prices for the security.
 
EditablePriceLevelsbids ()
 List of descending bid prices for the security.
 
const Messagemessage () const
 Returns FIX message caused update of the book.
 
void message (const Message &message)
 Associates FIX message applied to the book.
 
BookState state () const
 Indicates current state of book.
 
void state (BookState state)
 Updates state of book.
 

Protected Member Functions

 BookBase (SecurityId id, MarketDepth depth, const EditablePriceLevelsRef &bids, const EditablePriceLevelsRef &asks)
 Initializes instance with given attributes. More...
 
 ~BookBase ()
 Cleans everything up.
 
void reset (BookState bookState)
 Wipes out all bids and asks and other data associated with book (like instance of last applied FIX message). More...
 

Detailed Description

template<class PriceLevelType>
class OnixS::CME::MarketData::BookBase< PriceLevelType >

Base attributes of order book.

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

Constructor & Destructor Documentation

BookBase ( SecurityId  id,
MarketDepth  depth,
const EditablePriceLevelsRef bids,
const EditablePriceLevelsRef asks 
)
inlineprotected

Initializes instance with given attributes.

Bids and asks 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.

Member Function Documentation

void reset ( BookState  bookState)
inlineprotected

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

SecurityId securityId ( ) const
inline

Unique instrument Id (tag 48) as qualified by the exchange per tag 22-SecurityIDSource.