OnixS C++ CME MDP Conflated UDP Handler  1.1.2
API documentation
MarketDataListener.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 
25 
27 
29 
31 
32 /// Collection of market data supplied
33 /// via message processing callbacks.
34 template
35 <
36  class MessageType
37 >
39 {
40 public:
41  /// Type of message whose instance
42  /// is referenced by given arguments.
43  typedef MessageType Message;
44 
45  /// Initializes instance with given message
46  /// instance and packet containing that message.
48  const NetPacket& packet,
49  const Message& message)
50  : packet_(packet)
51  , message_(message)
52  {
53  }
54 
55  /// Instance of packet containing the message.
56  const NetPacket& packet() const
57  {
58  return packet_;
59  }
60 
61  /// Instance of message being processed.
62  const Message& message() const
63  {
64  return message_;
65  }
66 
67 private:
68  const NetPacket& packet_;
69  const Message& message_;
70 
71  // Coping/cloning is not supposed.
72 
74  const MessageArgs&);
75 
76  MessageArgs&
77  operator =(
78  const MessageArgs&);
79 };
80 
81 /// MessageArgs template instantiation
82 /// for AdminLogin408 message type.
83 typedef
86 
87 /// MessageArgs template instantiation
88 /// for AdminLogout409 message type.
89 typedef
92 
93 /// MessageArgs template instantiation
94 /// for AdminHeartbeat410 message type.
95 typedef
98 
99 /// MessageArgs template instantiation
100 /// for InstrumentDefinitionFX63 message type.
101 typedef
104 
105 /// MessageArgs template instantiation
106 /// for IncrementalRefreshBookLongQty64 message type.
107 typedef
110 
111 /// MessageArgs template instantiation
112 /// for IncrementalRefreshTradeSummaryLongQty65 message type.
113 typedef
116 
117 /// MessageArgs template instantiation
118 /// for SnapshotFullRefreshLongQty69 message type.
119 typedef
122 
123 /// MessageArgs template instantiation
124 /// for ChannelReset4 message type.
125 typedef
128 
129 /// MessageArgs template instantiation
130 /// for AdminHeartbeat12 message type.
131 typedef
134 
135 /// MessageArgs template instantiation
136 /// for AdminLogin15 message type.
137 typedef
140 
141 /// MessageArgs template instantiation
142 /// for AdminLogout16 message type.
143 typedef
146 
147 /// MessageArgs template instantiation
148 /// for SecurityStatus30 message type.
149 typedef
152 
153 /// MessageArgs template instantiation
154 /// for IncrementalRefreshLimitsBanding50 message type.
155 typedef
158 
161 
162 /// MessageArgs template instantiation for a FIX multi-container.
163 typedef
166 
169 
170 /// Callbacks invoked by Handler during market data
171 /// processing to reflect various stages of processing.
174 {
175  /// Invoked when processing of packet has begun.
176  virtual
177  void
179  Handler&,
180  const PacketArgs&)
181  {
182  }
183 
184  /// Invoked when processing of packet has ended.
185  virtual
186  void
188  Handler&,
189  const PacketArgs&)
190  {
191  }
192 
193  /// Invoked when processing of
194  /// AdminLogin408 message has begun.
195  virtual
196  void
198  Handler&,
199  const AdminLogin408Args&)
200  {
201  }
202 
203  /// Invoked when processing of message of
204  /// AdminLogin408 message has ended.
205  virtual
206  void
208  Handler&,
209  const AdminLogin408Args&)
210  {
211  }
212 
213  /// Invoked when processing of
214  /// AdminLogout409 message has begun.
215  virtual
216  void
218  Handler&,
219  const AdminLogout409Args&)
220  {
221  }
222 
223  /// Invoked when processing of message of
224  /// AdminLogout409 message has ended.
225  virtual
226  void
228  Handler&,
229  const AdminLogout409Args&)
230  {
231  }
232 
233  /// Invoked when processing of
234  /// AdminHeartbeat410 message has begun.
235  virtual
236  void
238  Handler&,
239  const AdminHeartbeat410Args&)
240  {
241  }
242 
243  /// Invoked when processing of message of
244  /// AdminHeartbeat410 message has ended.
245  virtual
246  void
248  Handler&,
249  const AdminHeartbeat410Args&)
250  {
251  }
252 
253  /// Invoked when processing of
254  /// InstrumentDefinitionFX63 message has begun.
255  virtual
256  void
258  Handler&,
260  {
261  }
262 
263  /// Invoked when processing of message of
264  /// InstrumentDefinitionFX63 message has ended.
265  virtual
266  void
268  Handler&,
270  {
271  }
272 
273  /// Invoked when processing of
274  /// IncrementalRefreshBookLongQty64 message has begun.
275  virtual
276  void
278  Handler&,
280  {
281  }
282 
283  /// Invoked when processing of message of
284  /// IncrementalRefreshBookLongQty64 message has ended.
285  virtual
286  void
288  Handler&,
290  {
291  }
292 
293  /// Invoked when processing of
294  /// IncrementalRefreshTradeSummaryLongQty65 message has begun.
295  virtual
296  void
298  Handler&,
300  {
301  }
302 
303  /// Invoked when processing of message of
304  /// IncrementalRefreshTradeSummaryLongQty65 message has ended.
305  virtual
306  void
308  Handler&,
310  {
311  }
312 
313  /// Invoked when processing of
314  /// SnapshotFullRefreshLongQty69 message has begun.
315  virtual
316  void
318  Handler&,
320  {
321  }
322 
323  /// Invoked when processing of message of
324  /// SnapshotFullRefreshLongQty69 message has ended.
325  virtual
326  void
328  Handler&,
330  {
331  }
332 
333  /// Invoked when processing of
334  /// ChannelReset4 message has begun.
335  virtual
336  void
338  Handler&,
339  const ChannelReset4Args&)
340  {
341  }
342 
343  /// Invoked when processing of message of
344  /// ChannelReset4 message has ended.
345  virtual
346  void
348  Handler&,
349  const ChannelReset4Args&)
350  {
351  }
352 
353  /// Invoked when processing of
354  /// AdminHeartbeat12 message has begun.
355  virtual
356  void
358  Handler&,
359  const AdminHeartbeat12Args&)
360  {
361  }
362 
363  /// Invoked when processing of message of
364  /// AdminHeartbeat12 message has ended.
365  virtual
366  void
368  Handler&,
369  const AdminHeartbeat12Args&)
370  {
371  }
372 
373  /// Invoked when processing of
374  /// AdminLogin15 message has begun.
375  virtual
376  void
378  Handler&,
379  const AdminLogin15Args&)
380  {
381  }
382 
383  /// Invoked when processing of message of
384  /// AdminLogin15 message has ended.
385  virtual
386  void
388  Handler&,
389  const AdminLogin15Args&)
390  {
391  }
392 
393  /// Invoked when processing of
394  /// AdminLogout16 message has begun.
395  virtual
396  void
398  Handler&,
399  const AdminLogout16Args&)
400  {
401  }
402 
403  /// Invoked when processing of message of
404  /// AdminLogout16 message has ended.
405  virtual
406  void
408  Handler&,
409  const AdminLogout16Args&)
410  {
411  }
412 
413  /// Invoked when processing of
414  /// SecurityStatus30 message has begun.
415  virtual
416  void
418  Handler&,
419  const SecurityStatus30Args&)
420  {
421  }
422 
423  /// Invoked when processing of message of
424  /// SecurityStatus30 message has ended.
425  virtual
426  void
428  Handler&,
429  const SecurityStatus30Args&)
430  {
431  }
432 
433  /// Invoked when processing of
434  /// IncrementalRefreshLimitsBanding50 message has begun.
435  virtual
436  void
438  Handler&,
440  {
441  }
442 
443  /// Invoked when processing of message of
444  /// IncrementalRefreshLimitsBanding50 message has ended.
445  virtual
446  void
448  Handler&,
450  {
451  }
452 
453  /// Invoked when processing of the FIX message has begun.
454  ///
455  /// \warning FIX messages processed by the Handler in bounds
456  /// of instrument cache replay. These messages do not belong
457  /// to any packet and thus invocation of the given callback
458  /// is not surrounded by callbacks identifing beginning and
459  /// end of packet processing. Also, as there's no packet
460  /// containing the FIX message, the packet component of
461  /// the 'args' argument refers to no data.
462  virtual
463  void
465  Handler&,
467  {
468  }
469 
470  /// Invoked when processing of the FIX message has ended.
471  ///
472  /// \warning FIX messages processed by the Handler in bounds
473  /// of instrument cache replay. These messages do not belong
474  /// to any packet and thus invocation of the given callback
475  /// is not surrounded by callbacks identifing beginning and
476  /// end of packet processing. Also, as there's no packet
477  /// containing the FIX message, the packet component of
478  /// the 'args' argument refers to no data.
479  virtual
480  void
482  Handler&,
484  {
485  }
486 };
487 
virtual void onMessage(Handler &, const SnapshotFullRefreshLongQty69Args &)
virtual void onEndOfMessage(Handler &, const FIX::MultiContainerArgs &)
virtual void onMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
virtual void onMessage(Handler &, const AdminHeartbeat410Args &)
MessageArgs< IncrementalRefreshBookLongQty64 > IncrementalRefreshBookLongQty64Args
virtual void onPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has begun.
MessageArgs< AdminLogin15 > AdminLogin15Args
virtual void onEndOfMessage(Handler &, const AdminHeartbeat410Args &)
MessageArgs< InstrumentDefinitionFX63 > InstrumentDefinitionFX63Args
MessageArgs< AdminLogout16 > AdminLogout16Args
virtual void onEndOfMessage(Handler &, const AdminLogin408Args &)
virtual void onMessage(Handler &, const AdminLogin15Args &)
MessageArgs< AdminHeartbeat12 > AdminHeartbeat12Args
virtual void onEndOfMessage(Handler &, const SnapshotFullRefreshLongQty69Args &)
MessageArgs(const NetPacket &packet, const Message &message)
const NetPacket & packet() const
Instance of packet containing the message.
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFX63Args &)
virtual void onMessage(Handler &, const FIX::MultiContainerArgs &)
virtual void onMessage(Handler &, const AdminLogout16Args &)
virtual void onEndOfMessage(Handler &, const ChannelReset4Args &)
virtual void onEndOfMessage(Handler &, const AdminLogout409Args &)
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS_DECL(typeName)
Definition: Bootstrap.h:47
#define ONIXS_CONFLATEDUDPFIX_NAMESPACE_END
Definition: Bootstrap.h:165
virtual void onEndOfMessage(Handler &, const AdminHeartbeat12Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshTradeSummaryLongQty65Args &)
virtual void onEndOfMessage(Handler &, const AdminLogout16Args &)
MessageArgs< IncrementalRefreshTradeSummaryLongQty65 > IncrementalRefreshTradeSummaryLongQty65Args
MessageArgs< SecurityStatus30 > SecurityStatus30Args
virtual void onMessage(Handler &, const AdminHeartbeat12Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionFX63Args &)
#define ONIXS_CONFLATEDUDP_EXPORTED_STRUCT
Definition: Bootstrap.h:59
virtual void onEndOfMessage(Handler &, const IncrementalRefreshBookLongQty64Args &)
MessageArgs< AdminLogout409 > AdminLogout409Args
const Message & message() const
Instance of message being processed.
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition: Bootstrap.h:157
virtual void onMessage(Handler &, const IncrementalRefreshTradeSummaryLongQty65Args &)
virtual void onMessage(Handler &, const AdminLogin408Args &)
MessageArgs< AdminHeartbeat410 > AdminHeartbeat410Args
MessageArgs< AdminLogin408 > AdminLogin408Args
MessageArgs< IncrementalRefreshLimitsBanding50 > IncrementalRefreshLimitsBanding50Args
MessageArgs< ChannelReset4 > ChannelReset4Args
virtual void onMessage(Handler &, const ChannelReset4Args &)
MessageArgs< SnapshotFullRefreshLongQty69 > SnapshotFullRefreshLongQty69Args
virtual void onMessage(Handler &, const SecurityStatus30Args &)
virtual void onEndOfMessage(Handler &, const SecurityStatus30Args &)
virtual void onMessage(Handler &, const AdminLogout409Args &)
virtual void onEndOfMessage(Handler &, const AdminLogin15Args &)
#define ONIXS_CONFLATEDUDPFIX_NAMESPACE_BEGIN
Definition: Bootstrap.h:161
MessageArgs< MultiContainer > MultiContainerArgs
MessageArgs template instantiation for a FIX multi-container.
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition: Bootstrap.h:153
virtual void onMessage(Handler &, const IncrementalRefreshBookLongQty64Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
virtual void onEndOfPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has ended.