OnixS C++ CME MDP Premium Market Data Handler 5.9.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 Message typify(const BinaryMessage& message)
30{
31 return Message(message.encoded(), message.encodedLength());
32}
33
40template <class Processor>
41bool processTypified(const BinaryMessage& binary, Processor& processor)
42{
43 switch (binary.templateId())
44 {
46 {
48
49 return true;
50 }
51
53 {
54 processor(typify<ChannelReset4>(binary));
55
56 return true;
57 }
58
60 {
61 processor(typify<AdminHeartbeat12>(binary));
62
63 return true;
64 }
65
67 {
68 processor(typify<AdminLogin15>(binary));
69
70 return true;
71 }
72
74 {
75 processor(typify<AdminLogout16>(binary));
76
77 return true;
78 }
79
81 {
82 processor(typify<AdminLogin408>(binary));
83
84 return true;
85 }
86
88 {
89 processor(typify<AdminLogout409>(binary));
90
91 return true;
92 }
93
95 {
96 processor(typify<AdminHeartbeat410>(binary));
97
98 return true;
99 }
100
102 {
103 processor(typify<InstrumentDefinitionFuture54>(binary));
104
105 return true;
106 }
107
109 {
110 processor(typify<InstrumentDefinitionSpread56>(binary));
111
112 return true;
113 }
114
116 {
117 processor(typify<SecurityStatus30>(binary));
118
119 return true;
120 }
121
123 {
124 processor(typify<IncrementalRefreshBook46>(binary));
125
126 return true;
127 }
128
130 {
132
133 return true;
134 }
135
137 {
139
140 return true;
141 }
142
144 {
146
147 return true;
148 }
149
151 {
152 processor(typify<IncrementalRefreshVolume37>(binary));
153
154 return true;
155 }
156
158 {
159 processor(typify<SnapshotFullRefresh52>(binary));
160
161 return true;
162 }
163
165 {
166 processor(typify<QuoteRequest39>(binary));
167
168 return true;
169 }
170
172 {
173 processor(typify<InstrumentDefinitionOption55>(binary));
174
175 return true;
176 }
177
179 {
181
182 return true;
183 }
184
186 {
187 processor(typify<IncrementalRefreshOrderBook47>(binary));
188
189 return true;
190 }
191
193 {
195
196 return true;
197 }
198
200 {
201 processor(typify<InstrumentDefinitionFX63>(binary));
202
203 return true;
204 }
205
207 {
209
210 return true;
211 }
212
214 {
216
217 return true;
218 }
219
221 {
223
224 return true;
225 }
226
228 {
230
231 return true;
232 }
233
235 {
236 processor(typify<SnapshotFullRefreshLongQty69>(binary));
237
238 return true;
239 }
240
241 default:
242 return false;
243 }
244}
245
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
Encapsulates services for manipulating SBE-encoded messages.
EncodedLength encodedLength() const
Size of SBE-encoded message.
MessageTemplateId templateId() const
Template identifier of message being referenced.
const void * encoded() const
SBE-encoded message content.
bool processTypified(const BinaryMessage &binary, Processor &processor)
Casts given binary message according to template/type information and processes casted messages by gi...
Message typify(const BinaryMessage &message)
Casts SBE-encoded message to given type.