OnixS C++ CME MDP Premium Market Data Handler  5.8.3
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 <class Order, class Price>
34 {
35 public:
36  /// Initializes instance from order and price components.
37  IncrementalRefreshBookCombinedEntry(const Order& order, const Price& price)
38  : order_(order)
39  , price_(price)
40  {
41  }
42 
43  /// Initializes as copy of the other one.
45  : order_(other.order_)
46  , price_(other.price_)
47  {
48  }
49 
50  /// Security id whose MBO book is to be updated.
52  {
53  return price_.securityId();
54  }
55 
56  /// Type of market data entry.
58  {
59  return price_.entryType();
60  }
61 
62  /// Indicates action of atomic book update.
64  {
65  return order_.orderUpdateAction();
66  }
67 
68  /// Order identifier.
69  bool orderId(OrderId& id) const
70  {
71  id = order_.orderId();
72 
73  return true;
74  }
75 
76  /// Order priority.
77  bool orderPriority(OrderPriority& priority) const
78  {
79  return order_.orderPriority(priority);
80  }
81 
82  /// Price value.
83  bool entryPx(Decimal& price) const
84  {
85  return price_.entryPx(price);
86  }
87 
88  /// Display quantity.
89  bool displayQty(DisplayQuantity& quantity) const
90  {
91  return order_.displayQty(quantity);
92  }
93 
94  /// Re-initializes as copy of the other instance.
96  {
97  order_ = other.order_;
98  price_ = other.price_;
99 
100  return *this;
101  }
102 
103 private:
104  Order order_;
105  Price price_;
106 };
107 
108 //
109 
110 /// Data for MBO book atomic update gathered
111 /// from IncrementalRefreshBook46 message containing
112 /// atomic updates for all types of books.
115 
Data for MBO book atomic update gathered from IncrementalRefreshBook message containing atomic update...
Order as the member of the Market By Order (MBO) book.
Definition: Order.h:72
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
IncrementalRefreshBookCombinedEntry & operator=(const IncrementalRefreshBookCombinedEntry &other)
Re-initializes as copy of the other instance.
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:136
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:67
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.
IncrementalRefreshBookCombinedEntry< IncrementalRefreshBook46::OrderIDEntry, IncrementalRefreshBook46::Entry > IncrementalRefreshBook46CombinedEntry
Data for MBO book atomic update gathered from IncrementalRefreshBook46 message containing atomic upda...
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:68