OnixS C++ CME Market Data Handler  5.4.0
API documentation
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 
23 #include <OnixS/CME/MDH/Order.h>
24 #include <OnixS/CME/MDH/Messages.h>
25 #include <OnixS/CME/MDH/Security.h>
26 
28 
29 /// Data for MBO book atomic update gathered
30 /// from IncrementalRefreshBook message containing
31 /// atomic updates for all types of books.
32 template
33 <
34  class Order,
35  class Price
36 >
37 class
39 {
40  Order order_;
41  Price price_;
42 
43 public:
44  /// Initializes instance from order and price components.
46  const Order& order, const Price& price)
47  : order_(order), price_(price)
48  {
49  }
50 
51  /// Initializes as copy of the other one.
54  : order_(other.order_), price_(other.price_)
55  {
56  }
57 
58  /// Security id whose MBO book is to be updated.
60  {
61  return price_.securityId();
62  }
63 
64  /// Type of market data entry.
66  entryType() const
67  {
68  return price_.entryType();
69  }
70 
71  /// Indicates action of atomic book update.
73  updateAction() const
74  {
75  return order_.orderUpdateAction();
76  }
77 
78  /// Order identifier.
79  bool
81  OrderId& id) const
82  {
83  id = order_.orderId();
84 
85  return true;
86  }
87 
88  /// Order priority.
89  bool
91  OrderPriority& priority) const
92  {
93  return order_.orderPriority(priority);
94  }
95 
96  /// Price value.
97  bool
99  Decimal& price) const
100  {
101  return price_.entryPx(price);
102  }
103 
104  /// Display quantity.
105  bool
107  DisplayQuantity& quantity) const
108  {
109  return order_.displayQty(quantity);
110  }
111 
112  /// Re-initializes as copy of the other instance.
114  operator =(
115  const
117  {
118  order_ = other.order_;
119  price_ = other.price_;
120 
121  return *this;
122  }
123 };
124 
125 //
126 
127 /// Data for MBO book atomic update gathered
128 /// from IncrementalRefreshBook46 message containing
129 /// atomic updates for all types of books.
130 typedef
132 <
135 >
137 
IncrementalRefreshBookCombinedEntry< IncrementalRefreshBook46::OrderIDEntry, IncrementalRefreshBook46::Entry > IncrementalRefreshBook46CombinedEntry
Order as the member of the Market By Order (MBO) book.
Definition: Order.h:79
Int32 SecurityId
Unique security identifier.
Definition: Domain.h:31
IncrementalRefreshBookCombinedEntry(const Order &order, const Price &price)
Initializes instance from order and price components.
Int32 DisplayQuantity
Presents display quantity.
Definition: Order.h:35
OrderUpdateAction::Enum updateAction() const
Indicates action of atomic book update.
SecurityId securityId() const
Security id whose MBO book is to be updated.
A real number with floating exponent.
Definition: Decimal.h:231
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:152
bool entryPx(Decimal &price) const
Price value.
bool orderPriority(OrderPriority &priority) const
Order priority.
bool orderId(OrderId &id) const
Order identifier.
bool displayQty(DisplayQuantity &quantity) const
Display quantity.
UInt64 OrderId
Type for order identification.
Definition: Order.h:29
EntryTypeBook::Enum entryType() const
Type of market data entry.
IncrementalRefreshBookCombinedEntry(const IncrementalRefreshBookCombinedEntry &other)
Initializes as copy of the other one.
UInt64 OrderPriority
Type for order priority.
Definition: Order.h:32
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:156