OnixS C++ CME Market Data Handler  5.4.0
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 
23 #include <OnixS/CME/MDH/Packet.h>
24 #include <OnixS/CME/MDH/Messages.h>
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 InstrumentDefinitionFixedIncome57 message type.
83 typedef
86 
87 /// MessageArgs template instantiation
88 /// for ChannelReset4 message type.
89 typedef
92 
93 /// MessageArgs template instantiation
94 /// for AdminHeartbeat12 message type.
95 typedef
98 
99 /// MessageArgs template instantiation
100 /// for AdminLogin15 message type.
101 typedef
104 
105 /// MessageArgs template instantiation
106 /// for AdminLogout16 message type.
107 typedef
110 
111 /// MessageArgs template instantiation
112 /// for AdminLogin408 message type.
113 typedef
116 
117 /// MessageArgs template instantiation
118 /// for AdminLogout409 message type.
119 typedef
122 
123 /// MessageArgs template instantiation
124 /// for AdminHeartbeat410 message type.
125 typedef
128 
129 /// MessageArgs template instantiation
130 /// for InstrumentDefinitionFuture54 message type.
131 typedef
134 
135 /// MessageArgs template instantiation
136 /// for InstrumentDefinitionSpread56 message type.
137 typedef
140 
141 /// MessageArgs template instantiation
142 /// for SecurityStatus30 message type.
143 typedef
146 
147 /// MessageArgs template instantiation
148 /// for IncrementalRefreshBook46 message type.
149 typedef
152 
153 /// MessageArgs template instantiation
154 /// for IncrementalRefreshDailyStatistics49 message type.
155 typedef
158 
159 /// MessageArgs template instantiation
160 /// for IncrementalRefreshLimitsBanding50 message type.
161 typedef
164 
165 /// MessageArgs template instantiation
166 /// for IncrementalRefreshSessionStatistics51 message type.
167 typedef
170 
171 /// MessageArgs template instantiation
172 /// for IncrementalRefreshVolume37 message type.
173 typedef
176 
177 /// MessageArgs template instantiation
178 /// for SnapshotFullRefresh52 message type.
179 typedef
182 
183 /// MessageArgs template instantiation
184 /// for QuoteRequest39 message type.
185 typedef
188 
189 /// MessageArgs template instantiation
190 /// for InstrumentDefinitionOption55 message type.
191 typedef
194 
195 /// MessageArgs template instantiation
196 /// for IncrementalRefreshTradeSummary48 message type.
197 typedef
200 
201 /// MessageArgs template instantiation
202 /// for IncrementalRefreshOrderBook47 message type.
203 typedef
206 
207 /// MessageArgs template instantiation
208 /// for SnapshotFullRefreshOrderBook53 message type.
209 typedef
212 
215 
216 /// MessageArgs template instantiation for a FIX multi-container.
217 typedef
220 
223 
224 /// Callbacks invoked by Handler during market data
225 /// processing to reflect various stages of processing.
228 {
229  /// Invoked when processing of packet has begun.
230  virtual
231  void
233  Handler&,
234  const PacketArgs&)
235  {
236  }
237 
238  /// Invoked when processing of packet has ended.
239  virtual
240  void
242  Handler&,
243  const PacketArgs&)
244  {
245  }
246 
247  /// Invoked when processing of
248  /// InstrumentDefinitionFixedIncome57 message has begun.
249  virtual
250  void
252  Handler&,
254  {
255  }
256 
257  /// Invoked when processing of message of
258  /// InstrumentDefinitionFixedIncome57 message has ended.
259  virtual
260  void
262  Handler&,
264  {
265  }
266 
267  /// Invoked when processing of
268  /// ChannelReset4 message has begun.
269  virtual
270  void
272  Handler&,
273  const ChannelReset4Args&)
274  {
275  }
276 
277  /// Invoked when processing of message of
278  /// ChannelReset4 message has ended.
279  virtual
280  void
282  Handler&,
283  const ChannelReset4Args&)
284  {
285  }
286 
287  /// Invoked when processing of
288  /// AdminHeartbeat12 message has begun.
289  virtual
290  void
292  Handler&,
293  const AdminHeartbeat12Args&)
294  {
295  }
296 
297  /// Invoked when processing of message of
298  /// AdminHeartbeat12 message has ended.
299  virtual
300  void
302  Handler&,
303  const AdminHeartbeat12Args&)
304  {
305  }
306 
307  /// Invoked when processing of
308  /// AdminHeartbeat410 message has begun.
309  virtual
310  void
312  Handler&,
313  const AdminHeartbeat410Args&)
314  {
315  }
316 
317  /// Invoked when processing of message of
318  /// AdminHeartbeat410 message has ended.
319  virtual
320  void
322  Handler&,
323  const AdminHeartbeat410Args&)
324  {
325  }
326 
327  /// Invoked when processing of
328  /// AdminLogin15 message has begun.
329  virtual
330  void
332  Handler&,
333  const AdminLogin15Args&)
334  {
335  }
336 
337  /// Invoked when processing of message of
338  /// AdminLogin15 message has ended.
339  virtual
340  void
342  Handler&,
343  const AdminLogin15Args&)
344  {
345  }
346 
347  /// Invoked when processing of
348  /// AdminLogout16 message has begun.
349  virtual
350  void
352  Handler&,
353  const AdminLogout16Args&)
354  {
355  }
356 
357  /// Invoked when processing of message of
358  /// AdminLogout16 message has ended.
359  virtual
360  void
362  Handler&,
363  const AdminLogout16Args&)
364  {
365  }
366 
367  /// Invoked when processing of
368  /// AdminLogin408 message has begun.
369  virtual
370  void
372  Handler&,
373  const AdminLogin408Args&)
374  {
375  }
376 
377  /// Invoked when processing of message of
378  /// AdminLogin408 message has ended.
379  virtual
380  void
382  Handler&,
383  const AdminLogin408Args&)
384  {
385  }
386 
387  /// Invoked when processing of
388  /// AdminLogout409 message has begun.
389  virtual
390  void
392  Handler&,
393  const AdminLogout409Args&)
394  {
395  }
396 
397  /// Invoked when processing of message of
398  /// AdminLogout409 message has ended.
399  virtual
400  void
402  Handler&,
403  const AdminLogout409Args&)
404  {
405  }
406 
407  /// Invoked when processing of
408  /// InstrumentDefinitionFuture54 message has begun.
409  virtual
410  void
412  Handler&,
414  {
415  }
416 
417  /// Invoked when processing of message of
418  /// InstrumentDefinitionFuture54 message has ended.
419  virtual
420  void
422  Handler&,
424  {
425  }
426 
427  /// Invoked when processing of
428  /// InstrumentDefinitionSpread56 message has begun.
429  virtual
430  void
432  Handler&,
434  {
435  }
436 
437  /// Invoked when processing of message of
438  /// InstrumentDefinitionSpread56 message has ended.
439  virtual
440  void
442  Handler&,
444  {
445  }
446 
447  /// Invoked when processing of
448  /// SecurityStatus30 message has begun.
449  virtual
450  void
452  Handler&,
453  const SecurityStatus30Args&)
454  {
455  }
456 
457  /// Invoked when processing of message of
458  /// SecurityStatus30 message has ended.
459  virtual
460  void
462  Handler&,
463  const SecurityStatus30Args&)
464  {
465  }
466 
467  /// Invoked when processing of
468  /// IncrementalRefreshBook46 message has begun.
469  virtual
470  void
472  Handler&,
474  {
475  }
476 
477  /// Invoked when processing of message of
478  /// IncrementalRefreshBook46 message has ended.
479  virtual
480  void
482  Handler&,
484  {
485  }
486 
487  /// Invoked when processing of
488  /// IncrementalRefreshDailyStatistics49 message has begun.
489  virtual
490  void
492  Handler&,
494  {
495  }
496 
497  /// Invoked when processing of message of
498  /// IncrementalRefreshDailyStatistics49 message has ended.
499  virtual
500  void
502  Handler&,
504  {
505  }
506 
507  /// Invoked when processing of
508  /// IncrementalRefreshLimitsBanding50 message has begun.
509  virtual
510  void
512  Handler&,
514  {
515  }
516 
517  /// Invoked when processing of message of
518  /// IncrementalRefreshLimitsBanding50 message has ended.
519  virtual
520  void
522  Handler&,
524  {
525  }
526 
527  /// Invoked when processing of
528  /// IncrementalRefreshSessionStatistics51 message has begun.
529  virtual
530  void
532  Handler&,
534  {
535  }
536 
537  /// Invoked when processing of message of
538  /// IncrementalRefreshSessionStatistics51 message has ended.
539  virtual
540  void
542  Handler&,
544  {
545  }
546 
547  /// Invoked when processing of
548  /// IncrementalRefreshVolume37 message has begun.
549  virtual
550  void
552  Handler&,
554  {
555  }
556 
557  /// Invoked when processing of message of
558  /// IncrementalRefreshVolume37 message has ended.
559  virtual
560  void
562  Handler&,
564  {
565  }
566 
567  /// Invoked when processing of
568  /// SnapshotFullRefresh52 message has begun.
569  virtual
570  void
572  Handler&,
574  {
575  }
576 
577  /// Invoked when processing of message of
578  /// SnapshotFullRefresh52 message has ended.
579  virtual
580  void
582  Handler&,
584  {
585  }
586 
587  /// Invoked when processing of
588  /// QuoteRequest39 message has begun.
589  virtual
590  void
592  Handler&,
593  const QuoteRequest39Args&)
594  {
595  }
596 
597  /// Invoked when processing of message of
598  /// QuoteRequest39 message has ended.
599  virtual
600  void
602  Handler&,
603  const QuoteRequest39Args&)
604  {
605  }
606 
607  /// Invoked when processing of
608  /// InstrumentDefinitionOption55 message has begun.
609  virtual
610  void
612  Handler&,
614  {
615  }
616 
617  /// Invoked when processing of message of
618  /// InstrumentDefinitionOption55 message has ended.
619  virtual
620  void
622  Handler&,
624  {
625  }
626 
627  /// Invoked when processing of
628  /// IncrementalRefreshTradeSummary48 message has begun.
629  virtual
630  void
632  Handler&,
634  {
635  }
636 
637  /// Invoked when processing of message of
638  /// IncrementalRefreshTradeSummary48 message has ended.
639  virtual
640  void
642  Handler&,
644  {
645  }
646 
647  /// Invoked when processing of
648  /// IncrementalRefreshOrderBook47 message has begun.
649  virtual
650  void
652  Handler&,
654  {
655  }
656 
657  /// Invoked when processing of message of
658  /// IncrementalRefreshOrderBook47 message has ended.
659  virtual
660  void
662  Handler&,
664  {
665  }
666 
667  /// Invoked when processing of
668  /// SnapshotFullRefreshOrderBook53 message has begun.
669  virtual
670  void
672  Handler&,
674  {
675  }
676 
677  /// Invoked when processing of message of
678  /// SnapshotFullRefreshOrderBook53 message has ended.
679  virtual
680  void
682  Handler&,
684  {
685  }
686 
687  /// Invoked when processing of the FIX message has begun.
688  ///
689  /// \warning FIX messages processed by the Handler in bounds
690  /// of instrument cache replay. These messages do not belong
691  /// to any packet and thus invocation of the given callback
692  /// is not surrounded by callbacks identifing beginning and
693  /// end of packet processing. Also, as there's no packet
694  /// containing the FIX message, the packet component of
695  /// the 'args' argument refers to no data.
696  virtual
697  void
699  Handler&,
701  {
702  }
703 
704  /// Invoked when processing of the FIX message has ended.
705  ///
706  /// \warning FIX messages processed by the Handler in bounds
707  /// of instrument cache replay. These messages do not belong
708  /// to any packet and thus invocation of the given callback
709  /// is not surrounded by callbacks identifing beginning and
710  /// end of packet processing. Also, as there's no packet
711  /// containing the FIX message, the packet component of
712  /// the 'args' argument refers to no data.
713  virtual
714  void
716  Handler&,
718  {
719  }
720 };
721 
virtual void onMessage(Handler &, const SnapshotFullRefresh52Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionFuture54Args &)
virtual void onMessage(Handler &, const AdminLogin408Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionSpread56Args &)
virtual void onMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
virtual void onMessage(Handler &, const IncrementalRefreshVolume37Args &)
MessageArgs(const NetPacket &packet, const Message &message)
MessageArgs< IncrementalRefreshTradeSummary48 > IncrementalRefreshTradeSummary48Args
MessageArgs< SnapshotFullRefresh52 > SnapshotFullRefresh52Args
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFuture54Args &)
#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN
Definition: Bootstrap.h:160
virtual void onEndOfMessage(Handler &, const AdminLogout409Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
MessageArgs< AdminLogout16 > AdminLogout16Args
const Message & message() const
Instance of message being processed.
MessageArgs< IncrementalRefreshDailyStatistics49 > IncrementalRefreshDailyStatistics49Args
const NetPacket & packet() const
Instance of packet containing the message.
virtual void onEndOfMessage(Handler &, const SnapshotFullRefresh52Args &)
virtual void onMessage(Handler &, const AdminLogout409Args &)
virtual void onEndOfMessage(Handler &, const AdminHeartbeat12Args &)
MessageArgs< IncrementalRefreshLimitsBanding50 > IncrementalRefreshLimitsBanding50Args
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition: Bootstrap.h:46
MessageArgs< ChannelReset4 > ChannelReset4Args
virtual void onMessage(Handler &, const IncrementalRefreshOrderBook47Args &)
virtual void onMessage(Handler &, const IncrementalRefreshBook46Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshVolume37Args &)
MessageArgs< SecurityStatus30 > SecurityStatus30Args
virtual void onMessage(Handler &, const SnapshotFullRefreshOrderBook53Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionOption55Args &)
MessageArgs< AdminLogin15 > AdminLogin15Args
MessageArgs< InstrumentDefinitionOption55 > InstrumentDefinitionOption55Args
virtual void onEndOfMessage(Handler &, const IncrementalRefreshDailyStatistics49Args &)
MessageArgs< InstrumentDefinitionFixedIncome57 > InstrumentDefinitionFixedIncome57Args
virtual void onEndOfMessage(Handler &, const SecurityStatus30Args &)
virtual void onMessage(Handler &, const QuoteRequest39Args &)
virtual void onMessage(Handler &, const IncrementalRefreshDailyStatistics49Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionSpread56Args &)
#define ONIXS_CMEMDHFIX_NAMESPACE_END
Definition: Bootstrap.h:164
MessageArgs< AdminHeartbeat12 > AdminHeartbeat12Args
virtual void onEndOfMessage(Handler &, const IncrementalRefreshOrderBook47Args &)
virtual void onPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has begun.
virtual void onEndOfMessage(Handler &, const SnapshotFullRefreshOrderBook53Args &)
virtual void onMessage(Handler &, const FIX::MultiContainerArgs &)
MessageArgs< InstrumentDefinitionSpread56 > InstrumentDefinitionSpread56Args
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:152
MessageArgs< IncrementalRefreshSessionStatistics51 > IncrementalRefreshSessionStatistics51Args
virtual void onMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
virtual void onMessage(Handler &, const AdminHeartbeat12Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshBook46Args &)
MessageArgs< AdminLogout409 > AdminLogout409Args
MessageArgs< QuoteRequest39 > QuoteRequest39Args
MessageArgs< SnapshotFullRefreshOrderBook53 > SnapshotFullRefreshOrderBook53Args
virtual void onMessage(Handler &, const InstrumentDefinitionOption55Args &)
virtual void onMessage(Handler &, const AdminHeartbeat410Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFixedIncome57Args &)
MessageArgs< AdminHeartbeat410 > AdminHeartbeat410Args
virtual void onEndOfMessage(Handler &, const FIX::MultiContainerArgs &)
MessageArgs< IncrementalRefreshVolume37 > IncrementalRefreshVolume37Args
MessageArgs< IncrementalRefreshOrderBook47 > IncrementalRefreshOrderBook47Args
virtual void onEndOfPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has ended.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
virtual void onMessage(Handler &, const AdminLogout16Args &)
virtual void onEndOfMessage(Handler &, const AdminLogout16Args &)
MessageArgs< InstrumentDefinitionFuture54 > InstrumentDefinitionFuture54Args
MessageArgs< IncrementalRefreshBook46 > IncrementalRefreshBook46Args
MessageArgs< AdminLogin408 > AdminLogin408Args
virtual void onEndOfMessage(Handler &, const QuoteRequest39Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionFixedIncome57Args &)
virtual void onMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
virtual void onEndOfMessage(Handler &, const AdminLogin15Args &)
#define ONIXS_CMEMDH_EXPORTED_STRUCT
Definition: Bootstrap.h:58
MessageArgs< MultiContainer > MultiContainerArgs
MessageArgs template instantiation for a FIX multi-container.
virtual void onMessage(Handler &, const AdminLogin15Args &)
virtual void onMessage(Handler &, const ChannelReset4Args &)
virtual void onMessage(Handler &, const SecurityStatus30Args &)
virtual void onEndOfMessage(Handler &, const AdminHeartbeat410Args &)
virtual void onEndOfMessage(Handler &, const ChannelReset4Args &)
virtual void onEndOfMessage(Handler &, const AdminLogin408Args &)
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:156