OnixS C++ CME MDP Premium Market Data Handler 5.10.2
Users' manual and 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>
30Message typify(SbeMessage message)
31{
32 return Message(message);
33}
34
41template<class Processor>
42bool processTypified(SbeMessage binary, Processor&& processor)
43{
45
46 switch (binary.templateId())
47 {
49 {
50 processor(
51 typify
53 (binary));
54
55 return true;
56 }
57
59 {
60 processor(
61 typify
63 (binary));
64
65 return true;
66 }
67
69 {
70 processor(
71 typify
73 (binary));
74
75 return true;
76 }
77
79 {
80 processor(
81 typify
83 (binary));
84
85 return true;
86 }
87
89 {
90 processor(
91 typify
93 (binary));
94
95 return true;
96 }
97
99 {
100 processor(
101 typify
103 (binary));
104
105 return true;
106 }
107
109 {
110 processor(
111 typify
113 (binary));
114
115 return true;
116 }
117
119 {
120 processor(
121 typify
123 (binary));
124
125 return true;
126 }
127
129 {
130 processor(
131 typify
133 (binary));
134
135 return true;
136 }
137
139 {
140 processor(
141 typify
143 (binary));
144
145 return true;
146 }
147
149 {
150 processor(
151 typify
153 (binary));
154
155 return true;
156 }
157
159 {
160 processor(
161 typify
163 (binary));
164
165 return true;
166 }
167
169 {
170 processor(
171 typify
173 (binary));
174
175 return true;
176 }
177
179 {
180 processor(
181 typify
183 (binary));
184
185 return true;
186 }
187
189 {
190 processor(
191 typify
193 (binary));
194
195 return true;
196 }
197
199 {
200 processor(
201 typify
203 (binary));
204
205 return true;
206 }
207
209 {
210 processor(
211 typify
213 (binary));
214
215 return true;
216 }
217
219 {
220 processor(
221 typify
223 (binary));
224
225 return true;
226 }
227
229 {
230 processor(
231 typify
233 (binary));
234
235 return true;
236 }
237
239 {
240 processor(
241 typify
243 (binary));
244
245 return true;
246 }
247
249 {
250 processor(
251 typify
253 (binary));
254
255 return true;
256 }
257
259 {
260 processor(
261 typify
263 (binary));
264
265 return true;
266 }
267
269 {
270 processor(
271 typify
273 (binary));
274
275 return true;
276 }
277
279 {
280 processor(
281 typify
283 (binary));
284
285 return true;
286 }
287
289 {
290 processor(
291 typify
293 (binary));
294
295 return true;
296 }
297
299 {
300 processor(
301 typify
303 (binary));
304
305 return true;
306 }
307
309 {
310 processor(
311 typify
313 (binary));
314
315 return true;
316 }
317
319 {
320 processor(
321 typify
323 (binary));
324
325 return true;
326 }
327
328 default:
329 return false;
330 }
331}
332
#define ONIXS_CMEMDH_MESSAGING_NAMESPACE_BEGIN
Definition Bootstrap.h:57
#define ONIXS_CMEMDH_MESSAGING_NAMESPACE_END
Definition Bootstrap.h:58
#define ONIXS_CMEMDH_FORCEINLINE
Definition Compiler.h:161
MessageTemplateId templateId() const noexcept
bool processTypified(SbeMessage binary, Processor &&processor)
Message typify(SbeMessage message)
Casts SBE-encoded message to given type.