55#if defined(ONIXS_ESPEED_ITCH_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_ESPEED_ITCH_COMPILER_CXX_RVALUE_REFERENCES
103 void removeOrderId (
OrderId id);
124 typedef std::vector<PriceLevel>
Array;
198 virtual size_t doDepth()
const = 0;
199 virtual bool doBestAsk (
Price8& price,
Quantity& quantity)
const = 0;
200 virtual bool doBestBid (
Price8& price,
Quantity& quantity)
const = 0;
#define ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN
#define ONIXS_ESPEED_ITCH_NAMESPACE_END
#define ONIXS_ESPEED_ITCH_NOTHROW
Int64 Price8
Alias for Price type (8 bytes).
UInt64 OrderId
Alias for OrderId type.
UInt32 OrderBookId
Alias for Security Id type.
UInt32 Quantity
Alias for Quantity type.
PriceLevelCollections::Array PriceLevels
Sequence of price levels.
std::vector< OrderInfo > OrderInfos
PriceLevelCollections::ArrayEntry PriceLevelsEntry
Iterator to access price levels with write permissions.
bool isValid(const PriceLevel &level) ONIXS_ESPEED_ITCH_NOTHROW
PriceLevelCollections::ArrayConstEntry PriceLevelsConstEntry
Iterator over read-only collection of price levels.
void checkSanity(const OrderBook &book)
checks whether the given book is properly built
ONIXS_ESPEED_ITCH_API std::ostream & operator<<(std::ostream &stream, const PriceLevel &value)
const Price8 & getPrice(const PriceLevel &level)
bool bestAsk(Price8 &price, Quantity &quantity) const
std::string toString() const
String presentation of the book.
void setUserPointer(void *pointer)
sets user data pointer
virtual ~OrderBook()
Destruction interface.
std::string toFormattedString() const
Returns formatted presentation of the book.
const PriceLevels & bids() const
Returns a set of ascending ask prices for the given security.
OrderBookId orderBookId() const
Unique instrument Id as qualified.
bool empty() const
Indicates whether book has no bids & asks.
size_t depth() const
Returns the maximum book depth.
void toFormattedString(std::string &) const
Appends Formatted presentation of the book.
const PriceLevels & asks() const
Returns a set of descending bid prices for the given security.
void toString(std::string &) const
String presentation of the book.
OrderBook()
Base initialization.
void toShortString(std::string &) const
Appends brief book info to the string.
bool bestBid(Price8 &price, Quantity &quantity) const
std::string toShortString() const
Returns brief book info.
void * getUserPointer() const
returns kept user data pointer
OrderInfo(OrderId orderId, Quantity quantity)
Miscellaneous traits for PriceLevel class.
Array::iterator ArrayEntry
Mutable entry iterator.
std::vector< PriceLevel > Array
Sequential collection of price levels.
Array::const_iterator ArrayConstEntry
Iterator for read-only access.
Encapsulates price level concept.
PriceLevel & operator=(const PriceLevel &other)
std::string toString() const
Returns string representation of the instance.
PriceLevel(const Price8 &price, Quantity quantity=0, Quantity numberOfOrders=0, const OrderInfos &orders=OrderInfos())
Initializes the instances according to specified attributes.
const OrderInfos & orders() const
orders ids for a given level
const Price8 & price() const
Price value.
void swap(PriceLevel &) ONIXS_ESPEED_ITCH_NOTHROW
swap values
Quantity numberOfOrders() const
Total number of orders of given price.
Quantity quantity() const
Quantify for the given price.
void toString(std::string &) const
Appends representation of the instance to the string.
PriceLevel(const PriceLevel &)