OnixS C++ ICE Binary Order Entry Handler 1.0.0
API Documentation
Loading...
Searching...
No Matches
Typification.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
28template<class Message>
29inline
32auto typify(SbeMessage message)
33{
34 return Message(message);
35}
36
43template<class Processor>
44inline
46bool processTypified(SbeMessage binary, Processor&& processor)
47{
48 switch (binary.templateId())
49 {
51 {
52 processor(
53 typify
55 (binary));
56
57 return true;
58 }
59
61 {
62 processor(
63 typify
65 (binary));
66
67 return true;
68 }
69
71 {
72 processor(
73 typify
75 (binary));
76
77 return true;
78 }
79
81 {
82 processor(
83 typify
85 (binary));
86
87 return true;
88 }
89
91 {
92 processor(
93 typify
94 <HeartBeat>
95 (binary));
96
97 return true;
98 }
99
101 {
102 processor(
103 typify
104 <Error>
105 (binary));
106
107 return true;
108 }
109
110 case News::TemplateId:
111 {
112 processor(
113 typify
114 <News>
115 (binary));
116
117 return true;
118 }
119
121 {
122 processor(
123 typify
125 (binary));
126
127 return true;
128 }
129
131 {
132 processor(
133 typify
135 (binary));
136
137 return true;
138 }
139
141 {
142 processor(
143 typify
145 (binary));
146
147 return true;
148 }
149
151 {
152 processor(
153 typify
155 (binary));
156
157 return true;
158 }
159
161 {
162 processor(
163 typify
165 (binary));
166
167 return true;
168 }
169
171 {
172 processor(
173 typify
174 <IPRequest>
175 (binary));
176
177 return true;
178 }
179
181 {
182 processor(
183 typify
184 <IPReport>
185 (binary));
186
187 return true;
188 }
189
191 {
192 processor(
193 typify
195 (binary));
196
197 return true;
198 }
199
201 {
202 processor(
203 typify
205 (binary));
206
207 return true;
208 }
209
211 {
212 processor(
213 typify
215 (binary));
216
217 return true;
218 }
219
221 {
222 processor(
223 typify
225 (binary));
226
227 return true;
228 }
229
231 {
232 processor(
233 typify
235 (binary));
236
237 return true;
238 }
239
241 {
242 processor(
243 typify
245 (binary));
246
247 return true;
248 }
249
251 {
252 processor(
253 typify
255 (binary));
256
257 return true;
258 }
259
261 {
262 processor(
263 typify
265 (binary));
266
267 return true;
268 }
269
271 {
272 processor(
273 typify
275 (binary));
276
277 return true;
278 }
279
281 {
282 processor(
283 typify
285 (binary));
286
287 return true;
288 }
289
291 {
292 processor(
293 typify
295 (binary));
296
297 return true;
298 }
299
301 {
302 processor(
303 typify
305 (binary));
306
307 return true;
308 }
309
311 {
312 processor(
313 typify
315 (binary));
316
317 return true;
318 }
319
321 {
322 processor(
323 typify
325 (binary));
326
327 return true;
328 }
329
331 {
332 processor(
333 typify
335 (binary));
336
337 return true;
338 }
339
341 {
342 processor(
343 typify
345 (binary));
346
347 return true;
348 }
349
351 {
352 processor(
353 typify
355 (binary));
356
357 return true;
358 }
359
361 {
362 processor(
363 typify
365 (binary));
366
367 return true;
368 }
369
371 {
372 processor(
373 typify
375 (binary));
376
377 return true;
378 }
379
381 {
382 processor(
383 typify
385 (binary));
386
387 return true;
388 }
389
391 {
392 processor(
393 typify
395 (binary));
396
397 return true;
398 }
399
401 {
402 processor(
403 typify
405 (binary));
406
407 return true;
408 }
409
411 {
412 processor(
413 typify
415 (binary));
416
417 return true;
418 }
419
421 {
422 processor(
423 typify
425 (binary));
426
427 return true;
428 }
429
431 {
432 processor(
433 typify
435 (binary));
436
437 return true;
438 }
439
441 {
442 processor(
443 typify
445 (binary));
446
447 return true;
448 }
449
451 {
452 processor(
453 typify
455 (binary));
456
457 return true;
458 }
459
460 default:
461 return false;
462 }
463}
464
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE_BEGIN
Definition ABI.h:102
#define ONIXS_ICEBOE_MESSAGING_NAMESPACE_END
Definition ABI.h:106
#define ONIXS_ICEBOE_PURE
Definition Compiler.h:157
#define ONIXS_ICEBOE_NODISCARD
Definition Compiler.h:154
MessageTemplateId templateId() const noexcept
bool processTypified(SbeMessage binary, Processor &&processor)
Casts a given binary message according to template/type information and processes the cast messages b...
auto typify(SbeMessage message)
Casts SBE-encoded message to a given type.
Error processing client request.
Definition Messages.h:1339
New Order, cancel-replace, or cancel reject.
Definition Messages.h:18849
Heartbeat message. Sent in the absence of application messages.
Definition Messages.h:1160
Response to IPRequest for Binary Gateways.
Definition Messages.h:8474
Request IP Address, Port, and Session Tokens for Binary Order Gateways.
Definition Messages.h:8123
Logon Report for Gateway ID.
Definition Messages.h:393
Logon Request for Gateway ID.
Definition Messages.h:36
Logout Report for Gateway ID.
Definition Messages.h:903
Logout Request for Gateway ID.
Definition Messages.h:704
Message identifiers and length of message root.
Definition Messages.h:22567
Report for Order Mass Cancel Request.
Definition Messages.h:22158
Response to Quote Request (RFQ).
Definition Messages.h:21460
Resend response for retransmission of messages.
Definition Messages.h:23476
Resend request for retransmission of messages.
Definition Messages.h:23257
Security Definition for futures, options, and FLEX creations. Each report will contain a single marke...
Definition Messages.h:4235
Security Definition Request to create FLEX expiry and FLEX options.
Definition Messages.h:16965
Security Definition Request to create a strategy.
Definition Messages.h:16310
Security Definition Request for list of futures, options, strategies, or products.
Definition Messages.h:7113
Trader Logon Report for Trader ID.
Definition Messages.h:9418
Trader Logon Request for Trader ID.
Definition Messages.h:8982