42 Depth newDepth, Depth maxDepth)
47 "Cannot re-depth order book " 48 "due to lack of capacity [newDepth=";
50 toStr(error, newDepth);
52 error +=
",maxDepth=";
54 toStr(error, maxDepth);
58 throw std::runtime_error(error);
136 return bids_.capacity();
144 if (depth > capacity())
151 if (bids_.size() > depth)
154 if (offers_.size() > depth)
155 offers_.resize(depth);
275 class TargetPriceLevel,
276 class SourcePriceLevel,
293 static_cast<Depth>(-1))
302 target.depth(maxDepth);
325 class PriceLevelType,
382 new Byte [bookSize]);
395 delete []
reinterpret_cast<Byte*
>(book);
409 reinterpret_cast<Entry*
> 411 reinterpret_cast<Byte*
>(block) +
417 entries + 2 * maxDepth);
434 while (first != last)
435 new (first++)
Entry();
void depth(Depth depth)
Updates the maximal number of price levels.
Entries::ConstIterator EntryIterator
Iterator over bids and offers.
const Entries & bids() const
List of descending bid prices.
Tag class for accessing offers in templates.
static Book * inplaceConstruct(Depth maxDepth, void *block)
Constructs book on a given memory block.
Entries & offers()
List of ascending offer prices.
DepthType Depth
Aliases book dimension type.
void toStr(std::string &str, const Message &message)
Serializes FIX message into tag=value format.
EntryType Entry
Indicates price level data type.
static Book * construct(Depth maxDepth)
static void destruct(Book *book)
Destructs previously constructed book.
void throwMbpBookRedepthFailure(Depth newDepth, Depth maxDepth)
Raises exception on book re-depth failure.
UInt8 Byte
Alias for Byte.
const Entries & offers() const
List of ascending offer prices.
Tag class for accessing bids in templates.
Book::Entry Entry
Book entry type.
void state(BookState::Enum state)
Updates state of book.
BookState::Enum state() const
Indicates current state of book.
Serves as a factory for book of given type.
static size_t calcSize(Depth maxDepth)
void copy(MbpBook< TargetPriceLevel, Depth > &target, const MbpBook< SourcePriceLevel, Depth > &source, Depth maxDepth=static_cast< Depth >(-1))
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Entries & bids()
List of descending bid prices.
MbpBook< PriceLevelType, DepthType > Book
Type of book constructed by given factory.
Book::Depth Depth
Book depth type.
Depth depth() const
Returns the maximal number of price levels.
void reset(BookState::Enum bookState)
const Item * ConstIterator
Aliases constant iterator type.
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
VectorOverArray< Entry, Depth > Entries
Collection of price levels allowing modifications.
MbpBook(Depth capacity, Entry *bids, Entry *offers)