OnixS C++ CME MDP Streamlined Market Data Handler 1.2.0
API Documentation
Loading...
Searching...
No Matches
Composites.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
26
28ONIXS_CMESTREAMLINEDMDH_DATA_PACKING_BEGIN(1)
29
30
31typedef
32FixedPointDecimal
33<
34 Int32,
35 IntegralConstant<Int8, -4>
36>
38
39
42{
46
48 typedef
51
53 bool
54 operator ==(
55 const Value& other) const
56 {
57 return (
58 NullMantissa() ==
59 other.mantissa()
60 );
61 }
62
64 bool
65 operator !=(
66 const Value& other) const
67 {
68 return !(*this == other);
69 }
70};
71
73typedef
74FixedPointDecimal
75<
76 Int32,
77 Int8
78>
80
81
84{
88
90 typedef
93
95 bool
96 operator ==(
97 const Value& other) const
98 {
99 return (
100 NullMantissa() ==
101 other.mantissa()
102 );
103 }
104
106 bool
107 operator !=(
108 const Value& other) const
109 {
110 return !(*this == other);
111 }
112};
113
115typedef
116FixedPointDecimal
117<
118 Int64,
119 Int8
120>
122
123
126{
130
132 typedef
135
137 bool
138 operator ==(
139 const Value& other) const
140 {
141 return (
142 NullMantissa() ==
143 other.mantissa()
144 );
145 }
146
148 bool
149 operator !=(
150 const Value& other) const
151 {
152 return !(*this == other);
153 }
154};
155
160{
161public:
163 enum { Size = 5 };
164
166 typedef UInt16 Year;
167
169 typedef
172
174 typedef UInt8 Month;
175
177 typedef
180
182 typedef UInt8 Day;
183
185 typedef
188
190 typedef UInt8 Week;
191
193 typedef
196
201 : year_(NullYear::value()),
202 month_(NullMonth::value()),
203 day_(NullDay::value()),
204 week_(NullWeek::value())
205 {
206 }
207
209 Year year() const
210 {
211 return year_;
212 }
213
215 bool
217 Month& value) const
218 {
219 if (NullMonth() == month_) return false;
220 value = month_;
221 return true;
222 }
223
225 bool
227 Day& value) const
228 {
229 if (NullDay() == day_) return false;
230 value = day_;
231 return true;
232 }
233
235 bool
237 Week& value) const
238 {
239 if (NullWeek() == week_) return false;
240 value = week_;
241 return true;
242 }
243
244private:
245 Year year_;
246 Month month_;
247 Day day_;
248 Week week_;
249};
250
251
254{
258
260 bool
261 operator ==(
262 const Value& other) const
263 {
264 return (
266 other.year()
267 );
268 }
269
271 bool
272 operator !=(
273 const Value& other) const
274 {
275 return !(*this == other);
276 }
277};
278
280typedef
281FixedPointDecimal
282<
283 Int64,
284 IntegralConstant<Int8, -7>
285>
287
288
291{
295
297 typedef
300
302 bool
303 operator ==(
304 const Value& other) const
305 {
306 return (
307 NullMantissa() ==
308 other.mantissa()
309 );
310 }
311
313 bool
314 operator !=(
315 const Value& other) const
316 {
317 return !(*this == other);
318 }
319};
320
322typedef
323FixedPointDecimal
324<
325 Int64,
326 IntegralConstant<Int8, -9>
327>
329
330
333{
337
339 typedef
342
344 bool
345 operator ==(
346 const Value& other) const
347 {
348 return (
349 NullMantissa() ==
350 other.mantissa()
351 );
352 }
353
355 bool
356 operator !=(
357 const Value& other) const
358 {
359 return !(*this == other);
360 }
361};
362
367{
368public:
370 enum { Size = 3 };
371
374
377
382 : blockLength_(0),
383 numInGroup_(0)
384 {
385 }
386
389 {
390 return blockLength_;
391 }
392
395 {
396 return numInGroup_;
397 }
398
399private:
400 BlockLength blockLength_;
401 NumInGroup numInGroup_;
402};
403
404
407{
408public:
410 enum { Size = 4 };
411
416
421
426 : blockLength_(0),
427 numInGroup_(0)
428 {
429 }
430
435 {
436 return blockLength_;
437 }
438
443 {
444 return numInGroup_;
445 }
446
447private:
448 BlockLength blockLength_;
449 NumInGroup numInGroup_;
450};
451
452
455{
456public:
458 enum { Size = 8 };
459
462
465
468
471
476 : blockLength_(0),
477 templateId_(0),
478 schemaId_(0),
479 version_(0)
480 {
481 }
482
485 {
486 return blockLength_;
487 }
488
491 {
492 return templateId_;
493 }
494
497 {
498 return schemaId_;
499 }
500
503 {
504 return version_;
505 }
506
507private:
508 BlockLength blockLength_;
509 TemplateId templateId_;
510 SchemaId schemaId_;
511 Version version_;
512};
513
514
515ONIXS_CMESTREAMLINEDMDH_DATA_PACKING_END
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:169
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition Bootstrap.h:115
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition Bootstrap.h:111
Mantissa mantissa() const
Returns mantissa of given decimal.
Definition Decimal.h:87
NumInGroup numInGroup() const
numInGroup field.
Definition Composites.h:442
BlockLength blockLength() const
blockLength field.
Definition Composites.h:434
NumInGroup numInGroup() const
numInGroup field.
Definition Composites.h:394
BlockLength blockLength() const
blockLength field.
Definition Composites.h:388
UInt16 BlockLength
blockLength type.
Definition Composites.h:373
IntegralConstant< UInt8, 255 > NullDay
Null value for optional Day field.
Definition Composites.h:187
IntegralConstant< UInt16, 65535 > NullYear
Null value for optional Year field.
Definition Composites.h:171
IntegralConstant< UInt8, 255 > NullWeek
Null value for optional Week field.
Definition Composites.h:195
IntegralConstant< UInt8, 255 > NullMonth
Null value for optional Month field.
Definition Composites.h:179
BlockLength blockLength() const
blockLength field.
Definition Composites.h:484
SchemaId schemaId() const
schemaId field.
Definition Composites.h:496
TemplateId templateId() const
templateId field.
Definition Composites.h:490
Version version() const
version field.
Definition Composites.h:502
Identifies version of the product.
Definition Version.h:36
FixedPointDecimal< Int64, Int8 > Decimal64
Floating-point decimal.
Definition Composites.h:121
FixedPointDecimal< Int32, Int8 > Decimal32NULL
Optional floating point decimal with int32 mantissa and int8 exponent.
Definition Composites.h:79
FixedPointDecimal< Int32, IntegralConstant< Int8, -4 > > Decimal32
Fixed point decimal with int32 mantissa and constant -4 exponent.
Definition Composites.h:37
FixedPointDecimal< Int64, IntegralConstant< Int8, -9 > > PRICENULL9
Optional Price with constant exponent -9.
Definition Composites.h:328
MessageSize BlockLength
Length of message body representing a block of fixed-length fields.
FixedPointDecimal< Int64, IntegralConstant< Int8, -7 > > PRICENULL
Price NULL.
Definition Composites.h:286
Identifies months in year.
Definition Time.h:428
Null values definition for optional Decimal32NULL field.
Definition Composites.h:84
Decimal32NULL Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:87
IntegralConstant< Int32, 2147483647 > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:92
Null values definition for optional Decimal32 field.
Definition Composites.h:42
Decimal32 Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:45
IntegralConstant< Int32, 2147483647 > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:50
Null values definition for optional Decimal64 field.
Definition Composites.h:126
IntegralConstant< Int64, 9223372036854775807LL > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:134
Decimal64 Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:129
Null values definition for optional MaturityMonthYear field.
Definition Composites.h:254
MaturityMonthYear Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:257
Null values definition for optional PRICENULL9 field.
Definition Composites.h:333
PRICENULL9 Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:336
IntegralConstant< Int64, 9223372036854775807LL > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:341
Null values definition for optional PRICENULL field.
Definition Composites.h:291
IntegralConstant< Int64, 9223372036854775807LL > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:299
PRICENULL Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:294