OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
TradeOrderIds Class Reference

#include <OnixS/CME/MDH/TradeOrderIds.h>

Public Types

using Details = TradeOrderDetails

Public Member Functions

 TradeOrderIds () noexcept=default
 TradeOrderIds (std::size_t capacity)
bool empty () const noexcept
std::size_t size () const noexcept
const Details & operator[] (std::size_t index) const noexcept
template<class Entry>
void add (const Entry &entry)
void clear () noexcept
void reserve (std::size_t capacity)

Detailed Description

The CME Market Data Platform sends detailed information on the trade in addition to the trade summary. All details on orders are gathered by the Handler during market data processing and exposed through the appropriate callbacks.

Definition at line 87 of file TradeOrderIds.h.

Member Typedef Documentation

◆ Details

Type used to describe each order involved in the trade.

Definition at line 91 of file TradeOrderIds.h.

Constructor & Destructor Documentation

◆ TradeOrderIds() [1/2]

TradeOrderIds ( )
defaultnoexcept

Constructs an empty collection without reserving storage.

◆ TradeOrderIds() [2/2]

TradeOrderIds ( std::size_t capacity)
inlineexplicit

Constructs an empty collection with storage reserved for a number of orders.

Parameters
capacityNumber of order details that can be added without reallocating storage.
Exceptions
Anyexception thrown by std::vector::reserve, including std::length_error or std::bad_alloc when the requested storage cannot be reserved.

Definition at line 100 of file TradeOrderIds.h.

Member Function Documentation

◆ add()

template<class Entry>
void add ( const Entry & entry)
inline

Appends order details obtained from a market data entry.

Template Parameters
EntryMarket data entry type providing orderId() and lastQty().
Parameters
entryEntry containing the order identifier and executed quantity to append.
Exceptions
Anyexception thrown while obtaining or converting the entry attributes or growing the underlying std::vector.

Definition at line 140 of file TradeOrderIds.h.

◆ clear()

void clear ( )
inlinenoexcept

Removes all order details while retaining the allocated storage.

Definition at line 146 of file TradeOrderIds.h.

◆ empty()

bool empty ( ) const
inlinenoexcept

Checks whether the collection contains no order details.

Returns
true when the collection is empty; otherwise false.

Definition at line 108 of file TradeOrderIds.h.

◆ operator[]()

const Details & operator[] ( std::size_t index) const
inlinenoexcept

Accesses order details without runtime bounds checking.

Parameters
indexZero-based index of the details to access.
Returns
Read-only reference to the requested order details.
Note
index must be less than size(). This precondition is asserted in assertion-enabled builds.

Definition at line 127 of file TradeOrderIds.h.

◆ reserve()

void reserve ( std::size_t capacity)
inline

Reserves storage for at least the specified number of order details.

Parameters
capacityNumber of details that can subsequently be stored without reallocation.
Exceptions
Anyexception thrown by std::vector::reserve, including std::length_error or std::bad_alloc when the requested storage cannot be reserved.

Definition at line 155 of file TradeOrderIds.h.

◆ size()

std::size_t size ( ) const
inlinenoexcept

Gets the number of order details in the collection.

Returns
Number of stored order details.

Definition at line 116 of file TradeOrderIds.h.