OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.0
API documentation
EobiListenerHolder.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
5 *
6 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
7 * and international copyright treaties.
8 *
9 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
10 * Services Agreement (the Agreement) and Customer end user license agreements granting
11 * a non-assignable, non-transferable and non-exclusive license to use the software
12 * for it's own data processing purposes under the terms defined in the Agreement.
13 *
14 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
15 * of this source code or associated reference material to any other location for further reproduction
16 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
17 *
18 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
19 * the terms of the Agreement is a violation of copyright law.
20 */
21 
22 #pragma once
23 
24 #include <logging/LogFacility.h>
25 
26 #include <OnixS/HandlerCore/HandlerLogger.h>
27 
31 
32 
33 
34 namespace OnixS {
35 namespace Eurex {
36 namespace MarketData {
37 
38 class WarningListener;
39 class PacketListener;
40 
41 namespace EOBI {
42 
43 class OrderDataListener;
44 class TradeDataListener;
45 class StateChangeListener;
46 class ReferenceDataListener;
47 class SnapshotListener;
48 class MessageListener;
49 class OrderBookListener;
50 
51 class OrderAdd;
52 class OrderModify;
53 class OrderModifySamePriority;
54 class OrderDelete;
55 class OrderMassDelete;
56 class FullOrderExecution;
57 class PartialOrderExecution;
58 class TradeReversal;
59 class TradeReport;
60 class ExecutionSummary;
61 class ProductStateChange;
62 class InstrumentStateChange;
63 class MassInstrumentStateChange;
64 class AddComplexInstrument;
65 class AuctionBestBidOffer;
66 class AuctionClearingPrice;
67 class CrossRequest;
68 class QuoteRequest;
69 class TopOfBook;
70 class ProductSummary;
71 class InstrumentSummary;
72 class SnapshotOrder;
73 
74 
75 namespace Implementation {
76 
77 class OrderBookInternal;
78 
79 
80 class EobiListenerHolder : public Logging::LogFacility
81 {
82  typedef OnixS::Logging::LogFacility base;
83 
84 public:
85  explicit
87  const Logging::LogFacility* parent,
88  HandlerCore::Common::HandlerLogger* logger = nullptr);
89 
90 
91 public:
92  void set(ErrorListener* listener) ONIXS_NOEXCEPT;
93  void set(WarningListener* listener) ONIXS_NOEXCEPT;
94  void set(HandlerStateListener* listener) ONIXS_NOEXCEPT;
95  void set(OrderDataListener* orderDataListener) ONIXS_NOEXCEPT;
96  void set(TradeDataListener* tradeDataListener) ONIXS_NOEXCEPT;
97  void set(StateChangeListener* stateChangeListener) ONIXS_NOEXCEPT;
98  void set(ReferenceDataListener* referenceDataListener) ONIXS_NOEXCEPT;
99  void set(SnapshotListener* snapshotListener) ONIXS_NOEXCEPT;
100  void set(MessageListener* messageListener) ONIXS_NOEXCEPT;
101  void set(OrderBookListener* orderBookListener) ONIXS_NOEXCEPT;
102  void set(PacketListener* packetListener) ONIXS_NOEXCEPT;
103 
104  bool hasErrorListener() const ONIXS_NOEXCEPT;
105  bool hasWarningListener() const ONIXS_NOEXCEPT;
106  bool hasHandlerStateListener() const ONIXS_NOEXCEPT;
107  bool hasOrderDataListener() const ONIXS_NOEXCEPT;
108  bool hasTradeDataListener() const ONIXS_NOEXCEPT;
109  bool hasStateChangeListener() const ONIXS_NOEXCEPT;
110  bool hasReferenceDataListener() const ONIXS_NOEXCEPT;
111  bool hasSnapshotListener() const ONIXS_NOEXCEPT;
112  bool hasMessageListener() const ONIXS_NOEXCEPT;
113  bool hasOrderBookListener() const ONIXS_NOEXCEPT;
114  bool hasPacketListener() const ONIXS_NOEXCEPT;
115 
116 
117 public:
118  void invokeError(ErrorCode::Enum code, const std::string& description) ONIXS_NOEXCEPT;
119 
120  void invokeWarning(const std::string& description) ONIXS_NOEXCEPT;
121 
122  void invokeStateChanged(HandlerState::Enum newState) ONIXS_NOEXCEPT;
123 
124  void invokeOrderAdd(const OrderAdd& orderAddListener) ONIXS_NOEXCEPT;
125 
126  void invokeOrderModify(const OrderModify& orderModifyListener) ONIXS_NOEXCEPT;
127 
128  void invokeOrderModifySamePriority(const OrderModifySamePriority& orderModifyListener) ONIXS_NOEXCEPT;
129 
130  void invokeOrderDelete(const OrderDelete& orderDeleteListener) ONIXS_NOEXCEPT;
131 
132  void invokeOrderMassDelete(const OrderMassDelete& orderMassDeleteListener) ONIXS_NOEXCEPT;
133 
134  void invokeFullOrderExecution(const FullOrderExecution& fullOrderExecutionListener) ONIXS_NOEXCEPT;
135 
136  void invokePartialOrderExecution(const PartialOrderExecution& partialOrderExecutionListener) ONIXS_NOEXCEPT;
137 
138  void invokeTradeReversal(const TradeReversal& tradeReversalListener) ONIXS_NOEXCEPT;
139 
140  void invokeTradeReport(const TradeReport& tradeReportListener) ONIXS_NOEXCEPT;
141 
142  void invokeExecutionSummary(const ExecutionSummary& executionSummaryListener) ONIXS_NOEXCEPT;
143 
144  void invokeProductStateChange(const ProductStateChange& productStateChangeListener) ONIXS_NOEXCEPT;
145 
146  void invokeInstrumentStateChange(const InstrumentStateChange& instrumentStateChangeListener) ONIXS_NOEXCEPT;
147 
148  void invokeMassInstrumentStateChange(const MassInstrumentStateChange& instrumentStateChangeListener) ONIXS_NOEXCEPT;
149 
150  void invokeAddComplexInstrument(const AddComplexInstrument& addComplexInstrumentListener) ONIXS_NOEXCEPT;
151 
152  void invokeAuctionBestBidOffer(const AuctionBestBidOffer& auctionBestBidOfferListener) ONIXS_NOEXCEPT;
153 
154  void invokeAuctionClearingPrice(const AuctionClearingPrice& auctionClearingPriceListener) ONIXS_NOEXCEPT;
155 
156  void invokeCrossRequest(const CrossRequest& crossRequestListener) ONIXS_NOEXCEPT;
157 
158  void invokeQuoteRequest(const QuoteRequest& quoteRequestListener) ONIXS_NOEXCEPT;
159 
160  void invokeTopOfBook(const TopOfBook& topOfBookListener) ONIXS_NOEXCEPT;
161 
162  void invokeProductSummary(const ProductSummary& productSummaryListener) ONIXS_NOEXCEPT;
163 
164  void invokeInstrumentSummary(const InstrumentSummary& instrumentSummaryListener) ONIXS_NOEXCEPT;
165 
166  void invokeSnapshotOrder(const SnapshotOrder& snapshotOrderListener) ONIXS_NOEXCEPT;
167 
168  void invokeSnapshotCycleBegin() ONIXS_NOEXCEPT;
169 
170  void invokeSnapshotCycleEnd() ONIXS_NOEXCEPT;
171 
172  void invokeDepthReset(MarketSegmentId marketSegmentId) ONIXS_NOEXCEPT;
173 
174  void invokeDepthOutOfDate(MarketSegmentId marketSegmentId) ONIXS_NOEXCEPT;
175 
176  void invokeOrderBookUpdated(const OrderBookInternal&) ONIXS_NOEXCEPT;
177 
178  void invokeOrderBookOutOfDate(const OrderBookInternal&) ONIXS_NOEXCEPT;
179 
180  void invokePacketProcessingBegin(const DataSource&) ONIXS_NOEXCEPT;
181 
182  void invokePacketProcessingEnd(const DataSource&) ONIXS_NOEXCEPT;
183 
184 
185 private:
186  HandlerCore::Common::HandlerLogger* const logger_;
187 
188  ErrorListener* errorListener_;
189  WarningListener* warningListener_;
190  HandlerStateListener* handlerStateListener_;
191  OrderDataListener* orderDataListener_;
192  TradeDataListener* tradeDataListener_;
193  StateChangeListener* stateChangeListener_;
194  ReferenceDataListener* referenceDataListener_;
195  SnapshotListener* snapshotListener_;
196  MessageListener* messageListener_;
197  OrderBookListener* orderBookListener_;
198  PacketListener* packetListener_;
199 };
200 
201 
202 }}}}}
203 
void invokeTopOfBook(const TopOfBook &topOfBookListener) ONIXS_NOEXCEPT
void invokeProductSummary(const ProductSummary &productSummaryListener) ONIXS_NOEXCEPT
void invokeOrderMassDelete(const OrderMassDelete &orderMassDeleteListener) ONIXS_NOEXCEPT
void invokeOrderBookOutOfDate(const OrderBookInternal &) ONIXS_NOEXCEPT
void invokeTradeReport(const TradeReport &tradeReportListener) ONIXS_NOEXCEPT
void invokeOrderModify(const OrderModify &orderModifyListener) ONIXS_NOEXCEPT
void invokeFullOrderExecution(const FullOrderExecution &fullOrderExecutionListener) ONIXS_NOEXCEPT
void invokeStateChanged(HandlerState::Enum newState) ONIXS_NOEXCEPT
EobiListenerHolder(const Logging::LogFacility *parent, HandlerCore::Common::HandlerLogger *logger=nullptr)
void invokeDepthReset(MarketSegmentId marketSegmentId) ONIXS_NOEXCEPT
void invokeExecutionSummary(const ExecutionSummary &executionSummaryListener) ONIXS_NOEXCEPT
void invokeTradeReversal(const TradeReversal &tradeReversalListener) ONIXS_NOEXCEPT
void invokeQuoteRequest(const QuoteRequest &quoteRequestListener) ONIXS_NOEXCEPT
Definition: Defines.h:30
Product State Change listener.
void invokeCrossRequest(const CrossRequest &crossRequestListener) ONIXS_NOEXCEPT
void invokeMassInstrumentStateChange(const MassInstrumentStateChange &instrumentStateChangeListener) ONIXS_NOEXCEPT
void invokeInstrumentSummary(const InstrumentSummary &instrumentSummaryListener) ONIXS_NOEXCEPT
void invokeWarning(const std::string &description) ONIXS_NOEXCEPT
void invokeOrderBookUpdated(const OrderBookInternal &) ONIXS_NOEXCEPT
void invokeOrderDelete(const OrderDelete &orderDeleteListener) ONIXS_NOEXCEPT
Enum
Known (selected) error codes.
Definition: ErrorListener.h:36
void invokeAuctionBestBidOffer(const AuctionBestBidOffer &auctionBestBidOfferListener) ONIXS_NOEXCEPT
void invokeOrderModifySamePriority(const OrderModifySamePriority &orderModifyListener) ONIXS_NOEXCEPT
Enum
Defines the state that the handler is in.
void invokeSnapshotOrder(const SnapshotOrder &snapshotOrderListener) ONIXS_NOEXCEPT
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
void invokeOrderAdd(const OrderAdd &orderAddListener) ONIXS_NOEXCEPT
void invokeAuctionClearingPrice(const AuctionClearingPrice &auctionClearingPriceListener) ONIXS_NOEXCEPT
void invokeAddComplexInstrument(const AddComplexInstrument &addComplexInstrumentListener) ONIXS_NOEXCEPT
void invokeInstrumentStateChange(const InstrumentStateChange &instrumentStateChangeListener) ONIXS_NOEXCEPT
void invokeError(ErrorCode::Enum code, const std::string &description) ONIXS_NOEXCEPT
void invokeProductStateChange(const ProductStateChange &productStateChangeListener) ONIXS_NOEXCEPT
void invokeDepthOutOfDate(MarketSegmentId marketSegmentId) ONIXS_NOEXCEPT
void invokePartialOrderExecution(const PartialOrderExecution &partialOrderExecutionListener) ONIXS_NOEXCEPT