OnixS C++ CME MDP Premium Market Data Handler 5.9.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_CMEMDH_DATA_PACKING_BEGIN(1)
29
30
32
35{
38 typedef Decimal9 Value;
39
42
44 bool operator==(const Value& other) const
45 {
46 return (NullMantissa() == other.mantissa());
47 }
48
50 bool operator!=(const Value& other) const
51 {
52 return !(*this == other);
53 }
54};
55
60
63{
67
70
72 bool operator==(const Value& other) const
73 {
74 return (NullMantissa() == other.mantissa());
75 }
76
78 bool operator!=(const Value& other) const
79 {
80 return !(*this == other);
81 }
82};
83
88{
89public:
91 enum
92 {
93 Size = 5
94 };
95
97 typedef UInt16 Year;
98
101
103 typedef UInt8 Month;
104
107
109 typedef UInt8 Day;
110
113
115 typedef UInt8 Week;
116
119
124 : year_(NullYear::value())
125 , month_(NullMonth::value())
126 , day_(NullDay::value())
127 , week_(NullWeek::value())
128 {
129 }
130
132 Year year() const
133 {
134 return year_;
135 }
136
138 bool month(Month& value) const
139 {
140 if (NullMonth() == month_)
141 return false;
142 value = month_;
143 return true;
144 }
145
147 bool day(Day& value) const
148 {
149 if (NullDay() == day_)
150 return false;
151 value = day_;
152 return true;
153 }
154
156 bool week(Week& value) const
157 {
158 if (NullWeek() == week_)
159 return false;
160 value = week_;
161 return true;
162 }
163
164private:
165 Year year_;
166 Month month_;
167 Day day_;
168 Week week_;
169};
170
173{
177
179 bool operator==(const Value& other) const
180 {
181 return (MaturityMonthYear::NullYear() == other.year());
182 }
183
185 bool operator!=(const Value& other) const
186 {
187 return !(*this == other);
188 }
189};
190
193
196{
199 typedef PRICE9 Value;
200
203
205 bool operator==(const Value& other) const
206 {
207 return (NullMantissa() == other.mantissa());
208 }
209
211 bool operator!=(const Value& other) const
212 {
213 return !(*this == other);
214 }
215};
216
221{
222public:
224 enum
225 {
227 };
228
231
234
239 : blockLength_(0)
240 , numInGroup_(0)
241 {
242 }
243
246 {
247 return blockLength_;
248 }
249
252 {
253 return numInGroup_;
254 }
255
256private:
257 BlockLength blockLength_;
258 NumInGroup numInGroup_;
259};
260
265{
266public:
268 enum
269 {
271 };
272
275
278
283 : blockLength_(0)
284 , numInGroup_(0)
285 {
286 }
287
290 {
291 return blockLength_;
292 }
293
296 {
297 return numInGroup_;
298 }
299
300private:
301 BlockLength blockLength_;
302 ONIXS_CMEMDH_PADDING(5);
303 NumInGroup numInGroup_;
304};
305
308{
309public:
311 enum
312 {
314 };
315
320
325
330 : blockLength_(0)
331 , numInGroup_(0)
332 {
333 }
334
339 {
340 return blockLength_;
341 }
342
347 {
348 return numInGroup_;
349 }
350
351private:
352 BlockLength blockLength_;
353 NumInGroup numInGroup_;
354};
355
358{
359public:
361 enum
362 {
364 };
365
368
371
374
377
382 : blockLength_(0)
383 , templateId_(0)
384 , schemaId_(0)
385 , version_(0)
386 {
387 }
388
391 {
392 return blockLength_;
393 }
394
397 {
398 return templateId_;
399 }
400
403 {
404 return schemaId_;
405 }
406
409 {
410 return version_;
411 }
412
413private:
414 BlockLength blockLength_;
415 TemplateId templateId_;
416 SchemaId schemaId_;
417 Version version_;
418};
419
420ONIXS_CMEMDH_DATA_PACKING_END
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
Represents real number with constant exponent.
Definition Decimal.h:38
Mantissa mantissa() const
Returns mantissa of given decimal.
Definition Decimal.h:71
NumInGroup numInGroup() const
NumInGroup.
Definition Composites.h:295
BlockLength blockLength() const
Length.
Definition Composites.h:289
GroupSize8Byte()
Default constructor.
Definition Composites.h:282
NumInGroup numInGroup() const
numInGroup field.
Definition Composites.h:346
BlockLength blockLength() const
blockLength field.
Definition Composites.h:338
UInt16 BlockLength
blockLength type.
Definition Composites.h:319
UInt16 NumInGroup
numInGroup type.
Definition Composites.h:324
GroupSizeEncoding()
Default constructor.
Definition Composites.h:329
NumInGroup numInGroup() const
numInGroup field.
Definition Composites.h:251
BlockLength blockLength() const
blockLength field.
Definition Composites.h:245
UInt8 NumInGroup
numInGroup type.
Definition Composites.h:233
GroupSize()
Default constructor.
Definition Composites.h:238
UInt16 BlockLength
blockLength type.
Definition Composites.h:230
bool week(Week &value) const
WW.
Definition Composites.h:156
IntegralConstant< UInt8, 255 > NullDay
Null value for optional Day field.
Definition Composites.h:112
MaturityMonthYear()
Default constructor.
Definition Composites.h:123
IntegralConstant< UInt16, 65535 > NullYear
Null value for optional Year field.
Definition Composites.h:100
bool day(Day &value) const
DD.
Definition Composites.h:147
bool month(Month &value) const
MM.
Definition Composites.h:138
IntegralConstant< UInt8, 255 > NullWeek
Null value for optional Week field.
Definition Composites.h:118
IntegralConstant< UInt8, 255 > NullMonth
Null value for optional Month field.
Definition Composites.h:106
BlockLength blockLength() const
blockLength field.
Definition Composites.h:390
SchemaId schemaId() const
schemaId field.
Definition Composites.h:402
UInt16 SchemaId
schemaId type.
Definition Composites.h:373
UInt16 BlockLength
blockLength type.
Definition Composites.h:367
UInt16 TemplateId
templateId type.
Definition Composites.h:370
MessageHeader()
Default constructor.
Definition Composites.h:381
TemplateId templateId() const
templateId field.
Definition Composites.h:396
Version version() const
version field.
Definition Composites.h:408
UInt16 Version
version type.
Definition Composites.h:376
Identifies version of the product.
Definition Version.h:39
Int8 Int8
int8.
Definition Fields.h:63
Int32 Int32
int32.
Definition Fields.h:60
FixedPointDecimal< Int32, IntegralConstant< Int8, -4 > > DecimalQty
A number representing quantity.
Definition Composites.h:59
FixedPointDecimal< Int64, IntegralConstant< Int8, -9 > > Decimal9
Decimal with constant exponent -9.
Definition Composites.h:31
UInt8 UInt8
uInt8.
Definition Fields.h:208
UInt16 UInt16
uInt16.
Definition Fields.h:199
FixedPointDecimal< Int64, IntegralConstant< Int8, -9 > > PRICE9
Price with constant exponent -9.
Definition Composites.h:192
Identifies months in year.
Definition Time.h:363
Null values definition for optional Decimal9 field.
Definition Composites.h:35
IntegralConstant< Int64, 9223372036854775807LL > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:41
bool operator==(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:44
bool operator!=(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:50
Decimal9 Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:38
Null values definition for optional DecimalQty field.
Definition Composites.h:63
IntegralConstant< Int32, 2147483647 > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:69
bool operator==(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:72
DecimalQty Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:66
bool operator!=(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:78
Null values definition for optional MaturityMonthYear field.
Definition Composites.h:173
bool operator==(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:179
bool operator!=(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:185
MaturityMonthYear Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:176
Null values definition for optional PRICE9 field.
Definition Composites.h:196
IntegralConstant< Int64, 9223372036854775807LL > NullMantissa
Null value for optional Mantissa field.
Definition Composites.h:202
PRICE9 Value
Aliases the type whose null value traits are exposed by the given class.
Definition Composites.h:199
bool operator==(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:205
bool operator!=(const Value &other) const
Compares encoded data to NULL.
Definition Composites.h:211