OnixS C++ CME Market Data Handler  4.8.0.10
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 
30 /// Collection of market data supplied
31 /// via message processing callbacks.
32 template
33 <
34  class MessageType
35 >
37 {
38 public:
39  /// Type of message whose instance
40  /// is referenced by given arguments.
41  typedef MessageType Message;
42 
43  /// Initializes instance with given message
44  /// instance and packet containing that message.
46  const NetPacket& packet,
47  const Message& message)
48  : packet_(packet)
49  , message_(message)
50  {
51  }
52 
53  /// Instance of packet containing the message.
54  const NetPacket& packet() const
55  {
56  return packet_;
57  }
58 
59  /// Instance of message being processed.
60  const Message& message() const
61  {
62  return message_;
63  }
64 
65 private:
66  const NetPacket& packet_;
67  const Message& message_;
68 
69  // Coping/cloning is not supposed.
70 
72  const MessageArgs&);
73 
74  MessageArgs&
75  operator =(
76  const MessageArgs&);
77 };
78 
79 /// MessageArgs template instantiation
80 /// for InstrumentDefinitionFuture27 message type.
81 typedef
84 
85 /// MessageArgs template instantiation
86 /// for InstrumentDefinitionSpread29 message type.
87 typedef
90 
91 /// MessageArgs template instantiation
92 /// for IncrementalRefreshBook32 message type.
93 typedef
96 
97 /// MessageArgs template instantiation
98 /// for IncrementalRefreshDailyStatistics33 message type.
99 typedef
102 
103 /// MessageArgs template instantiation
104 /// for IncrementalRefreshLimitsBanding34 message type.
105 typedef
108 
109 /// MessageArgs template instantiation
110 /// for IncrementalRefreshSessionStatistics35 message type.
111 typedef
114 
115 /// MessageArgs template instantiation
116 /// for SnapshotFullRefresh38 message type.
117 typedef
120 
121 /// MessageArgs template instantiation
122 /// for InstrumentDefinitionOption41 message type.
123 typedef
126 
127 /// MessageArgs template instantiation
128 /// for IncrementalRefreshTradeSummary42 message type.
129 typedef
132 
133 /// MessageArgs template instantiation
134 /// for IncrementalRefreshOrderBook43 message type.
135 typedef
138 
139 /// MessageArgs template instantiation
140 /// for SnapshotFullRefreshOrderBook44 message type.
141 typedef
144 
145 /// MessageArgs template instantiation
146 /// for ChannelReset4 message type.
147 typedef
150 
151 /// MessageArgs template instantiation
152 /// for AdminHeartbeat12 message type.
153 typedef
156 
157 /// MessageArgs template instantiation
158 /// for AdminLogin15 message type.
159 typedef
162 
163 /// MessageArgs template instantiation
164 /// for AdminLogout16 message type.
165 typedef
168 
169 /// MessageArgs template instantiation
170 /// for InstrumentDefinitionFuture54 message type.
171 typedef
174 
175 /// MessageArgs template instantiation
176 /// for InstrumentDefinitionSpread56 message type.
177 typedef
180 
181 /// MessageArgs template instantiation
182 /// for SecurityStatus30 message type.
183 typedef
186 
187 /// MessageArgs template instantiation
188 /// for IncrementalRefreshBook46 message type.
189 typedef
192 
193 /// MessageArgs template instantiation
194 /// for IncrementalRefreshDailyStatistics49 message type.
195 typedef
198 
199 /// MessageArgs template instantiation
200 /// for IncrementalRefreshLimitsBanding50 message type.
201 typedef
204 
205 /// MessageArgs template instantiation
206 /// for IncrementalRefreshSessionStatistics51 message type.
207 typedef
210 
211 /// MessageArgs template instantiation
212 /// for IncrementalRefreshVolume37 message type.
213 typedef
216 
217 /// MessageArgs template instantiation
218 /// for SnapshotFullRefresh52 message type.
219 typedef
222 
223 /// MessageArgs template instantiation
224 /// for QuoteRequest39 message type.
225 typedef
228 
229 /// MessageArgs template instantiation
230 /// for InstrumentDefinitionOption55 message type.
231 typedef
234 
235 /// MessageArgs template instantiation
236 /// for IncrementalRefreshTradeSummary48 message type.
237 typedef
240 
241 /// MessageArgs template instantiation
242 /// for IncrementalRefreshOrderBook47 message type.
243 typedef
246 
247 /// MessageArgs template instantiation
248 /// for SnapshotFullRefreshOrderBook53 message type.
249 typedef
252 
253 /// Callbacks invoked by Handler during market data
254 /// processing to reflect various stages of processing.
257 {
258  /// Invoked when processing of packet has begun.
259  virtual
260  void
262  Handler&,
263  const PacketArgs&)
264  {
265  }
266 
267  /// Invoked when processing of packet has ended.
268  virtual
269  void
271  Handler&,
272  const PacketArgs&)
273  {
274  }
275 
276  /// Invoked when processing of
277  /// InstrumentDefinitionFuture27 message has begun.
278  virtual
279  void
281  Handler&,
283  {
284  }
285 
286  /// Invoked when processing of message of
287  /// InstrumentDefinitionFuture27 message has ended.
288  virtual
289  void
291  Handler&,
293  {
294  }
295 
296  /// Invoked when processing of
297  /// InstrumentDefinitionSpread29 message has begun.
298  virtual
299  void
301  Handler&,
303  {
304  }
305 
306  /// Invoked when processing of message of
307  /// InstrumentDefinitionSpread29 message has ended.
308  virtual
309  void
311  Handler&,
313  {
314  }
315 
316  /// Invoked when processing of
317  /// IncrementalRefreshBook32 message has begun.
318  virtual
319  void
321  Handler&,
323  {
324  }
325 
326  /// Invoked when processing of message of
327  /// IncrementalRefreshBook32 message has ended.
328  virtual
329  void
331  Handler&,
333  {
334  }
335 
336  /// Invoked when processing of
337  /// IncrementalRefreshDailyStatistics33 message has begun.
338  virtual
339  void
341  Handler&,
343  {
344  }
345 
346  /// Invoked when processing of message of
347  /// IncrementalRefreshDailyStatistics33 message has ended.
348  virtual
349  void
351  Handler&,
353  {
354  }
355 
356  /// Invoked when processing of
357  /// IncrementalRefreshLimitsBanding34 message has begun.
358  virtual
359  void
361  Handler&,
363  {
364  }
365 
366  /// Invoked when processing of message of
367  /// IncrementalRefreshLimitsBanding34 message has ended.
368  virtual
369  void
371  Handler&,
373  {
374  }
375 
376  /// Invoked when processing of
377  /// IncrementalRefreshSessionStatistics35 message has begun.
378  virtual
379  void
381  Handler&,
383  {
384  }
385 
386  /// Invoked when processing of message of
387  /// IncrementalRefreshSessionStatistics35 message has ended.
388  virtual
389  void
391  Handler&,
393  {
394  }
395 
396  /// Invoked when processing of
397  /// SnapshotFullRefresh38 message has begun.
398  virtual
399  void
401  Handler&,
403  {
404  }
405 
406  /// Invoked when processing of message of
407  /// SnapshotFullRefresh38 message has ended.
408  virtual
409  void
411  Handler&,
413  {
414  }
415 
416  /// Invoked when processing of
417  /// InstrumentDefinitionOption41 message has begun.
418  virtual
419  void
421  Handler&,
423  {
424  }
425 
426  /// Invoked when processing of message of
427  /// InstrumentDefinitionOption41 message has ended.
428  virtual
429  void
431  Handler&,
433  {
434  }
435 
436  /// Invoked when processing of
437  /// IncrementalRefreshTradeSummary42 message has begun.
438  virtual
439  void
441  Handler&,
443  {
444  }
445 
446  /// Invoked when processing of message of
447  /// IncrementalRefreshTradeSummary42 message has ended.
448  virtual
449  void
451  Handler&,
453  {
454  }
455 
456  /// Invoked when processing of
457  /// IncrementalRefreshOrderBook43 message has begun.
458  virtual
459  void
461  Handler&,
463  {
464  }
465 
466  /// Invoked when processing of message of
467  /// IncrementalRefreshOrderBook43 message has ended.
468  virtual
469  void
471  Handler&,
473  {
474  }
475 
476  /// Invoked when processing of
477  /// SnapshotFullRefreshOrderBook44 message has begun.
478  virtual
479  void
481  Handler&,
483  {
484  }
485 
486  /// Invoked when processing of message of
487  /// SnapshotFullRefreshOrderBook44 message has ended.
488  virtual
489  void
491  Handler&,
493  {
494  }
495 
496  /// Invoked when processing of
497  /// ChannelReset4 message has begun.
498  virtual
499  void
501  Handler&,
502  const ChannelReset4Args&)
503  {
504  }
505 
506  /// Invoked when processing of message of
507  /// ChannelReset4 message has ended.
508  virtual
509  void
511  Handler&,
512  const ChannelReset4Args&)
513  {
514  }
515 
516  /// Invoked when processing of
517  /// AdminHeartbeat12 message has begun.
518  virtual
519  void
521  Handler&,
522  const AdminHeartbeat12Args&)
523  {
524  }
525 
526  /// Invoked when processing of message of
527  /// AdminHeartbeat12 message has ended.
528  virtual
529  void
531  Handler&,
532  const AdminHeartbeat12Args&)
533  {
534  }
535 
536  /// Invoked when processing of
537  /// AdminLogin15 message has begun.
538  virtual
539  void
541  Handler&,
542  const AdminLogin15Args&)
543  {
544  }
545 
546  /// Invoked when processing of message of
547  /// AdminLogin15 message has ended.
548  virtual
549  void
551  Handler&,
552  const AdminLogin15Args&)
553  {
554  }
555 
556  /// Invoked when processing of
557  /// AdminLogout16 message has begun.
558  virtual
559  void
561  Handler&,
562  const AdminLogout16Args&)
563  {
564  }
565 
566  /// Invoked when processing of message of
567  /// AdminLogout16 message has ended.
568  virtual
569  void
571  Handler&,
572  const AdminLogout16Args&)
573  {
574  }
575 
576  /// Invoked when processing of
577  /// InstrumentDefinitionFuture54 message has begun.
578  virtual
579  void
581  Handler&,
583  {
584  }
585 
586  /// Invoked when processing of message of
587  /// InstrumentDefinitionFuture54 message has ended.
588  virtual
589  void
591  Handler&,
593  {
594  }
595 
596  /// Invoked when processing of
597  /// InstrumentDefinitionSpread56 message has begun.
598  virtual
599  void
601  Handler&,
603  {
604  }
605 
606  /// Invoked when processing of message of
607  /// InstrumentDefinitionSpread56 message has ended.
608  virtual
609  void
611  Handler&,
613  {
614  }
615 
616  /// Invoked when processing of
617  /// SecurityStatus30 message has begun.
618  virtual
619  void
621  Handler&,
622  const SecurityStatus30Args&)
623  {
624  }
625 
626  /// Invoked when processing of message of
627  /// SecurityStatus30 message has ended.
628  virtual
629  void
631  Handler&,
632  const SecurityStatus30Args&)
633  {
634  }
635 
636  /// Invoked when processing of
637  /// IncrementalRefreshBook46 message has begun.
638  virtual
639  void
641  Handler&,
643  {
644  }
645 
646  /// Invoked when processing of message of
647  /// IncrementalRefreshBook46 message has ended.
648  virtual
649  void
651  Handler&,
653  {
654  }
655 
656  /// Invoked when processing of
657  /// IncrementalRefreshDailyStatistics49 message has begun.
658  virtual
659  void
661  Handler&,
663  {
664  }
665 
666  /// Invoked when processing of message of
667  /// IncrementalRefreshDailyStatistics49 message has ended.
668  virtual
669  void
671  Handler&,
673  {
674  }
675 
676  /// Invoked when processing of
677  /// IncrementalRefreshLimitsBanding50 message has begun.
678  virtual
679  void
681  Handler&,
683  {
684  }
685 
686  /// Invoked when processing of message of
687  /// IncrementalRefreshLimitsBanding50 message has ended.
688  virtual
689  void
691  Handler&,
693  {
694  }
695 
696  /// Invoked when processing of
697  /// IncrementalRefreshSessionStatistics51 message has begun.
698  virtual
699  void
701  Handler&,
703  {
704  }
705 
706  /// Invoked when processing of message of
707  /// IncrementalRefreshSessionStatistics51 message has ended.
708  virtual
709  void
711  Handler&,
713  {
714  }
715 
716  /// Invoked when processing of
717  /// IncrementalRefreshVolume37 message has begun.
718  virtual
719  void
721  Handler&,
723  {
724  }
725 
726  /// Invoked when processing of message of
727  /// IncrementalRefreshVolume37 message has ended.
728  virtual
729  void
731  Handler&,
733  {
734  }
735 
736  /// Invoked when processing of
737  /// SnapshotFullRefresh52 message has begun.
738  virtual
739  void
741  Handler&,
743  {
744  }
745 
746  /// Invoked when processing of message of
747  /// SnapshotFullRefresh52 message has ended.
748  virtual
749  void
751  Handler&,
753  {
754  }
755 
756  /// Invoked when processing of
757  /// QuoteRequest39 message has begun.
758  virtual
759  void
761  Handler&,
762  const QuoteRequest39Args&)
763  {
764  }
765 
766  /// Invoked when processing of message of
767  /// QuoteRequest39 message has ended.
768  virtual
769  void
771  Handler&,
772  const QuoteRequest39Args&)
773  {
774  }
775 
776  /// Invoked when processing of
777  /// InstrumentDefinitionOption55 message has begun.
778  virtual
779  void
781  Handler&,
783  {
784  }
785 
786  /// Invoked when processing of message of
787  /// InstrumentDefinitionOption55 message has ended.
788  virtual
789  void
791  Handler&,
793  {
794  }
795 
796  /// Invoked when processing of
797  /// IncrementalRefreshTradeSummary48 message has begun.
798  virtual
799  void
801  Handler&,
803  {
804  }
805 
806  /// Invoked when processing of message of
807  /// IncrementalRefreshTradeSummary48 message has ended.
808  virtual
809  void
811  Handler&,
813  {
814  }
815 
816  /// Invoked when processing of
817  /// IncrementalRefreshOrderBook47 message has begun.
818  virtual
819  void
821  Handler&,
823  {
824  }
825 
826  /// Invoked when processing of message of
827  /// IncrementalRefreshOrderBook47 message has ended.
828  virtual
829  void
831  Handler&,
833  {
834  }
835 
836  /// Invoked when processing of
837  /// SnapshotFullRefreshOrderBook53 message has begun.
838  virtual
839  void
841  Handler&,
843  {
844  }
845 
846  /// Invoked when processing of message of
847  /// SnapshotFullRefreshOrderBook53 message has ended.
848  virtual
849  void
851  Handler&,
853  {
854  }
855 
856 };
857 
virtual void onMessage(Handler &, const SnapshotFullRefresh52Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionFuture54Args &)
virtual void onEndOfMessage(Handler &, const SnapshotFullRefresh38Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionFuture27Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
MessageArgs< IncrementalRefreshOrderBook43 > IncrementalRefreshOrderBook43Args
virtual void onMessage(Handler &, const InstrumentDefinitionSpread56Args &)
virtual void onMessage(Handler &, const IncrementalRefreshTradeSummary42Args &)
virtual void onMessage(Handler &, const IncrementalRefreshLimitsBanding50Args &)
virtual void onMessage(Handler &, const IncrementalRefreshVolume37Args &)
MessageArgs(const NetPacket &packet, const Message &message)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshBook32Args &)
MessageArgs< IncrementalRefreshTradeSummary48 > IncrementalRefreshTradeSummary48Args
MessageArgs< SnapshotFullRefresh52 > SnapshotFullRefresh52Args
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionSpread29Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFuture54Args &)
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 onEndOfMessage(Handler &, const AdminHeartbeat12Args &)
MessageArgs< IncrementalRefreshLimitsBanding50 > IncrementalRefreshLimitsBanding50Args
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition: Bootstrap.h:54
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 SnapshotFullRefresh38Args &)
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< IncrementalRefreshSessionStatistics35 > IncrementalRefreshSessionStatistics35Args
virtual void onMessage(Handler &, const IncrementalRefreshDailyStatistics33Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionOption41Args &)
virtual void onEndOfMessage(Handler &, const SecurityStatus30Args &)
virtual void onMessage(Handler &, const QuoteRequest39Args &)
virtual void onMessage(Handler &, const IncrementalRefreshDailyStatistics49Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionSpread56Args &)
virtual void onMessage(Handler &, const IncrementalRefreshSessionStatistics35Args &)
MessageArgs< AdminHeartbeat12 > AdminHeartbeat12Args
virtual void onEndOfMessage(Handler &, const IncrementalRefreshOrderBook47Args &)
virtual void onEndOfMessage(Handler &, const InstrumentDefinitionFuture27Args &)
virtual void onPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has begun.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshSessionStatistics35Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionOption41Args &)
virtual void onEndOfMessage(Handler &, const SnapshotFullRefreshOrderBook53Args &)
virtual void onMessage(Handler &, const InstrumentDefinitionSpread29Args &)
MessageArgs< InstrumentDefinitionSpread56 > InstrumentDefinitionSpread56Args
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:168
MessageArgs< IncrementalRefreshSessionStatistics51 > IncrementalRefreshSessionStatistics51Args
virtual void onMessage(Handler &, const IncrementalRefreshOrderBook43Args &)
virtual void onMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
MessageArgs< SnapshotFullRefreshOrderBook44 > SnapshotFullRefreshOrderBook44Args
virtual void onMessage(Handler &, const IncrementalRefreshBook32Args &)
MessageArgs< InstrumentDefinitionOption41 > InstrumentDefinitionOption41Args
virtual void onMessage(Handler &, const AdminHeartbeat12Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshBook46Args &)
virtual void onMessage(Handler &, const SnapshotFullRefreshOrderBook44Args &)
MessageArgs< QuoteRequest39 > QuoteRequest39Args
MessageArgs< SnapshotFullRefreshOrderBook53 > SnapshotFullRefreshOrderBook53Args
virtual void onMessage(Handler &, const InstrumentDefinitionOption55Args &)
MessageArgs< InstrumentDefinitionSpread29 > InstrumentDefinitionSpread29Args
MessageArgs< InstrumentDefinitionFuture27 > InstrumentDefinitionFuture27Args
MessageArgs< IncrementalRefreshVolume37 > IncrementalRefreshVolume37Args
MessageArgs< IncrementalRefreshOrderBook47 > IncrementalRefreshOrderBook47Args
virtual void onEndOfPacket(Handler &, const PacketArgs &)
Invoked when processing of packet has ended.
virtual void onEndOfMessage(Handler &, const IncrementalRefreshDailyStatistics33Args &)
MessageArgs< IncrementalRefreshTradeSummary42 > IncrementalRefreshTradeSummary42Args
virtual void onEndOfMessage(Handler &, const IncrementalRefreshTradeSummary48Args &)
virtual void onMessage(Handler &, const AdminLogout16Args &)
MessageArgs< SnapshotFullRefresh38 > SnapshotFullRefresh38Args
virtual void onEndOfMessage(Handler &, const AdminLogout16Args &)
MessageArgs< InstrumentDefinitionFuture54 > InstrumentDefinitionFuture54Args
MessageArgs< IncrementalRefreshBook32 > IncrementalRefreshBook32Args
virtual void onEndOfMessage(Handler &, const IncrementalRefreshTradeSummary42Args &)
MessageArgs< IncrementalRefreshDailyStatistics33 > IncrementalRefreshDailyStatistics33Args
MessageArgs< IncrementalRefreshBook46 > IncrementalRefreshBook46Args
virtual void onEndOfMessage(Handler &, const QuoteRequest39Args &)
MessageArgs< IncrementalRefreshLimitsBanding34 > IncrementalRefreshLimitsBanding34Args
virtual void onMessage(Handler &, const IncrementalRefreshSessionStatistics51Args &)
virtual void onMessage(Handler &, const IncrementalRefreshLimitsBanding34Args &)
virtual void onEndOfMessage(Handler &, const AdminLogin15Args &)
#define ONIXS_CMEMDH_EXPORTED_STRUCT
Definition: Bootstrap.h:66
virtual void onMessage(Handler &, const AdminLogin15Args &)
virtual void onMessage(Handler &, const ChannelReset4Args &)
virtual void onEndOfMessage(Handler &, const SnapshotFullRefreshOrderBook44Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshLimitsBanding34Args &)
virtual void onEndOfMessage(Handler &, const IncrementalRefreshOrderBook43Args &)
virtual void onMessage(Handler &, const SecurityStatus30Args &)
virtual void onEndOfMessage(Handler &, const ChannelReset4Args &)
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:172