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. | |
EditablePriceLevels & | asks () |
List of ascending ask prices for the security. | |
EditablePriceLevels & | bids () |
List of descending bid prices for the security. | |
const Message & | message () 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... | |
Base attributes of order book.
A set of bids and asks data for the given security (bids are descending and asks are ascending).
|
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.
|
inlineprotected |
Wipes out all bids and asks and other data associated with book (like instance of last applied FIX message).
|
inline |
Unique instrument Id (tag 48) as qualified by the exchange per tag 22-SecurityIDSource.