OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
MessageSupplements.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
24#include <OnixS/CME/MDH/Order.h>
27
28#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Disable.h>
30#include <OnixS/CME/MDH/Auxiliary/DeprecatedHeaderWarnings.Restore.h>
31
32#include <type_traits>
33#include <utility>
34
36
51template <class Order, class Price>
53{
54 static_assert(std::is_nothrow_copy_constructible<Order>::value, "must be nothrow copy-constructible");
55 static_assert(std::is_nothrow_copy_assignable<Order>::value, "must be nothrow copy-assignable");
56 static_assert(std::is_nothrow_destructible<Order>::value, "must be nothrow destructible");
57 static_assert(std::is_nothrow_copy_constructible<Price>::value, "must be nothrow copy-constructible");
58 static_assert(std::is_nothrow_copy_assignable<Price>::value, "must be nothrow copy-assignable");
59 static_assert(std::is_nothrow_destructible<Price>::value, "must be nothrow destructible");
60 static_assert(noexcept(static_cast<Messaging::OrderUpdateAction::Enum>(std::declval<const Order&>().orderUpdateAction())), "must be noexcept");
61 static_assert(noexcept(std::declval<OrderId&>() = std::declval<const Order&>().orderId()), "must be noexcept");
62 static_assert(noexcept(static_cast<bool>(std::declval<const Order&>().orderPriority(std::declval<OrderPriority&>()))), "must be noexcept");
63 static_assert(noexcept(static_cast<bool>(std::declval<const Order&>().displayQty(std::declval<DisplayQuantity&>()))), "must be noexcept");
64 static_assert(noexcept(static_cast<SecurityId>(std::declval<const Price&>().securityId())), "must be noexcept");
65 static_assert(noexcept(static_cast<Messaging::EntryTypeBook::Enum>(std::declval<const Price&>().entryType())), "must be noexcept");
66 static_assert(noexcept(static_cast<bool>(std::declval<const Price&>().entryPx(std::declval<Messaging::Decimal&>()))), "must be noexcept");
67
68public:
72 IncrementalRefreshBookCombinedEntry(const Order& order, const Price& price) noexcept
73 : order_(order)
74 , price_(price)
75 {
76 }
77
81
86
90 SecurityId securityId() const noexcept
91 {
92 return price_.securityId();
93 }
94
99 {
100 return price_.entryType();
101 }
102
107 {
108 return order_.orderUpdateAction();
109 }
110
114 bool orderId(OrderId& id) const noexcept
115 {
116 id = order_.orderId();
117 return true;
118 }
119
124 bool orderPriority(OrderPriority& priority) const noexcept
125 {
126 return order_.orderPriority(priority);
127 }
128
133 bool entryPx(Messaging::Decimal& price) const noexcept
134 {
135 return price_.entryPx(price);
136 }
137
142 bool displayQty(DisplayQuantity& quantity) const noexcept
143 {
144 return order_.displayQty(quantity);
145 }
146
147private:
148 Order order_;
149 Price price_;
150};
151
155
159
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:69
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:73
#define ONIXS_CMEMDH_NODISCARD
Definition Compiler.h:165
Combines the order and price components of an incremental Market By Order (MBO) book update.
bool displayQty(DisplayQuantity &quantity) const noexcept
Gets the displayed quantity of the affected order.
bool orderId(OrderId &id) const noexcept
Gets the identifier of the affected order.
bool orderPriority(OrderPriority &priority) const noexcept
Gets the matching priority of the affected order.
bool entryPx(Messaging::Decimal &price) const noexcept
Gets the price of the affected order.
Messaging::EntryTypeBook::Enum entryType() const noexcept
Gets the market data entry type.
Messaging::OrderUpdateAction::Enum updateAction() const noexcept
Gets the action to apply to the MBO book.
IncrementalRefreshBookCombinedEntry & operator=(const IncrementalRefreshBookCombinedEntry &other) noexcept=default
Replaces this entry with a copy of another combined entry.
IncrementalRefreshBookCombinedEntry(const Order &order, const Price &price) noexcept
Constructs a combined entry from its order and price components.
IncrementalRefreshBookCombinedEntry(const IncrementalRefreshBookCombinedEntry &other) noexcept=default
Constructs a copy of another combined entry.
SecurityId securityId() const noexcept
Gets the identifier of the security whose MBO book is updated.
Represents an order in a Market By Order (MBO) book.
Definition Order.h:92
FloatingPointDecimal< DecimalMantissa, DecimalExponent > Decimal
Universal decimal type.
Messaging::UInt64 OrderPriority
Represents an order's matching priority.
Definition Order.h:35
Messaging::Int32 SecurityId
Identifies a security in CME MDP 3.0 market data.
Definition Domain.h:31
IncrementalRefreshBookCombinedEntry< Messaging::IncrementalRefreshBookLongQty64::OrderIDEntry, Messaging::IncrementalRefreshBookLongQty64::Entry > IncrementalRefreshBook64CombinedEntry
Combined MBO update entry from an IncrementalRefreshBookLongQty64 message.
Messaging::UInt64 OrderId
Identifies an order in a Market By Order book.
Definition Order.h:32
IncrementalRefreshBookCombinedEntry< Messaging::IncrementalRefreshBook46::OrderIDEntry, Messaging::IncrementalRefreshBook46::Entry > IncrementalRefreshBook46CombinedEntry
Combined MBO update entry from an IncrementalRefreshBook46 message.
Messaging::Int32 DisplayQuantity
Represents the displayed quantity of an order.
Definition Order.h:38