Order book cloning has been redesigned to be more efficient in terms of resource (memory) allocations. New features have also been added.
Instead, book snapshot can be constructed single time and updated afterwards:
Previously, entire book was copied to book snapshot. Sometimes, it's desired to limit number of levels being copied to particular number (like one in case of best bid/ask copying). To make this happen, snapshot provides OnixS::CME::MarketData::BookSnapshot::assign member allowing to specify maximal number of price levels to be copied:
Handler allows to obtain book snapshot of any type for any instrument by using corresponding members like OnixS::CME::MarketData::Handler::directBookSnapshot, OnixS::CME::MarketData::Handler::impliedBookSnapshot, OnixS::CME::MarketData::Handler::consolidatedBookSnapshot. All members also provide ability to have limited copy instead of full one.
Currently, OnixS::CME::MarketData::ConsolidatedBook cloning is restricted to copying primary data only. Consolidated book can only cloned as implied book and thus it will be no access to direct and implied book instances making consolidated book. It will be no extended data on a price level available - only results on consolidation.