OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
SecurityListener.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
24
26
29
31
34
38template
39<
40 class Container,
41 class Data = typename Container::Entry
42>
44{
45 Data entry_;
46 Container message_;
47 const NetPacket& packet_;
48
51 operator =(
52 const SecurityDataArgs&);
53
54public:
57 typedef Container Message;
58
61 typedef Data Entry;
62
66 const NetPacket& packet,
67 const Message& message,
68 const Entry& entry)
69 : entry_(entry)
70 , message_(message)
71 , packet_(packet)
72 {
73 }
74
77 const SecurityDataArgs& other)
78 : entry_(other.entry_)
79 , message_(other.message_)
80 , packet_(other.packet_)
81 {
82 }
83
86 const NetPacket& packet() const
87 {
88 return packet_;
89 }
90
92 const Message& message() const
93 {
94 return message_;
95 }
96
98 const Entry& entry() const
99 {
100 return entry_;
101 }
102};
103
104namespace
105{
107 inline
108 const
109 TradeOrderIds&
110 nullOrders()
111 {
112 static
113 const
114 TradeOrderIds
115 theNull;
116
117 return theNull;
118 }
119}
120
122template
123<
124 class Summary,
125 class Data = typename Summary::Entry
126>
128: public SecurityDataArgs
129<
130 Summary,
131 Data
132>
133{
134 const TradeOrderIds& orderIds_;
135
137 operator =(
138 const TradeSummaryArgs&);
139
140public:
141 typedef
143 <
144 Summary,
145 Data
146 >
148
151 typedef
152 typename
153 Base::Message
155
157 typedef
158 typename
159 Base::Entry
161
163 typedef
166
169 const NetPacket& packet,
170 const Message& message,
171 const Entry& entry,
172 const OrderIds& ids = nullOrders())
174 , orderIds_(ids)
175 {
176 }
177
180 const TradeSummaryArgs& other)
181 : Base(static_cast<const Base&>(other))
182 , orderIds_(other.orderIds_)
183 {
184 }
185
192 const
193 OrderIds&
194 orderIds() const
195 {
196 return orderIds_;
197 }
198};
199
200typedef
201TradeSummaryArgs
202<
203 IncrementalRefreshTradeSummaryLongQty65
204>
206
208typedef
210<
212>
214
216typedef
218<
220>
222
223//
224
226typedef
228<
230>
232
233//
234
236template
237<
238 class Book
239>
240class
242{
243public:
247 const Book& book,
248 const std::string& description)
249 : book_(book)
250 , description_(description)
251 {
252 }
253
255 const Book& book() const
256 {
257 return book_;
258 }
259
261 const std::string& description() const
262 {
263 return description_;
264 }
265
266private:
267 const Book& book_;
268 const std::string& description_;
269
271 const BookUpdateErrorArgs&);
272
274 operator =(
275 const BookUpdateErrorArgs&);
276};
277
280typedef
281BookUpdateErrorArgs<DirectBook>
283
286{
289 virtual
290 void
292 Handler&)
293 {
294 }
295
297 virtual
298 void
300 Handler&,
301 const Security&,
303 {
304 }
305
308 virtual
309 void
311 Handler&,
312 const Security&,
314 {
315 }
316
320 virtual
321 void
323 Handler&,
324 Security&)
325 {
326 }
327
331 virtual
332 void
334 Handler&,
335 const Security&,
337 {
338 }
339
342 virtual
343 void
345 Handler&,
346 const Security&,
347 const Recovery69EntryArgs&)
348 {
349 }
350
353 virtual
354 void
356 Handler&,
357 const Security&,
358 const TradeSummary65Args&)
359 {
360 }
361
364 virtual
365 void
367 Handler&,
368 const Security&,
369 const Recovery69EntryArgs&)
370 {
371 }
372
374 // the security is recovered from snapshot.
375virtual
376 void
378 Handler&,
379 const Security&,
380 const Recovery69EntryArgs&)
381 {
382 }
383
386 virtual
387 void
389 Handler&,
390 const Security&,
392 {
393 }
394
403 virtual
404 void
406 Handler&,
407 const Security&,
408 const DirectBook&)
409 {
410 }
411
414 virtual
415 void
417 Handler&,
418 const Security&,
420 {
421 }
422
425 virtual
426 void
428 Handler&,
429 const Security&,
430 const Recovery69EntryArgs&)
431 {
432 }
433
436 virtual
437 void
439 Handler&,
440 const Security&,
441 const Recovery69EntryArgs&)
442 {
443 }
444
447 virtual
448 void
450 Handler&,
451 const Security&,
452 const Recovery69EntryArgs&)
453 {
454 }
455
458 virtual
459 void
461 Handler&,
462 const Security&,
463 const Recovery69EntryArgs&)
464 {
465 }
466
469 virtual
470 void
472 Handler&,
473 const Security&,
474 const Recovery69EntryArgs&)
475 {
476 }
477
480 virtual
481 void
483 Handler&,
484 const Security&,
485 const Recovery69EntryArgs&)
486 {
487 }
488
491 virtual
492 void
494 Handler&,
495 const Security&,
496 const Recovery69EntryArgs&)
497 {
498 }
499
502 virtual
503 void
505 Handler&,
506 const Security&,
507 const Recovery69EntryArgs&)
508 {
509 }
510
513 virtual
514 void
516 Handler&,
517 const Security&,
518 const Recovery69EntryArgs&)
519 {
520 }
521
524 virtual
525 void
527 Handler&,
528 const Security&,
530 {
531 }
532
535 virtual
536 void
538 Handler&,
539 const Security&,
541 {
542 }
543
546 virtual
547 void
549 Handler&,
550 const Security&,
552 {
553 }
554
557 virtual
558 void
560 Handler&,
562 {
563 }
564
567 virtual
568 void
570 Handler&,
571 const Security&,
572 UInt32)
573 {
574 }
575};
576
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS_DECL(typeName)
Definition Bootstrap.h:47
#define ONIXS_CONFLATEDUDP_EXPORTED_STRUCT
Definition Bootstrap.h:59
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
Exposes details of book maintenance failure.
BookUpdateErrorArgs(const Book &book, const std::string &description)
SecurityDataArgs(const SecurityDataArgs &other)
Initializes instance as copy of other one.
SecurityDataArgs(const NetPacket &packet, const Message &message, const Entry &entry)
Attributes associated with security.
Definition Security.h:30
Base::Entry Entry
Aliases trade summary data entry.
TradeSummaryArgs(const NetPacket &packet, const Message &message, const Entry &entry, const OrderIds &ids=nullOrders())
Initializes instance with data to be referenced.
TradeSummaryArgs(const TradeSummaryArgs &other)
Initializes the instance as ref-copy of the other one.
TradeOrderIds OrderIds
Aliases collection of order ids.
MessageArgs< MultiContainer > MultiContainerArgs
MessageArgs template instantiation for a FIX multi-container.
BookUpdateErrorArgs< DirectBook > DirectBookUpdateErrorArgs
SecurityDataArgs< SnapshotFullRefreshLongQty69 > Recovery69EntryArgs
Instantiation of security data attributes for recovery data.
MessageArgs< InstrumentDefinitionFX63 > InstrumentDefinitionFX63Args
MessageArgs< SecurityStatus30 > SecurityStatus30Args
TradeSummaryArgs< IncrementalRefreshTradeSummaryLongQty65 > TradeSummary65Args
MbpBook< DirectPriceLevel, MbpBookDepth > DirectBook
Multi-depth (direct) order book.
Definition DirectBook.h:36
UInt32 UInt32
uInt32.
Definition Fields.h:261
SecurityDataArgs< IncrementalRefreshBookLongQty64 > MbpBook64AtomicUpdateArgs
Instantiation of security data attributes for MBP book atomic updates.
MessageArgs< SnapshotFullRefreshLongQty69 > SnapshotFullRefreshLongQty69Args
SecurityDataArgs< IncrementalRefreshLimitsBanding50 > LimitsAndBanding50Args
Instantiation of security data attributes for limits and banding.
Callbacks invoked by Handler to expose market data entities.
virtual void onTrade(Handler &, const Security &, const TradeSummary65Args &)
virtual void onDefinition(Handler &, const Security &, const FIX::MultiContainerArgs &)
virtual void onSettlementPrice(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onStatus(Handler &, const Security &, const SecurityStatus30Args &)
virtual void onRecovery(Handler &, const Security &, const SnapshotFullRefreshLongQty69Args &)
virtual void onGap(Handler &, const Security &, UInt32)
virtual void onHighestBid(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onHighTradePrice(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onLimitsAndBanding(Handler &, const Security &, const LimitsAndBanding50Args &)
virtual void onBookAtomicUpdate(Handler &, const Security &, const MbpBook64AtomicUpdateArgs &)
virtual void onStatus(Handler &, const Security &, const SnapshotFullRefreshLongQty69Args &)
virtual void onClearedVolume(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onOpeningPrice(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onDefinition(Handler &, const Security &, const InstrumentDefinitionFX63Args &)
Invoked upon instrument definition reception.
virtual void onLowestOffer(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onBookAtomicUpdate(Handler &, const Security &, const Recovery69EntryArgs &)
Invoked when atomic book update for.
virtual void onFixingPrice(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onElectronicVolume(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onGroupStatus(Handler &, const SecurityStatus30Args &)
virtual void onOpenInterest(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onBookUpdate(Handler &, const Security &, const DirectBook &)
virtual void onUndefined(Handler &, Security &)
virtual void onBookUpdateError(Handler &, const Security &, const DirectBookUpdateErrorArgs &)
virtual void onTrade(Handler &, const Security &, const Recovery69EntryArgs &)
virtual void onLowTradePrice(Handler &, const Security &, const Recovery69EntryArgs &)