61#if defined(ONIXS_FMXUST_BIMP_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_FMXUST_BIMP_COMPILER_CXX_RVALUE_REFERENCES
71#if defined(ONIXS_FMXUST_BIMP_COMPILER_CXX_DEFAULTED_FUNCTIONS) && ONIXS_FMXUST_BIMP_COMPILER_CXX_DEFAULTED_FUNCTIONS
155 ONIXS_FMXUST_BIMP_API
156 std::ostream& operator << (std::ostream& stream, const
PriceLevel& value);
163 typedef std::vector<PriceLevel>
Array;
236 virtual
bool doBestAsk (
Price& price,
Quantity& quantity) const = 0;
237 virtual
bool doBestBid (
Price& price,
Quantity& quantity) const = 0;
239 virtual UInt64 doLastMessageSeqNumApplied() const = 0;
281 return level.getPrice();
287 return (level.quantity() != 0);
305 return (l.quantity() == r.quantity() ) && (l.numberOfOrders() == r.numberOfOrders() ) && (l.getPrice() == r.getPrice() );
320 return doBestAsk (price, quantity);
325 return doBestBid (price, quantity);
330 return doInstrumentID();
336 return bids().empty() &&
asks().empty();
341 return doLastMessageSeqNumApplied();
#define ONIXS_FMXUST_BIMP_NOTHROW
std::string toString() const
String presentation of the book.
virtual ~OrderBook()
Destruction interface.
std::string toFormattedString() const
Returns formatted presentation of the book.
bool empty() const ONIXS_FMXUST_BIMP_NOTHROW
Indicates whether book has no bids & asks.
InstrumentId instrumentId() const
Instrument Id.
const PriceLevels & bids() const
Returns a set of ascending ask prices for the given security.
bool bestAsk(Price &price, Quantity &quantity) const
UInt64 lastMessageSeqNumApplied() const
Returns Last Message Seq Num Applied to the Book.
const PriceLevels & asks() const
Returns a set of descending bid prices for the given security.
bool bestBid(Price &price, Quantity &quantity) const
std::string toShortString() const
Returns brief book info.
const Price & getPrice(const PriceLevel &level) ONIXS_FMXUST_BIMP_NOTHROW
Returns value of Price8.
PriceLevelCollections::Array PriceLevels
Sequence of price levels.
Integer8 Quantity
Alias for Quantity type.
SignedInteger8 Price
Alias for Order Id type.
std::vector< OrderInfo > OrderInfos
PriceLevelCollections::ArrayEntry PriceLevelsEntry
Iterator to access price levels with write permissions.
Integer8 OrderId
Alias for Order Id type.
PriceLevelCollections::ArrayConstEntry PriceLevelsConstEntry
Iterator over read-only collection of price levels.
Integer8 InstrumentId
Alias for Instrument Id type.
bool isValid(const PriceLevel &level) ONIXS_FMXUST_BIMP_NOTHROW
Indicates whether the instance of PriceLevel is valid.
OrderInfo() ONIXS_FMXUST_BIMP_NOTHROW
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.
Integer8 timestamp() const ONIXS_FMXUST_BIMP_NOTHROW
Timestamp.
PriceLevel & operator=(const PriceLevel &other)
void updateOrderId(OrderId id, Quantity quantity)
upate order by Id
std::string toString() const
Returns string representation of the instance.
Quantity numberOfOrders() const ONIXS_FMXUST_BIMP_NOTHROW
Total number of orders of given price.
PriceLevel(const Price &price, Quantity quantity=0, Quantity numberOfOrders=0, Integer8 imestamp=0, const OrderInfos &orders=OrderInfos())
Initializes the instances according to specified attributes.
Quantity quantity() const ONIXS_FMXUST_BIMP_NOTHROW
Quantify for the given price.
PriceLevel()
Default initialization.
void removeOrderId(OrderId id)
remove OrderId from the list
const OrderInfos & orders() const ONIXS_FMXUST_BIMP_NOTHROW
returns list of order IDs for the price level
void setPrice(const Price &value) ONIXS_FMXUST_BIMP_NOTHROW
Updates price value.
void addOrderId(OrderId id, Quantity quantity)
add OrderId to the list
PriceLevel(const PriceLevel &)
const Price & getPrice() const ONIXS_FMXUST_BIMP_NOTHROW
Price8 value.
void swap(PriceLevel &) ONIXS_FMXUST_BIMP_NOTHROW
swap values