OnixS C++ CME MDP Conflated TCP Handler  1.2.1
API Documentation
Messages.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 
23 #include <cassert>
24 #include <stdexcept>
25 
29 
31 
33 
34 /// MDInstrumentDefinitionFixedIncome.
37 : SbeMessage
38 {
39  /// Used template schema.
41 
42  /// This type alias.
44 
45  /// Message template ID from SBE schema.
46  enum { TemplateId = 57 };
47 
48  /// Number of repeating EventType entries.
49  /// Entry of EventsEntry repeating group.
52  <
54  >
55  {
56  /// Base class type.
57  typedef
59  <
61  >
63 
64  /// This type alias.
66 
67  /// Initializes instance of given
68  /// version over given memory block.
70  void* data,
71  EncodedLength length,
72  SchemaVersion version)
73  : Base(data, length, version)
74  {
75  assert(version >= Schema::MinimalVersion);
76  assert(length >= blockLength(version));
77  }
78 
79  /// Reset all variable-length fields if any.
80  ThisType& resetVariableFields()
82  {
83  return *this;
84  }
85 
86  /// Reset all variable-length and optional fields if any.
87  ThisType& reset()
89  {
90  resetVariableFields();
91  return *this;
92  }
93 
94  /// Code to represent the type of event.
98  {
100 
101  return enumeration<EventType>(offset);
102  }
103 
104  /// Code to represent the type of event.
105  ThisType& setEventType(EventType::Enum value)
107  {
109 
110  setEnumeration<EventType>(offset, value);
111  return *this;
112  }
113 
114  /// Date and Time of instrument Activation or Expiration event
115  /// sent as number of nanoseconds since Unix epoch.
119  {
121 
122  return ordinary<Timestamp>(offset);
123  }
124 
125  /// Date and Time of instrument Activation or Expiration event
126  /// sent as number of nanoseconds since Unix epoch.
127  ThisType& setEventTime(Timestamp value)
129  {
131 
132  setOrdinary(offset, value.sinceEpoch());
133  return *this;
134  }
135 
136  /// \return size of entry body in bytes
137  /// for given version of message template.
140  static
143  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
145  {
146  return
147  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
148  9;
149  }
150 
151  /// Entity class name.
155  static const Char* className()
156  {
157  return "InstrumentDefinitionFixedIncome57.EventsEntry";
158  }
159  };
160 
161  /// Repeating group containing EventsEntry entries.
162  typedef
165 
166  /// Number of repeating FeedType repeating group entries.
167  /// Entry of FeedTypesEntry repeating group.
170  <
172  >
173  {
174  /// Base class type.
175  typedef
177  <
179  >
181 
182  /// This type alias.
184 
185  /// Initializes instance of given
186  /// version over given memory block.
188  void* data,
189  EncodedLength length,
190  SchemaVersion version)
191  : Base(data, length, version)
192  {
193  assert(version >= Schema::MinimalVersion);
194  assert(length >= blockLength(version));
195  }
196 
197  /// Reset all variable-length fields if any.
200  {
201  return *this;
202  }
203 
204  /// Reset all variable-length and optional fields if any.
205  ThisType& reset()
207  {
208  resetVariableFields();
209  return *this;
210  }
211 
212  /// Describes a class of service for a given data feed. GBX-
213  /// Real Book, GBI-Implied Book.
215  StrRef feedType() const
217  {
220 
221  return fixedStr<length>(offset);
222  }
223 
224  /// Describes a class of service for a given data feed. GBX-
225  /// Real Book, GBI-Implied Book.
226  ThisType& setFeedType(StrRef value)
228  {
231 
232  setFixedStr<length>(offset, value);
233  return *this;
234  }
235 
236  /// book depth.
240  {
242 
243  return ordinary<Int8>(offset);
244  }
245 
246  /// book depth.
247  ThisType& setMarketDepth(Int8 value)
249  {
251 
252  setOrdinary(offset, value);
253  return *this;
254  }
255 
256  /// \return size of entry body in bytes
257  /// for given version of message template.
260  static
263  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
265  {
266  return
267  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
268  4;
269  }
270 
271  /// Entity class name.
275  static const Char* className()
276  {
277  return "InstrumentDefinitionFixedIncome57.FeedTypesEntry";
278  }
279  };
280 
281  /// Repeating group containing FeedTypesEntry entries.
282  typedef
285 
286  /// Number of repeating InstrAttribType entries.
287  /// Entry of InstAttribEntry repeating group.
290  <
292  >
293  {
294  /// Base class type.
295  typedef
297  <
299  >
301 
302  /// This type alias.
304 
305  /// Initializes instance of given
306  /// version over given memory block.
308  void* data,
309  EncodedLength length,
310  SchemaVersion version)
311  : Base(data, length, version)
312  {
313  assert(version >= Schema::MinimalVersion);
314  assert(length >= blockLength(version));
315  }
316 
317  /// Reset all variable-length fields if any.
320  {
321  return *this;
322  }
323 
324  /// Reset all variable-length and optional fields if any.
325  ThisType& reset()
327  {
328  resetVariableFields();
329  return *this;
330  }
331 
332  /// Instrument eligibility attributes.
337  {
338  return InstAttribType();
339  }
340 
341  /// Bitmap field of 32 Boolean type instrument eligibility
342  /// flags.
346  {
348 
349  return ordinary<InstAttribValue>(offset);
350  }
351 
352  /// Bitmap field of 32 Boolean type instrument eligibility
353  /// flags.
356  {
358 
359  setOrdinary(offset, value);
360  return *this;
361  }
362 
363  /// \return size of entry body in bytes
364  /// for given version of message template.
367  static
370  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
372  {
373  return
374  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
375  4;
376  }
377 
378  /// Entity class name.
382  static const Char* className()
383  {
384  return "InstrumentDefinitionFixedIncome57.InstAttribEntry";
385  }
386  };
387 
388  /// Repeating group containing InstAttribEntry entries.
389  typedef
392 
393  /// Number of entries.
394  /// Entry of LotTypeRulesEntry repeating group.
397  <
399  >
400  {
401  /// Base class type.
402  typedef
404  <
406  >
408 
409  /// This type alias.
411 
412  /// Initializes instance of given
413  /// version over given memory block.
415  void* data,
416  EncodedLength length,
417  SchemaVersion version)
418  : Base(data, length, version)
419  {
420  assert(version >= Schema::MinimalVersion);
421  assert(length >= blockLength(version));
422  }
423 
424  /// Reset all variable-length fields if any.
427  {
428  return *this;
429  }
430 
431  /// Reset all variable-length and optional fields if any.
432  ThisType& reset()
434  {
435  minLotSizeNull();
436 
437  resetVariableFields();
438  return *this;
439  }
440 
441  /// This tag is required to interpret the value in tag
442  /// 1231-MinLotSize.
444  Int8 lotType() const
446  {
448 
449  return ordinary<Int8>(offset);
450  }
451 
452  /// This tag is required to interpret the value in tag
453  /// 1231-MinLotSize.
454  ThisType& setLotType(Int8 value)
456  {
458 
459  setOrdinary(offset, value);
460  return *this;
461  }
462 
463  /// Minimum quantity accepted for order entry. If tag
464  /// 1093-LotType=4, this value is the minimum quantity for
465  /// order entry expressed in the applicable units, specified
466  /// in tag 996-UnitOfMeasure, (e.g., megawatts). If tag
467  /// 1093-LotType= 5, this value represents order qty increment.
469  bool minLotSize(DecimalQty& value) const
471  {
473 
474  return decimal(value, offset, NullDecimalQty());
475  }
476 
477  /// Minimum quantity accepted for order entry. If tag
478  /// 1093-LotType=4, this value is the minimum quantity for
479  /// order entry expressed in the applicable units, specified
480  /// in tag 996-UnitOfMeasure, (e.g., megawatts). If tag
481  /// 1093-LotType= 5, this value represents order qty increment.
482  ThisType& setMinLotSize(DecimalQty value)
484  {
486 
487  setOrdinary(offset, value);
488  return *this;
489  }
490 
491  ThisType& minLotSizeNull()
493  {
495 
496  setOrdinary(offset, NullDecimalQty());
497  return *this;
498  }
499 
500  /// \return size of entry body in bytes
501  /// for given version of message template.
504  static
507  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
509  {
510  return
511  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
512  5;
513  }
514 
515  /// Entity class name.
519  static const Char* className()
520  {
521  return "InstrumentDefinitionFixedIncome57.LotTypeRulesEntry";
522  }
523  };
524 
525  /// Repeating group containing LotTypeRulesEntry entries.
526  typedef
529 
530  /// Initializes a blank instance.
531  InstrumentDefinitionFixedIncome57() ONIXS_CONFLATEDTCP_DEFAULT;
532 
533  /// Initializes an instance over the given memory block.
535  void* data,
536  EncodedLength length,
537  SchemaVersion version = Schema::Version)
538  : SbeMessage(data, length, version)
539  {
540  checkVersion<Schema>(version);
541  checkLength(length, version);
542  initHeader(TemplateId, blockLength(version), Schema::Id);
543  reset();
544  }
545 
546  /// Initializes an instance over the given memory block
547  /// With no variable-length fields initialization
548  /// It is assumed that the user does such an initialization manually.
550  void* data,
551  EncodedLength length,
552  NoFieldsInit,
553  SchemaVersion version = Schema::Version)
554  : SbeMessage(data, length, version)
555  {
556  checkVersion<Schema>(version);
557  checkLength(length, version);
558  initHeader(TemplateId, blockLength(version), Schema::Id);
559  resetVariableFields();
560  }
561 
562  /// Initializes an instance over the given memory block.
564  void* data,
565  EncodedLength length,
566  NoInit)
567  : SbeMessage(data, length)
568  {
569  checkCompatibility();
570  }
571 
572  /// Initializes an instance over the given SBE message.
573  explicit
575  const SbeMessage& message)
576  : SbeMessage(message)
577  {
578  assert(message.valid());
579 
580  checkCompatibility();
581  }
582 
583  /// Bitmap field of eight Boolean type indicators reflecting
584  /// the end of updates for a given Globex event.
588  {
590 
591  return ordinary<MatchEventIndicator>(offset);
592  }
593 
594  /// Bitmap field of eight Boolean type indicators reflecting
595  /// the end of updates for a given Globex event.
596  ThisType&
598  MatchEventIndicator value)
600  {
602 
603  setOrdinary(offset, value);
604  return *this;
605  }
606 
607  /// Total number of instruments in the Replay loop. Used on
608  /// Replay Feed only.
610  bool totNumReports(UInt32& value) const
612  {
614 
615  return ordinary(value, offset, NullUInt32());
616  }
617 
618  /// Total number of instruments in the Replay loop. Used on
619  /// Replay Feed only.
620  ThisType& setTotNumReports(UInt32 value)
622  {
624 
625  setOrdinary(offset, value);
626  return *this;
627  }
628 
629  ThisType& totNumReportsNull()
631  {
633 
634  setOrdinary(offset, NullUInt32());
635  return *this;
636  }
637 
638  /// Last Security update action on Incremental feed, 'D' or
639  /// 'M' is used when a mid-week deletion or modification (i.e.
640  /// extension) occurs.
645  {
647 
648  return enumeration<SecurityUpdateAction>(offset);
649  }
650 
651  /// Last Security update action on Incremental feed, 'D' or
652  /// 'M' is used when a mid-week deletion or modification (i.e.
653  /// extension) occurs.
654  ThisType&
658  {
660 
661  setEnumeration<SecurityUpdateAction>(offset, value);
662  return *this;
663  }
664 
665  /// Timestamp of when the instrument was last added, modified
666  /// or deleted.
670  {
672 
673  return ordinary<Timestamp>(offset);
674  }
675 
676  /// Timestamp of when the instrument was last added, modified
677  /// or deleted.
678  ThisType& setLastUpdateTime(Timestamp value)
680  {
682 
683  setOrdinary(offset, value.sinceEpoch());
684  return *this;
685  }
686 
687  /// Identifies the current market state of the instrument.
689  bool
691  SecurityTradingStatus::Enum& value) const
693  {
695 
696  return enumeration<SecurityTradingStatus>(value, offset, NullUInt8());
697  }
698 
699  /// Identifies the current market state of the instrument.
700  ThisType&
704  {
706 
707  setEnumeration<SecurityTradingStatus>(offset, value);
708  return *this;
709  }
710 
713  {
715 
716  setOrdinary(offset, NullUInt8());
717  return *this;
718  }
719 
720  /// MD channel ID as defined in the XML Configuration file.
722  Int16 applId() const
724  {
726 
727  return ordinary<Int16>(offset);
728  }
729 
730  /// MD channel ID as defined in the XML Configuration file.
731  ThisType& setApplId(Int16 value)
733  {
735 
736  setOrdinary(offset, value);
737  return *this;
738  }
739 
740  /// Identifies the market segment for all CME Globex
741  /// instruments.
745  {
747 
748  return ordinary<UInt8>(offset);
749  }
750 
751  /// Identifies the market segment for all CME Globex
752  /// instruments.
753  ThisType& setMarketSegmentId(UInt8 value)
755  {
757 
758  setOrdinary(offset, value);
759  return *this;
760  }
761 
762  /// Indicates the product complex.
766  {
768 
769  return ordinary<UInt8>(offset);
770  }
771 
772  /// Indicates the product complex.
773  ThisType& setUnderlyingProduct(UInt8 value)
775  {
777 
778  setOrdinary(offset, value);
779  return *this;
780  }
781 
782  /// Exchange used to identify a security.
786  {
789 
790  return fixedStr<length>(offset);
791  }
792 
793  /// Exchange used to identify a security.
794  ThisType& setSecurityExchange(StrRef value)
796  {
799 
800  setFixedStr<length>(offset, value);
801  return *this;
802  }
803 
804  /// Security Group Code.
808  {
811 
812  return fixedStr<length>(offset);
813  }
814 
815  /// Security Group Code.
816  ThisType& setSecurityGroup(StrRef value)
818  {
821 
822  setFixedStr<length>(offset, value);
823  return *this;
824  }
825 
826  /// The underlying asset code also known as Product Code.
828  StrRef asset() const
830  {
833 
834  return fixedStr<length>(offset);
835  }
836 
837  /// The underlying asset code also known as Product Code.
838  ThisType& setAsset(StrRef value)
840  {
843 
844  setFixedStr<length>(offset, value);
845  return *this;
846  }
847 
848  /// Instrument Name or Symbol.
850  StrRef symbol() const
852  {
855 
856  return fixedStr<length>(offset);
857  }
858 
859  /// Instrument Name or Symbol.
860  ThisType& setSymbol(StrRef value)
862  {
865 
866  setFixedStr<length>(offset, value);
867  return *this;
868  }
869 
870  /// Unique instrument ID.
874  {
876 
877  return ordinary<Int32>(offset);
878  }
879 
880  /// Unique instrument ID.
881  ThisType& setSecurityId(Int32 value)
883  {
885 
886  setOrdinary(offset, value);
887  return *this;
888  }
889 
890  /// Identifies class or source of Tag 48-SecurityID value.
895  {
896  return SecurityIDSource();
897  }
898 
899  /// Security Type.
903  {
906 
907  return fixedStr<length>(offset);
908  }
909 
910  /// Security Type.
911  ThisType& setSecurityType(StrRef value)
913  {
916 
917  setFixedStr<length>(offset, value);
918  return *this;
919  }
920 
921  /// ISO standard instrument categorization code.
923  StrRef cfiCode() const
925  {
928 
929  return fixedStr<length>(offset);
930  }
931 
932  /// ISO standard instrument categorization code.
933  ThisType& setCfiCode(StrRef value)
935  {
938 
939  setFixedStr<length>(offset, value);
940  return *this;
941  }
942 
943  /// Identifies the currency used for price.
945  StrRef currency() const
947  {
950 
951  return fixedStr<length>(offset);
952  }
953 
954  /// Identifies the currency used for price.
955  ThisType& setCurrency(StrRef value)
957  {
960 
961  setFixedStr<length>(offset, value);
962  return *this;
963  }
964 
965  /// Identifies currency used for settlement, if different from
966  /// trade price currency.
970  {
973 
974  return fixedStr<length>(offset);
975  }
976 
977  /// Identifies currency used for settlement, if different from
978  /// trade price currency.
979  ThisType& setSettlCurrency(StrRef value)
981  {
984 
985  setFixedStr<length>(offset, value);
986  return *this;
987  }
988 
989  /// Matching Algorithm.
993  {
995 
996  return ordinary<CHAR>(offset);
997  }
998 
999  /// Matching Algorithm.
1000  ThisType& setMatchAlgorithm(CHAR value)
1002  {
1004 
1005  setOrdinary(offset, value);
1006  return *this;
1007  }
1008 
1009  /// The minimum trading volume for a security.
1013  {
1015 
1016  return ordinary<UInt32>(offset);
1017  }
1018 
1019  /// The minimum trading volume for a security.
1020  ThisType& setMinTradeVol(UInt32 value)
1022  {
1024 
1025  setOrdinary(offset, value);
1026  return *this;
1027  }
1028 
1029  /// The maximum trading volume for a security.
1033  {
1035 
1036  return ordinary<UInt32>(offset);
1037  }
1038 
1039  /// The maximum trading volume for a security.
1040  ThisType& setMaxTradeVol(UInt32 value)
1042  {
1044 
1045  setOrdinary(offset, value);
1046  return *this;
1047  }
1048 
1049  /// Minimum constant tick for the instrument, sent only if
1050  /// instrument is non-VTT (Variable Tick table) eligible.
1052  bool minPriceIncrement(PRICE9& value) const
1054  {
1056 
1057  return decimal(value, offset, NullPRICE9());
1058  }
1059 
1060  /// Minimum constant tick for the instrument, sent only if
1061  /// instrument is non-VTT (Variable Tick table) eligible.
1062  ThisType& setMinPriceIncrement(PRICE9 value)
1064  {
1066 
1067  setOrdinary(offset, value);
1068  return *this;
1069  }
1070 
1073  {
1075 
1076  setOrdinary(offset, NullPRICE9());
1077  return *this;
1078  }
1079 
1080  /// Contains the multiplier to convert the CME Globex display
1081  /// price to the conventional price.
1085  {
1087 
1088  return decimal<Decimal9>(offset);
1089  }
1090 
1091  /// Contains the multiplier to convert the CME Globex display
1092  /// price to the conventional price.
1093  ThisType& setDisplayFactor(Decimal9 value)
1095  {
1097 
1098  setOrdinary(offset, value);
1099  return *this;
1100  }
1101 
1102  /// Price Denominator of Main Fraction.
1104  bool mainFraction(UInt8& value) const
1106  {
1108 
1109  return ordinary(value, offset, NullUInt8());
1110  }
1111 
1112  /// Price Denominator of Main Fraction.
1113  ThisType& setMainFraction(UInt8 value)
1115  {
1117 
1118  setOrdinary(offset, value);
1119  return *this;
1120  }
1121 
1122  ThisType& mainFractionNull()
1124  {
1126 
1127  setOrdinary(offset, NullUInt8());
1128  return *this;
1129  }
1130 
1131  /// Price Denominator of Sub Fraction.
1133  bool subFraction(UInt8& value) const
1135  {
1137 
1138  return ordinary(value, offset, NullUInt8());
1139  }
1140 
1141  /// Price Denominator of Sub Fraction.
1142  ThisType& setSubFraction(UInt8 value)
1144  {
1146 
1147  setOrdinary(offset, value);
1148  return *this;
1149  }
1150 
1151  ThisType& subFractionNull()
1153  {
1155 
1156  setOrdinary(offset, NullUInt8());
1157  return *this;
1158  }
1159 
1160  /// Number of Decimals in Displayed Price.
1162  bool priceDisplayFormat(UInt8& value) const
1164  {
1166 
1167  return ordinary(value, offset, NullUInt8());
1168  }
1169 
1170  /// Number of Decimals in Displayed Price.
1171  ThisType& setPriceDisplayFormat(UInt8 value)
1173  {
1175 
1176  setOrdinary(offset, value);
1177  return *this;
1178  }
1179 
1182  {
1184 
1185  setOrdinary(offset, NullUInt8());
1186  return *this;
1187  }
1188 
1189  /// Unit of measure for the products' original contract size.
1190  /// This will be populated for all products listed on CME
1191  /// Globex.
1195  {
1198 
1199  return fixedStr<length>(offset);
1200  }
1201 
1202  /// Unit of measure for the products' original contract size.
1203  /// This will be populated for all products listed on CME
1204  /// Globex.
1205  ThisType& setUnitOfMeasure(StrRef value)
1207  {
1210 
1211  setFixedStr<length>(offset, value);
1212  return *this;
1213  }
1214 
1215  /// This field contains the contract size for each instrument.
1216  /// Use in combination with tag 996-UnitofMeasure.
1218  bool unitOfMeasureQty(Decimal9& value) const
1220  {
1222 
1223  return decimal(value, offset, NullDecimal9());
1224  }
1225 
1226  /// This field contains the contract size for each instrument.
1227  /// Use in combination with tag 996-UnitofMeasure.
1230  {
1232 
1233  setOrdinary(offset, value);
1234  return *this;
1235  }
1236 
1239  {
1241 
1242  setOrdinary(offset, NullDecimal9());
1243  return *this;
1244  }
1245 
1246  /// Trading Reference Price.
1248  bool tradingReferencePrice(PRICE9& value) const
1250  {
1252 
1253  return decimal(value, offset, NullPRICE9());
1254  }
1255 
1256  /// Trading Reference Price.
1259  {
1261 
1262  setOrdinary(offset, value);
1263  return *this;
1264  }
1265 
1268  {
1270 
1271  setOrdinary(offset, NullPRICE9());
1272  return *this;
1273  }
1274 
1275  /// Indicates session date corresponding to the reference
1276  /// price in tag 1150-TradingReferencePrice.
1278  bool tradingReferenceDate(Timestamp& value) const
1280  {
1281  typedef LocalMktDate FieldValue;
1282 
1284 
1285  FieldValue fieldValue;
1286 
1287  if (ordinary(fieldValue, offset, NullLocalMktDate()))
1288  {
1289  value = localMktDateToTimestamp(fieldValue);
1290  return true;
1291  }
1292  return false;
1293  }
1294 
1295  /// Indicates session date corresponding to the reference
1296  /// price in tag 1150-TradingReferencePrice.
1299  {
1301 
1302  setOrdinary(offset, timestampToLocalMktDate(value));
1303  return *this;
1304  }
1305 
1308  {
1310 
1311  setOrdinary(offset, NullLocalMktDate());
1312  return *this;
1313  }
1314 
1315  /// Allowable high limit price for the trading day.
1317  bool highLimitPrice(PRICE9& value) const
1319  {
1321 
1322  return decimal(value, offset, NullPRICE9());
1323  }
1324 
1325  /// Allowable high limit price for the trading day.
1326  ThisType& setHighLimitPrice(PRICE9 value)
1328  {
1330 
1331  setOrdinary(offset, value);
1332  return *this;
1333  }
1334 
1337  {
1339 
1340  setOrdinary(offset, NullPRICE9());
1341  return *this;
1342  }
1343 
1344  /// Allowable low limit price for the trading day.
1346  bool lowLimitPrice(PRICE9& value) const
1348  {
1350 
1351  return decimal(value, offset, NullPRICE9());
1352  }
1353 
1354  /// Allowable low limit price for the trading day.
1355  ThisType& setLowLimitPrice(PRICE9 value)
1357  {
1359 
1360  setOrdinary(offset, value);
1361  return *this;
1362  }
1363 
1364  ThisType& lowLimitPriceNull()
1366  {
1368 
1369  setOrdinary(offset, NullPRICE9());
1370  return *this;
1371  }
1372 
1373  /// Differential value for price banding.
1375  bool maxPriceVariation(PRICE9& value) const
1377  {
1379 
1380  return decimal(value, offset, NullPRICE9());
1381  }
1382 
1383  /// Differential value for price banding.
1384  ThisType& setMaxPriceVariation(PRICE9 value)
1386  {
1388 
1389  setOrdinary(offset, value);
1390  return *this;
1391  }
1392 
1395  {
1397 
1398  setOrdinary(offset, NullPRICE9());
1399  return *this;
1400  }
1401 
1402  /// Monetary value equivalent to the minimum price
1403  /// fluctuation.
1405  bool minPriceIncrementAmount(PRICE9& value) const
1407  {
1409 
1410  return decimal(value, offset, NullPRICE9());
1411  }
1412 
1413  /// Monetary value equivalent to the minimum price
1414  /// fluctuation.
1417  {
1419 
1420  setOrdinary(offset, value);
1421  return *this;
1422  }
1423 
1426  {
1428 
1429  setOrdinary(offset, NullPRICE9());
1430  return *this;
1431  }
1432 
1433  /// Issue Date.
1435  bool issueDate(Timestamp& value) const
1437  {
1438  typedef LocalMktDate FieldValue;
1439 
1441 
1442  FieldValue fieldValue;
1443 
1444  if (ordinary(fieldValue, offset, NullLocalMktDate()))
1445  {
1446  value = localMktDateToTimestamp(fieldValue);
1447  return true;
1448  }
1449  return false;
1450  }
1451 
1452  /// Issue Date.
1453  ThisType& setIssueDate(Timestamp value)
1455  {
1457 
1458  setOrdinary(offset, timestampToLocalMktDate(value));
1459  return *this;
1460  }
1461 
1462  ThisType& issueDateNull()
1464  {
1466 
1467  setOrdinary(offset, NullLocalMktDate());
1468  return *this;
1469  }
1470 
1471  /// Dated Date.
1473  bool datedDate(Timestamp& value) const
1475  {
1476  typedef LocalMktDate FieldValue;
1477 
1479 
1480  FieldValue fieldValue;
1481 
1482  if (ordinary(fieldValue, offset, NullLocalMktDate()))
1483  {
1484  value = localMktDateToTimestamp(fieldValue);
1485  return true;
1486  }
1487  return false;
1488  }
1489 
1490  /// Dated Date.
1491  ThisType& setDatedDate(Timestamp value)
1493  {
1495 
1496  setOrdinary(offset, timestampToLocalMktDate(value));
1497  return *this;
1498  }
1499 
1500  ThisType& datedDateNull()
1502  {
1504 
1505  setOrdinary(offset, NullLocalMktDate());
1506  return *this;
1507  }
1508 
1509  /// Maturity Date.
1511  bool maturityDate(Timestamp& value) const
1513  {
1514  typedef LocalMktDate FieldValue;
1515 
1517 
1518  FieldValue fieldValue;
1519 
1520  if (ordinary(fieldValue, offset, NullLocalMktDate()))
1521  {
1522  value = localMktDateToTimestamp(fieldValue);
1523  return true;
1524  }
1525  return false;
1526  }
1527 
1528  /// Maturity Date.
1529  ThisType& setMaturityDate(Timestamp value)
1531  {
1533 
1534  setOrdinary(offset, timestampToLocalMktDate(value));
1535  return *this;
1536  }
1537 
1538  ThisType& maturityDateNull()
1540  {
1542 
1543  setOrdinary(offset, NullLocalMktDate());
1544  return *this;
1545  }
1546 
1547  /// The rate of interest that, when multiplied by the
1548  /// principal, par value, or face value of a bond, provides
1549  /// the currency amount of the periodic interest payment.
1551  bool couponRate(Decimal9& value) const
1553  {
1555 
1556  return decimal(value, offset, NullDecimal9());
1557  }
1558 
1559  /// The rate of interest that, when multiplied by the
1560  /// principal, par value, or face value of a bond, provides
1561  /// the currency amount of the periodic interest payment.
1562  ThisType& setCouponRate(Decimal9 value)
1564  {
1566 
1567  setOrdinary(offset, value);
1568  return *this;
1569  }
1570 
1571  ThisType& couponRateNull()
1573  {
1575 
1576  setOrdinary(offset, NullDecimal9());
1577  return *this;
1578  }
1579 
1580  /// Par value.
1582  bool parValue(PRICE9& value) const
1584  {
1586 
1587  return decimal(value, offset, NullPRICE9());
1588  }
1589 
1590  /// Par value.
1591  ThisType& setParValue(PRICE9 value)
1593  {
1595 
1596  setOrdinary(offset, value);
1597  return *this;
1598  }
1599 
1600  ThisType& parValueNull()
1602  {
1604 
1605  setOrdinary(offset, NullPRICE9());
1606  return *this;
1607  }
1608 
1609  /// Time unit associated with the frequency of the bond's
1610  /// coupon payment.
1614  {
1617 
1618  return fixedStr<length>(offset);
1619  }
1620 
1621  /// Time unit associated with the frequency of the bond's
1622  /// coupon payment.
1625  {
1628 
1629  setFixedStr<length>(offset, value);
1630  return *this;
1631  }
1632 
1633  /// Time unit multiplier for the frequency of the bond's
1634  /// coupon payment.
1636  bool couponFrequencyPeriod(UInt16& value) const
1638  {
1640 
1641  return ordinary(value, offset, NullUInt16());
1642  }
1643 
1644  /// Time unit multiplier for the frequency of the bond's
1645  /// coupon payment.
1648  {
1650 
1651  setOrdinary(offset, value);
1652  return *this;
1653  }
1654 
1657  {
1659 
1660  setOrdinary(offset, NullUInt16());
1661  return *this;
1662  }
1663 
1664  /// The day count convention used in interest calculations for
1665  /// a bond or an interest bearing security.
1669  {
1672 
1673  return fixedStr<length>(offset);
1674  }
1675 
1676  /// The day count convention used in interest calculations for
1677  /// a bond or an interest bearing security.
1678  ThisType& setCouponDayCount(StrRef value)
1680  {
1683 
1684  setFixedStr<length>(offset, value);
1685  return *this;
1686  }
1687 
1688  /// Country of Origin, ISO alpha-2 country code.
1692  {
1695 
1696  return fixedStr<length>(offset);
1697  }
1698 
1699  /// Country of Origin, ISO alpha-2 country code.
1700  ThisType& setCountryOfIssue(StrRef value)
1702  {
1705 
1706  setFixedStr<length>(offset, value);
1707  return *this;
1708  }
1709 
1710  /// Name of security issuer or the Legal Entity Identifier
1711  /// (LEI - the International ISO standard 17442).
1713  StrRef issuer() const
1715  {
1718 
1719  return fixedStr<length>(offset);
1720  }
1721 
1722  /// Name of security issuer or the Legal Entity Identifier
1723  /// (LEI - the International ISO standard 17442).
1724  ThisType& setIssuer(StrRef value)
1726  {
1729 
1730  setFixedStr<length>(offset, value);
1731  return *this;
1732  }
1733 
1734  /// Long name of the instrument.
1738  {
1741 
1742  return fixedStr<length>(offset);
1743  }
1744 
1745  /// Long name of the instrument.
1748  {
1751 
1752  setFixedStr<length>(offset, value);
1753  return *this;
1754  }
1755 
1756  /// Expanded instrument description. Will contain either ISIN
1757  /// or CUSIP.
1761  {
1764 
1765  return fixedStr<length>(offset);
1766  }
1767 
1768  /// Expanded instrument description. Will contain either ISIN
1769  /// or CUSIP.
1770  ThisType& setSecurityAltId(StrRef value)
1772  {
1775 
1776  setFixedStr<length>(offset, value);
1777  return *this;
1778  }
1779 
1780  /// Identifies class or source of the SecurityAltID (455)
1781  /// value.
1783  bool
1785  SecurityAltIDSource::Enum& value) const
1787  {
1789 
1790  return enumeration<SecurityAltIDSource>(value, offset, NullUInt8());
1791  }
1792 
1793  /// Identifies class or source of the SecurityAltID (455)
1794  /// value.
1795  ThisType&
1799  {
1801 
1802  setEnumeration<SecurityAltIDSource>(offset, value);
1803  return *this;
1804  }
1805 
1808  {
1810 
1811  setOrdinary(offset, NullUInt8());
1812  return *this;
1813  }
1814 
1815  /// Price quotation method.
1819  {
1822 
1823  return fixedStr<length>(offset);
1824  }
1825 
1826  /// Price quotation method.
1827  ThisType& setPriceQuoteMethod(StrRef value)
1829  {
1832 
1833  setFixedStr<length>(offset, value);
1834  return *this;
1835  }
1836 
1837  /// Clearing organization.
1841  {
1844 
1845  return fixedStr<length>(offset);
1846  }
1847 
1848  /// Clearing organization.
1851  {
1854 
1855  setFixedStr<length>(offset, value);
1856  return *this;
1857  }
1858 
1859  /// User-defined Instrument flag.
1863  {
1865 
1866  return ordinary<UserDefinedInstrument>(offset);
1867  }
1868 
1869  /// User-defined Instrument flag.
1870  ThisType&
1872  UserDefinedInstrument value)
1874  {
1876 
1877  setOrdinary(offset, value);
1878  return *this;
1879  }
1880 
1881  /// Risk Set identifies the list of instruments sharing credit
1882  /// limits set up.
1884  StrRef riskSet() const
1886  {
1889 
1890  return fixedStr<length>(offset);
1891  }
1892 
1893  /// Risk Set identifies the list of instruments sharing credit
1894  /// limits set up.
1895  ThisType& setRiskSet(StrRef value)
1897  {
1900 
1901  setFixedStr<length>(offset, value);
1902  return *this;
1903  }
1904 
1905  /// Market Set defines the bilateral relationship and Self
1906  /// Match Prevention configuration for eligible markets.
1910  {
1913 
1914  return fixedStr<length>(offset);
1915  }
1916 
1917  /// Market Set defines the bilateral relationship and Self
1918  /// Match Prevention configuration for eligible markets.
1919  ThisType& setMarketSet(StrRef value)
1921  {
1924 
1925  setFixedStr<length>(offset, value);
1926  return *this;
1927  }
1928 
1929  /// External unique instrument ID.
1931  bool instrumentGUId(UInt64& value) const
1933  {
1935 
1936  return ordinary(value, offset, NullUInt64());
1937  }
1938 
1939  /// External unique instrument ID.
1940  ThisType& setInstrumentGUId(UInt64 value)
1942  {
1944 
1945  setOrdinary(offset, value);
1946  return *this;
1947  }
1948 
1951  {
1953 
1954  setOrdinary(offset, NullUInt64());
1955  return *this;
1956  }
1957 
1958  /// \return instance of Events repeating group.
1960  Events events() const
1962  {
1963  return getGroup<Events>(EventsAccess(), *this);
1964  }
1965 
1966  /// \return instance of Events repeating group.
1970  {
1971  return getGroup<Events>(EventsAccess(), *this);
1972  }
1973 
1974  /// Setup repeating group with the given number of entries.
1975  /// Sets all optional fields of the group entries to null.
1976  /// \return NoEvents(864) repeating group.
1978  {
1979  return constructGroup<Events>(
1980  EventsAccess(),
1981  length,
1982  *this);
1983  }
1984 
1985  /// Setup repeating group with the given number of entries.
1986  /// \return NoEvents(864) repeating group.
1987  Events
1989  Events::Size length,
1990  NoFieldsInit)
1991  {
1992  return setupGroup<Events>(
1993  EventsAccess(),
1994  length,
1995  *this);
1996  }
1997 
1998  /// \return instance of FeedTypes repeating group.
2002  {
2003  return getGroup<FeedTypes>(FeedTypesAccess(), *this);
2004  }
2005 
2006  /// \return instance of FeedTypes repeating group.
2010  {
2011  return getGroup<FeedTypes>(FeedTypesAccess(), *this);
2012  }
2013 
2014  /// Setup repeating group with the given number of entries.
2015  /// Sets all optional fields of the group entries to null.
2016  /// \return NoMDFeedTypes(1141) repeating group.
2018  {
2019  return constructGroup<FeedTypes>(
2020  FeedTypesAccess(),
2021  length,
2022  *this);
2023  }
2024 
2025  /// Setup repeating group with the given number of entries.
2026  /// \return NoMDFeedTypes(1141) repeating group.
2027  FeedTypes
2029  FeedTypes::Size length,
2030  NoFieldsInit)
2031  {
2032  return setupGroup<FeedTypes>(
2033  FeedTypesAccess(),
2034  length,
2035  *this);
2036  }
2037 
2038  /// \return instance of InstAttrib repeating group.
2042  {
2043  return getGroup<InstAttrib>(
2044  InstAttribAccess(),
2045  *this);
2046  }
2047 
2048  /// \return instance of InstAttrib repeating group.
2052  {
2053  return getGroup<InstAttrib>(
2054  InstAttribAccess(),
2055  *this);
2056  }
2057 
2058  /// Setup repeating group with the given number of entries.
2059  /// Sets all optional fields of the group entries to null.
2060  /// \return NoInstAttrib(870) repeating group.
2062  {
2063  return constructGroup<InstAttrib>(
2064  InstAttribAccess(),
2065  length,
2066  *this);
2067  }
2068 
2069  /// Setup repeating group with the given number of entries.
2070  /// \return NoInstAttrib(870) repeating group.
2071  InstAttrib
2073  InstAttrib::Size length,
2074  NoFieldsInit)
2075  {
2076  return setupGroup<InstAttrib>(
2077  InstAttribAccess(),
2078  length,
2079  *this);
2080  }
2081 
2082  /// \return instance of LotTypeRules repeating group.
2086  {
2087  return getGroup<LotTypeRules>(
2088  LotTypeRulesAccess(),
2089  *this);
2090  }
2091 
2092  /// \return instance of LotTypeRules repeating group.
2096  {
2097  return getGroup<LotTypeRules>(
2098  LotTypeRulesAccess(),
2099  *this);
2100  }
2101 
2102  /// Setup repeating group with the given number of entries.
2103  /// Sets all optional fields of the group entries to null.
2104  /// \return NoLotTypeRules(1234) repeating group.
2105  LotTypeRules
2107  LotTypeRules::Size length)
2108  {
2109  return constructGroup<LotTypeRules>(
2110  LotTypeRulesAccess(),
2111  length,
2112  *this);
2113  }
2114 
2115  /// Setup repeating group with the given number of entries.
2116  /// \return NoLotTypeRules(1234) repeating group.
2117  LotTypeRules
2119  LotTypeRules::Size length,
2120  NoFieldsInit)
2121  {
2122  return setupGroup<LotTypeRules>(
2123  LotTypeRulesAccess(),
2124  length,
2125  *this);
2126  }
2127 
2128  /// Size of message body in bytes.
2131  static
2132  BlockLength
2134  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2136  {
2137  return
2138  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2139  338;
2140  }
2141 
2142  /// Minimal variable fields size (when variable-length fields are empty).
2146  static
2147  MessageSize
2149  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2150  {
2151  return
2152  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2153  Events::EmptySize + FeedTypes::EmptySize + InstAttrib::EmptySize + LotTypeRules::EmptySize;
2154  }
2155 
2156  /// Reset all variable-length fields if any.
2159  {
2160  eventsNull();
2161  feedTypesNull();
2162  instAttribNull();
2163  lotTypeRulesNull();
2164  return *this;
2165  }
2166 
2167  /// Reset all variable-length and optional fields if any.
2168  ThisType& reset()
2170  {
2171  totNumReportsNull();
2172  securityTradingStatusNull();
2173  minPriceIncrementNull();
2174  mainFractionNull();
2175  subFractionNull();
2176  priceDisplayFormatNull();
2177  unitOfMeasureQtyNull();
2178  tradingReferencePriceNull();
2179  tradingReferenceDateNull();
2180  highLimitPriceNull();
2181  lowLimitPriceNull();
2182  maxPriceVariationNull();
2183  minPriceIncrementAmountNull();
2184  issueDateNull();
2185  datedDateNull();
2186  maturityDateNull();
2187  couponRateNull();
2188  parValueNull();
2189  couponFrequencyPeriodNull();
2190  securityAltIdSourceNull();
2191  instrumentGUIdNull();
2192 
2193  resetVariableFields();
2194  return *this;
2195  }
2196 
2197  /// \return class name.
2201  static const Char* className()
2202  {
2203  return "InstrumentDefinitionFixedIncome57";
2204  }
2205 
2206  /// FIX message type.
2210  static StrRef fixType()
2212  {
2213  return constructStrRef("d");
2214  }
2215 
2216  /// \return the end of the message.
2218  const void* tail() const
2220  {
2221  return
2222  lotTypeRules().tail();
2223  }
2224 
2225  /// \return the size occupied by the message.
2229  {
2230  return
2231  SbeMessage::calculateBinarySize(tail());
2232  }
2233 
2234 private:
2235  void checkLength(
2236  EncodedLength length, SchemaVersion version) const
2237  {
2238  const EncodedLength minimalRequiredLength =
2239  blockLength(version) +
2240  MessageHeader::Size +
2241  getMinimalVariableFieldsSize(version);
2242 
2243  checkBinaryLength(
2244  *this, length, minimalRequiredLength);
2245  }
2246 
2247  /// Checks variable fields consistency.
2248  void checkVarLenFields() const
2249  {
2250  groups().
2251  checkTail<Events>().
2252  checkTail<FeedTypes>().
2253  checkTail<InstAttrib>().
2254  checkTail<LotTypeRules>();
2255  }
2256 
2257  void checkCompatibility() const
2258  {
2259  assert(TemplateId == templateId());
2260 
2261  checkSchema<Schema>(schemaId(), version());
2262  checkLength(bufferSize(), version());
2263  checkVarLenFields();
2264  }
2265 
2266  /// Access helper.
2267  struct EventsAccess
2268  {
2269  Events
2270  operator()(
2271  const InstrumentDefinitionFixedIncome57& obj) const
2273  {
2274  return obj.
2275  groups().
2276  head<Events>();
2277  }
2278  };
2279 
2280  /// Reset an instance of the repeating group.
2281  /// All the following data will be invalidated.
2282  void eventsNull()
2284  {
2285  resetGroup<Events>(EventsAccess(), *this);
2286  }
2287 
2288  /// Access helper.
2289  struct FeedTypesAccess
2290  {
2291  FeedTypes
2292  operator()(
2293  const InstrumentDefinitionFixedIncome57& obj) const
2295  {
2296  return obj.
2297  groups().
2298  tail<Events>().
2299  head<FeedTypes>();
2300  }
2301  };
2302 
2303  /// Reset an instance of the repeating group.
2304  /// All the following data will be invalidated.
2305  void feedTypesNull()
2307  {
2308  resetGroup<FeedTypes>(FeedTypesAccess(), *this);
2309  }
2310 
2311  /// Access helper.
2312  struct InstAttribAccess
2313  {
2314  InstAttrib
2315  operator()(
2316  const InstrumentDefinitionFixedIncome57& obj) const
2318  {
2319  return obj.
2320  groups().
2321  tail<Events>().
2322  tail<FeedTypes>().
2323  head<InstAttrib>();
2324  }
2325  };
2326 
2327  /// Reset an instance of the repeating group.
2328  /// All the following data will be invalidated.
2329  void instAttribNull()
2331  {
2332  resetGroup<InstAttrib>(
2333  InstAttribAccess(),
2334  *this);
2335  }
2336 
2337  /// Access helper.
2338  struct LotTypeRulesAccess
2339  {
2340  LotTypeRules
2341  operator()(
2342  const InstrumentDefinitionFixedIncome57& obj) const
2344  {
2345  return obj.
2346  groups().
2347  tail<Events>().
2348  tail<FeedTypes>().
2349  tail<InstAttrib>().
2350  head<LotTypeRules>();
2351  }
2352  };
2353 
2354  /// Reset an instance of the repeating group.
2355  /// All the following data will be invalidated.
2356  void lotTypeRulesNull()
2358  {
2359  resetGroup<LotTypeRules>(
2360  LotTypeRulesAccess(),
2361  *this);
2362  }
2363 };
2364 
2365 /// MDInstrumentDefinitionRepo.
2368 : SbeMessage
2369 {
2370  /// Used template schema.
2372 
2373  /// This type alias.
2375 
2376  /// Message template ID from SBE schema.
2377  enum { TemplateId = 58 };
2378 
2379  /// Number of repeating EventType entries.
2380  /// Entry of EventsEntry repeating group.
2383  <
2385  >
2386  {
2387  /// Base class type.
2388  typedef
2390  <
2392  >
2394 
2395  /// This type alias.
2397 
2398  /// Initializes instance of given
2399  /// version over given memory block.
2401  void* data,
2402  EncodedLength length,
2403  SchemaVersion version)
2404  : Base(data, length, version)
2405  {
2406  assert(version >= Schema::MinimalVersion);
2407  assert(length >= blockLength(version));
2408  }
2409 
2410  /// Reset all variable-length fields if any.
2413  {
2414  return *this;
2415  }
2416 
2417  /// Reset all variable-length and optional fields if any.
2418  ThisType& reset()
2420  {
2421  resetVariableFields();
2422  return *this;
2423  }
2424 
2425  /// Code to represent the type of event.
2429  {
2431 
2432  return enumeration<EventType>(offset);
2433  }
2434 
2435  /// Code to represent the type of event.
2438  {
2440 
2441  setEnumeration<EventType>(offset, value);
2442  return *this;
2443  }
2444 
2445  /// Date and Time of Instrument Activation or Expiration event
2446  /// sent as number of nanoseconds since Unix epoch.
2450  {
2452 
2453  return ordinary<Timestamp>(offset);
2454  }
2455 
2456  /// Date and Time of Instrument Activation or Expiration event
2457  /// sent as number of nanoseconds since Unix epoch.
2458  ThisType& setEventTime(Timestamp value)
2460  {
2462 
2463  setOrdinary(offset, value.sinceEpoch());
2464  return *this;
2465  }
2466 
2467  /// \return size of entry body in bytes
2468  /// for given version of message template.
2471  static
2472  BlockLength
2474  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2476  {
2477  return
2478  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2479  9;
2480  }
2481 
2482  /// Entity class name.
2486  static const Char* className()
2487  {
2488  return "InstrumentDefinitionRepo58.EventsEntry";
2489  }
2490  };
2491 
2492  /// Repeating group containing EventsEntry entries.
2493  typedef
2496 
2497  /// Number of repeating FeedType repeating group entries.
2498  /// Entry of FeedTypesEntry repeating group.
2501  <
2503  >
2504  {
2505  /// Base class type.
2506  typedef
2508  <
2510  >
2512 
2513  /// This type alias.
2515 
2516  /// Initializes instance of given
2517  /// version over given memory block.
2519  void* data,
2520  EncodedLength length,
2521  SchemaVersion version)
2522  : Base(data, length, version)
2523  {
2524  assert(version >= Schema::MinimalVersion);
2525  assert(length >= blockLength(version));
2526  }
2527 
2528  /// Reset all variable-length fields if any.
2531  {
2532  return *this;
2533  }
2534 
2535  /// Reset all variable-length and optional fields if any.
2536  ThisType& reset()
2538  {
2539  resetVariableFields();
2540  return *this;
2541  }
2542 
2543  /// Describes a class of service for a given data feed. GBX-
2544  /// Real Book, GBI-Implied Book.
2548  {
2551 
2552  return fixedStr<length>(offset);
2553  }
2554 
2555  /// Describes a class of service for a given data feed. GBX-
2556  /// Real Book, GBI-Implied Book.
2557  ThisType& setFeedType(StrRef value)
2559  {
2562 
2563  setFixedStr<length>(offset, value);
2564  return *this;
2565  }
2566 
2567  /// Book depth.
2571  {
2573 
2574  return ordinary<Int8>(offset);
2575  }
2576 
2577  /// Book depth.
2578  ThisType& setMarketDepth(Int8 value)
2580  {
2582 
2583  setOrdinary(offset, value);
2584  return *this;
2585  }
2586 
2587  /// \return size of entry body in bytes
2588  /// for given version of message template.
2591  static
2592  BlockLength
2594  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2596  {
2597  return
2598  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2599  4;
2600  }
2601 
2602  /// Entity class name.
2606  static const Char* className()
2607  {
2608  return "InstrumentDefinitionRepo58.FeedTypesEntry";
2609  }
2610  };
2611 
2612  /// Repeating group containing FeedTypesEntry entries.
2613  typedef
2616 
2617  /// Number of repeating InstrAttribType entries.
2618  /// Entry of InstAttribEntry repeating group.
2621  <
2623  >
2624  {
2625  /// Base class type.
2626  typedef
2628  <
2630  >
2632 
2633  /// This type alias.
2635 
2636  /// Initializes instance of given
2637  /// version over given memory block.
2639  void* data,
2640  EncodedLength length,
2641  SchemaVersion version)
2642  : Base(data, length, version)
2643  {
2644  assert(version >= Schema::MinimalVersion);
2645  assert(length >= blockLength(version));
2646  }
2647 
2648  /// Reset all variable-length fields if any.
2651  {
2652  return *this;
2653  }
2654 
2655  /// Reset all variable-length and optional fields if any.
2656  ThisType& reset()
2658  {
2659  resetVariableFields();
2660  return *this;
2661  }
2662 
2663  /// Instrument eligibility attributes.
2668  {
2669  return InstAttribType();
2670  }
2671 
2672  /// Bitmap field of 32 Boolean type indicators.
2676  {
2678 
2679  return ordinary<InstAttribValue>(offset);
2680  }
2681 
2682  /// Bitmap field of 32 Boolean type indicators.
2685  {
2687 
2688  setOrdinary(offset, value);
2689  return *this;
2690  }
2691 
2692  /// \return size of entry body in bytes
2693  /// for given version of message template.
2696  static
2697  BlockLength
2699  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2701  {
2702  return
2703  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2704  4;
2705  }
2706 
2707  /// Entity class name.
2711  static const Char* className()
2712  {
2713  return "InstrumentDefinitionRepo58.InstAttribEntry";
2714  }
2715  };
2716 
2717  /// Repeating group containing InstAttribEntry entries.
2718  typedef
2721 
2722  /// Number of entries.
2723  /// Entry of LotTypeRulesEntry repeating group.
2726  <
2728  >
2729  {
2730  /// Base class type.
2731  typedef
2733  <
2735  >
2737 
2738  /// This type alias.
2740 
2741  /// Initializes instance of given
2742  /// version over given memory block.
2744  void* data,
2745  EncodedLength length,
2746  SchemaVersion version)
2747  : Base(data, length, version)
2748  {
2749  assert(version >= Schema::MinimalVersion);
2750  assert(length >= blockLength(version));
2751  }
2752 
2753  /// Reset all variable-length fields if any.
2756  {
2757  return *this;
2758  }
2759 
2760  /// Reset all variable-length and optional fields if any.
2761  ThisType& reset()
2763  {
2764  minLotSizeNull();
2765 
2766  resetVariableFields();
2767  return *this;
2768  }
2769 
2770  /// This tag is required to interpret the value in tag
2771  /// 1231-MinLotSize.
2773  Int8 lotType() const
2775  {
2777 
2778  return ordinary<Int8>(offset);
2779  }
2780 
2781  /// This tag is required to interpret the value in tag
2782  /// 1231-MinLotSize.
2783  ThisType& setLotType(Int8 value)
2785  {
2787 
2788  setOrdinary(offset, value);
2789  return *this;
2790  }
2791 
2792  /// Minimum quantity accepted for order entry. If tag
2793  /// 1093-LotType=4, this value is the minimum quantity for
2794  /// order entry expressed in the applicable units, specified
2795  /// in tag 996-UnitOfMeasure, (e.g., megawatts). If tag
2796  /// 1093-LotType=5, this value represents order qty increment.
2798  bool minLotSize(DecimalQty& value) const
2800  {
2802 
2803  return decimal(value, offset, NullDecimalQty());
2804  }
2805 
2806  /// Minimum quantity accepted for order entry. If tag
2807  /// 1093-LotType=4, this value is the minimum quantity for
2808  /// order entry expressed in the applicable units, specified
2809  /// in tag 996-UnitOfMeasure, (e.g., megawatts). If tag
2810  /// 1093-LotType=5, this value represents order qty increment.
2811  ThisType& setMinLotSize(DecimalQty value)
2813  {
2815 
2816  setOrdinary(offset, value);
2817  return *this;
2818  }
2819 
2820  ThisType& minLotSizeNull()
2822  {
2824 
2825  setOrdinary(offset, NullDecimalQty());
2826  return *this;
2827  }
2828 
2829  /// \return size of entry body in bytes
2830  /// for given version of message template.
2833  static
2834  BlockLength
2836  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
2838  {
2839  return
2840  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
2841  5;
2842  }
2843 
2844  /// Entity class name.
2848  static const Char* className()
2849  {
2850  return "InstrumentDefinitionRepo58.LotTypeRulesEntry";
2851  }
2852  };
2853 
2854  /// Repeating group containing LotTypeRulesEntry entries.
2855  typedef
2858 
2859  /// Number of underlying entries.
2860  /// Entry of UnderlyingsEntry repeating group.
2863  <
2865  >
2866  {
2867  /// Base class type.
2868  typedef
2870  <
2872  >
2874 
2875  /// This type alias.
2877 
2878  /// Initializes instance of given
2879  /// version over given memory block.
2881  void* data,
2882  EncodedLength length,
2883  SchemaVersion version)
2884  : Base(data, length, version)
2885  {
2886  assert(version >= Schema::MinimalVersion);
2887  assert(length >= blockLength(version));
2888  }
2889 
2890  /// Reset all variable-length fields if any.
2893  {
2894  return *this;
2895  }
2896 
2897  /// Reset all variable-length and optional fields if any.
2898  ThisType& reset()
2900  {
2901  underlyingSecurityIdNull();
2902  underlyingSecurityAltIdSourceNull();
2903  underlyingMaxLifeTimeNull();
2904  underlyingMinDaysToMaturityNull();
2905  underlyingInstrumentGUIdNull();
2906  underlyingMaturityDateNull();
2907 
2908  resetVariableFields();
2909  return *this;
2910  }
2911 
2912  /// Underlying Instrument Symbol (Short Name). When the
2913  /// underlying is a Globex listed Fixed Income instrument this
2914  /// value will be the same as that contained in Security
2915  /// Definition Tag 55-Symbol of the underlying instrument.
2919  {
2922 
2923  return fixedStr<length>(offset);
2924  }
2925 
2926  /// Underlying Instrument Symbol (Short Name). When the
2927  /// underlying is a Globex listed Fixed Income instrument this
2928  /// value will be the same as that contained in Security
2929  /// Definition Tag 55-Symbol of the underlying instrument.
2930  ThisType& setUnderlyingSymbol(StrRef value)
2932  {
2935 
2936  setFixedStr<length>(offset, value);
2937  return *this;
2938  }
2939 
2940  /// Underlying Security ID as qualified by tag
2941  /// 305-UnderlyingSecurityIDSource. Provided only if the
2942  /// underlying is a Globex listed instrument, this value will
2943  /// be the same as that contained in Security Definition Tag
2944  /// 48-SecurityID.
2946  bool underlyingSecurityId(Int32& value) const
2948  {
2950 
2951  return ordinary(value, offset, NullInt32());
2952  }
2953 
2954  /// Underlying Security ID as qualified by tag
2955  /// 305-UnderlyingSecurityIDSource. Provided only if the
2956  /// underlying is a Globex listed instrument, this value will
2957  /// be the same as that contained in Security Definition Tag
2958  /// 48-SecurityID.
2961  {
2963 
2964  setOrdinary(offset, value);
2965  return *this;
2966  }
2967 
2970  {
2972 
2973  setOrdinary(offset, NullInt32());
2974  return *this;
2975  }
2976 
2977  /// Identifies the class or source of UnderlyingSecurityID Tag
2978  /// 309 value. Always '8' for CME assigned IDs.
2983  {
2984  return SecurityIDSource();
2985  }
2986 
2987  /// Underlying Alternate Security identifier value as
2988  /// qualified by Tag 305-UnderlyingSecuityAltIDSource (e.g.
2989  /// CUSIP, ISIN, etc). For Repo special will contain
2990  /// underlying CUSIP or ISIN. For GC Repo may contain a
2991  /// synthetic CUSIP or ISIN representing a basket.
2995  {
2998 
2999  return fixedStr<length>(offset);
3000  }
3001 
3002  /// Underlying Alternate Security identifier value as
3003  /// qualified by Tag 305-UnderlyingSecuityAltIDSource (e.g.
3004  /// CUSIP, ISIN, etc). For Repo special will contain
3005  /// underlying CUSIP or ISIN. For GC Repo may contain a
3006  /// synthetic CUSIP or ISIN representing a basket.
3009  {
3012 
3013  setFixedStr<length>(offset, value);
3014  return *this;
3015  }
3016 
3017  /// Identifies class or source of the UnderlyingSecurityAltID
3018  /// (458) value.
3020  bool
3022  SecurityAltIDSource::Enum& value) const
3024  {
3026 
3027  return enumeration<SecurityAltIDSource>(value, offset, NullUInt8());
3028  }
3029 
3030  /// Identifies class or source of the UnderlyingSecurityAltID
3031  /// (458) value.
3032  ThisType&
3036  {
3038 
3039  setEnumeration<SecurityAltIDSource>(offset, value);
3040  return *this;
3041  }
3042 
3045  {
3047 
3048  setOrdinary(offset, NullUInt8());
3049  return *this;
3050  }
3051 
3052  /// Long Name of the Underlying Instrument. For the
3053  /// instruments listed on Globex this value will be the same
3054  /// as of that contained in Security Definition Tag
3055  /// 2714-FinancialInstrumentFullName.
3059  {
3062 
3063  return fixedStr<length>(offset);
3064  }
3065 
3066  /// Long Name of the Underlying Instrument. For the
3067  /// instruments listed on Globex this value will be the same
3068  /// as of that contained in Security Definition Tag
3069  /// 2714-FinancialInstrumentFullName.
3072  {
3075 
3076  setFixedStr<length>(offset, value);
3077  return *this;
3078  }
3079 
3080  /// Underlying Security Type.
3084  {
3087 
3088  return fixedStr<length>(offset);
3089  }
3090 
3091  /// Underlying Security Type.
3094  {
3097 
3098  setFixedStr<length>(offset, value);
3099  return *this;
3100  }
3101 
3102  /// Underlying Security's CountryOfIssue. See CountryOfIssue
3103  /// (470) field for description.
3107  {
3110 
3111  return fixedStr<length>(offset);
3112  }
3113 
3114  /// Underlying Security's CountryOfIssue. See CountryOfIssue
3115  /// (470) field for description.
3118  {
3121 
3122  setFixedStr<length>(offset, value);
3123  return *this;
3124  }
3125 
3126  /// Underlying Security's Issuer. See Tag 106-Issuer field for
3127  /// description.
3131  {
3134 
3135  return fixedStr<length>(offset);
3136  }
3137 
3138  /// Underlying Security's Issuer. See Tag 106-Issuer field for
3139  /// description.
3140  ThisType& setUnderlyingIssuer(StrRef value)
3142  {
3145 
3146  setFixedStr<length>(offset, value);
3147  return *this;
3148  }
3149 
3150  /// Max life time of the underlying instruments qualifying for
3151  /// the GC basket in number of year. Will contain null value
3152  /// for Repo specials.
3154  bool underlyingMaxLifeTime(UInt8& value) const
3156  {
3158 
3159  return ordinary(value, offset, NullUInt8());
3160  }
3161 
3162  /// Max life time of the underlying instruments qualifying for
3163  /// the GC basket in number of year. Will contain null value
3164  /// for Repo specials.
3167  {
3169 
3170  setOrdinary(offset, value);
3171  return *this;
3172  }
3173 
3176  {
3178 
3179  setOrdinary(offset, NullUInt8());
3180  return *this;
3181  }
3182 
3183  /// Minimum days to maturity remaining of the underlying
3184  /// instruments to qualify for GC basket. Will contain null
3185  /// value for Repo specials.
3189  {
3191 
3192  return ordinary(value, offset, NullUInt16());
3193  }
3194 
3195  /// Minimum days to maturity remaining of the underlying
3196  /// instruments to qualify for GC basket. Will contain null
3197  /// value for Repo specials.
3200  {
3202 
3203  setOrdinary(offset, value);
3204  return *this;
3205  }
3206 
3209  {
3211 
3212  setOrdinary(offset, NullUInt16());
3213  return *this;
3214  }
3215 
3216  /// Underlying GUID. For Repo specials populated with
3217  /// individual instrument GUID of the underlying security.
3221  {
3223 
3224  return ordinary(value, offset, NullUInt64());
3225  }
3226 
3227  /// Underlying GUID. For Repo specials populated with
3228  /// individual instrument GUID of the underlying security.
3231  {
3233 
3234  setOrdinary(offset, value);
3235  return *this;
3236  }
3237 
3240  {
3242 
3243  setOrdinary(offset, NullUInt64());
3244  return *this;
3245  }
3246 
3247  /// Underlying Security's Maturity Date. Will be populated
3248  /// with Maturity Date of the underlying security instrument
3249  /// for Repo Specials only.
3253  {
3254  typedef LocalMktDate FieldValue;
3255 
3257 
3258  FieldValue fieldValue;
3259 
3260  if (ordinary(fieldValue, offset, NullLocalMktDate()))
3261  {
3262  value = localMktDateToTimestamp(fieldValue);
3263  return true;
3264  }
3265  return false;
3266  }
3267 
3268  /// Underlying Security's Maturity Date. Will be populated
3269  /// with Maturity Date of the underlying security instrument
3270  /// for Repo Specials only.
3273  {
3275 
3276  setOrdinary(offset, timestampToLocalMktDate(value));
3277  return *this;
3278  }
3279 
3282  {
3284 
3285  setOrdinary(offset, NullLocalMktDate());
3286  return *this;
3287  }
3288 
3289  /// \return size of entry body in bytes
3290  /// for given version of message template.
3293  static
3294  BlockLength
3296  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
3298  {
3299  return
3300  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
3301  118;
3302  }
3303 
3304  /// Entity class name.
3308  static const Char* className()
3309  {
3310  return "InstrumentDefinitionRepo58.UnderlyingsEntry";
3311  }
3312  };
3313 
3314  /// Repeating group containing UnderlyingsEntry entries.
3315  typedef
3318 
3319  /// Number of related instruments group.
3320  /// Entry of RelatedInstrumentsEntry repeating group.
3323  <
3325  >
3326  {
3327  /// Base class type.
3328  typedef
3330  <
3332  >
3334 
3335  /// This type alias.
3337 
3338  /// Initializes instance of given
3339  /// version over given memory block.
3341  void* data,
3342  EncodedLength length,
3343  SchemaVersion version)
3344  : Base(data, length, version)
3345  {
3346  assert(version >= Schema::MinimalVersion);
3347  assert(length >= blockLength(version));
3348  }
3349 
3350  /// Reset all variable-length fields if any.
3353  {
3354  return *this;
3355  }
3356 
3357  /// Reset all variable-length and optional fields if any.
3358  ThisType& reset()
3360  {
3361  relatedInstrumentGUIdNull();
3362 
3363  resetVariableFields();
3364  return *this;
3365  }
3366 
3367  /// Related Security ID. For regular Repo contract will
3368  /// contain SecurityID of AoN Repo for the same underlying
3369  /// product, term, start and end dates. And vice versa - for
3370  /// AoN Repo will contain the related regular Repo SecurityID.
3374  {
3376 
3377  return ordinary<Int32>(offset);
3378  }
3379 
3380  /// Related Security ID. For regular Repo contract will
3381  /// contain SecurityID of AoN Repo for the same underlying
3382  /// product, term, start and end dates. And vice versa - for
3383  /// AoN Repo will contain the related regular Repo SecurityID.
3384  ThisType& setRelatedSecurityId(Int32 value)
3386  {
3388 
3389  setOrdinary(offset, value);
3390  return *this;
3391  }
3392 
3393  /// Related Security ID Source.
3398  {
3399  return SecurityIDSource();
3400  }
3401 
3402  /// Related Instrument Symbol.
3406  {
3409 
3410  return fixedStr<length>(offset);
3411  }
3412 
3413  /// Related Instrument Symbol.
3414  ThisType& setRelatedSymbol(StrRef value)
3416  {
3419 
3420  setFixedStr<length>(offset, value);
3421  return *this;
3422  }
3423 
3424  /// Related Instrument GUID.
3426  bool relatedInstrumentGUId(UInt64& value) const
3428  {
3430 
3431  return ordinary(value, offset, NullUInt64());
3432  }
3433 
3434  /// Related Instrument GUID.
3437  {
3439 
3440  setOrdinary(offset, value);
3441  return *this;
3442  }
3443 
3446  {
3448 
3449  setOrdinary(offset, NullUInt64());
3450  return *this;
3451  }
3452 
3453  /// \return size of entry body in bytes
3454  /// for given version of message template.
3457  static
3458  BlockLength
3460  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
3462  {
3463  return
3464  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
3465  32;
3466  }
3467 
3468  /// Entity class name.
3472  static const Char* className()
3473  {
3474  return "InstrumentDefinitionRepo58.RelatedInstrumentsEntry";
3475  }
3476  };
3477 
3478  /// Repeating group containing RelatedInstrumentsEntry entries.
3479  typedef
3482 
3483  /// Initializes a blank instance.
3484  InstrumentDefinitionRepo58() ONIXS_CONFLATEDTCP_DEFAULT;
3485 
3486  /// Initializes an instance over the given memory block.
3488  void* data,
3489  EncodedLength length,
3490  SchemaVersion version = Schema::Version)
3491  : SbeMessage(data, length, version)
3492  {
3493  checkVersion<Schema>(version);
3494  checkLength(length, version);
3495  initHeader(TemplateId, blockLength(version), Schema::Id);
3496  reset();
3497  }
3498 
3499  /// Initializes an instance over the given memory block
3500  /// With no variable-length fields initialization
3501  /// It is assumed that the user does such an initialization manually.
3503  void* data,
3504  EncodedLength length,
3505  NoFieldsInit,
3506  SchemaVersion version = Schema::Version)
3507  : SbeMessage(data, length, version)
3508  {
3509  checkVersion<Schema>(version);
3510  checkLength(length, version);
3511  initHeader(TemplateId, blockLength(version), Schema::Id);
3512  resetVariableFields();
3513  }
3514 
3515  /// Initializes an instance over the given memory block.
3517  void* data,
3518  EncodedLength length,
3519  NoInit)
3520  : SbeMessage(data, length)
3521  {
3522  checkCompatibility();
3523  }
3524 
3525  /// Initializes an instance over the given SBE message.
3526  explicit
3528  const SbeMessage& message)
3529  : SbeMessage(message)
3530  {
3531  assert(message.valid());
3532 
3533  checkCompatibility();
3534  }
3535 
3536  /// Bitmap field of eight Boolean type indicators reflecting
3537  /// the end of updates for a given Globex event.
3541  {
3543 
3544  return ordinary<MatchEventIndicator>(offset);
3545  }
3546 
3547  /// Bitmap field of eight Boolean type indicators reflecting
3548  /// the end of updates for a given Globex event.
3549  ThisType&
3551  MatchEventIndicator value)
3553  {
3555 
3556  setOrdinary(offset, value);
3557  return *this;
3558  }
3559 
3560  /// Total number of instruments in the Replay loop. Used on
3561  /// Replay Feed only.
3563  bool totNumReports(UInt32& value) const
3565  {
3567 
3568  return ordinary(value, offset, NullUInt32());
3569  }
3570 
3571  /// Total number of instruments in the Replay loop. Used on
3572  /// Replay Feed only.
3573  ThisType& setTotNumReports(UInt32 value)
3575  {
3577 
3578  setOrdinary(offset, value);
3579  return *this;
3580  }
3581 
3582  ThisType& totNumReportsNull()
3584  {
3586 
3587  setOrdinary(offset, NullUInt32());
3588  return *this;
3589  }
3590 
3591  /// Last Security update action on Incremental feed, 'D' or
3592  /// 'M' is used when a mid-week deletion or modification (i.e.
3593  /// extension) occurs.
3598  {
3600 
3601  return enumeration<SecurityUpdateAction>(offset);
3602  }
3603 
3604  /// Last Security update action on Incremental feed, 'D' or
3605  /// 'M' is used when a mid-week deletion or modification (i.e.
3606  /// extension) occurs.
3607  ThisType&
3611  {
3613 
3614  setEnumeration<SecurityUpdateAction>(offset, value);
3615  return *this;
3616  }
3617 
3618  /// Timestamp of when the instrument was last added, modified
3619  /// or deleted. Sent in number of nanoseconds since Unix epoch.
3623  {
3625 
3626  return ordinary<Timestamp>(offset);
3627  }
3628 
3629  /// Timestamp of when the instrument was last added, modified
3630  /// or deleted. Sent in number of nanoseconds since Unix epoch.
3631  ThisType& setLastUpdateTime(Timestamp value)
3633  {
3635 
3636  setOrdinary(offset, value.sinceEpoch());
3637  return *this;
3638  }
3639 
3640  /// Identifies the current state of the instrument.
3642  bool
3644  SecurityTradingStatus::Enum& value) const
3646  {
3648 
3649  return enumeration<SecurityTradingStatus>(value, offset, NullUInt8());
3650  }
3651 
3652  /// Identifies the current state of the instrument.
3653  ThisType&
3657  {
3659 
3660  setEnumeration<SecurityTradingStatus>(offset, value);
3661  return *this;
3662  }
3663 
3666  {
3668 
3669  setOrdinary(offset, NullUInt8());
3670  return *this;
3671  }
3672 
3673  /// The channel ID as defined in the XML Configuration file.
3675  Int16 applId() const
3677  {
3679 
3680  return ordinary<Int16>(offset);
3681  }
3682 
3683  /// The channel ID as defined in the XML Configuration file.
3684  ThisType& setApplId(Int16 value)
3686  {
3688 
3689  setOrdinary(offset, value);
3690  return *this;
3691  }
3692 
3693  /// Identifies the market segment for all CME Globex
3694  /// instruments.
3698  {
3700 
3701  return ordinary<UInt8>(offset);
3702  }
3703 
3704  /// Identifies the market segment for all CME Globex
3705  /// instruments.
3706  ThisType& setMarketSegmentId(UInt8 value)
3708  {
3710 
3711  setOrdinary(offset, value);
3712  return *this;
3713  }
3714 
3715  /// Product complex.
3719  {
3721 
3722  return ordinary<UInt8>(offset);
3723  }
3724 
3725  /// Product complex.
3726  ThisType& setUnderlyingProduct(UInt8 value)
3728  {
3730 
3731  setOrdinary(offset, value);
3732  return *this;
3733  }
3734 
3735  /// Exchange used to identify a security.
3739  {
3742 
3743  return fixedStr<length>(offset);
3744  }
3745 
3746  /// Exchange used to identify a security.
3747  ThisType& setSecurityExchange(StrRef value)
3749  {
3752 
3753  setFixedStr<length>(offset, value);
3754  return *this;
3755  }
3756 
3757  /// Security Group Code.
3761  {
3764 
3765  return fixedStr<length>(offset);
3766  }
3767 
3768  /// Security Group Code.
3769  ThisType& setSecurityGroup(StrRef value)
3771  {
3774 
3775  setFixedStr<length>(offset, value);
3776  return *this;
3777  }
3778 
3779  /// The underlying asset code also known as Product Code.
3781  StrRef asset() const
3783  {
3786 
3787  return fixedStr<length>(offset);
3788  }
3789 
3790  /// The underlying asset code also known as Product Code.
3791  ThisType& setAsset(StrRef value)
3793  {
3796 
3797  setFixedStr<length>(offset, value);
3798  return *this;
3799  }
3800 
3801  /// Instrument Name or Symbol.
3803  StrRef symbol() const
3805  {
3808 
3809  return fixedStr<length>(offset);
3810  }
3811 
3812  /// Instrument Name or Symbol.
3813  ThisType& setSymbol(StrRef value)
3815  {
3818 
3819  setFixedStr<length>(offset, value);
3820  return *this;
3821  }
3822 
3823  /// Unique instrument ID.
3827  {
3829 
3830  return ordinary<Int32>(offset);
3831  }
3832 
3833  /// Unique instrument ID.
3834  ThisType& setSecurityId(Int32 value)
3836  {
3838 
3839  setOrdinary(offset, value);
3840  return *this;
3841  }
3842 
3843  /// Identifies class or source of the SecurityID (Tag 48)
3844  /// value.
3849  {
3850  return SecurityIDSource();
3851  }
3852 
3853  /// Security Type.
3857  {
3860 
3861  return fixedStr<length>(offset);
3862  }
3863 
3864  /// Security Type.
3865  ThisType& setSecurityType(StrRef value)
3867  {
3870 
3871  setFixedStr<length>(offset, value);
3872  return *this;
3873  }
3874 
3875  /// ISO standard instrument categorization code.
3877  StrRef cfiCode() const
3879  {
3882 
3883  return fixedStr<length>(offset);
3884  }
3885 
3886  /// ISO standard instrument categorization code.
3887  ThisType& setCfiCode(StrRef value)
3889  {
3892 
3893  setFixedStr<length>(offset, value);
3894  return *this;
3895  }
3896 
3897  /// Identifies the currency for the instrument traded.
3901  {
3904 
3905  return fixedStr<length>(offset);
3906  }
3907 
3908  /// Identifies the currency for the instrument traded.
3909  ThisType& setCurrency(StrRef value)
3911  {
3914 
3915  setFixedStr<length>(offset, value);
3916  return *this;
3917  }
3918 
3919  /// Identifies currency used for settlement.
3923  {
3926 
3927  return fixedStr<length>(offset);
3928  }
3929 
3930  /// Identifies currency used for settlement.
3931  ThisType& setSettlCurrency(StrRef value)
3933  {
3936 
3937  setFixedStr<length>(offset, value);
3938  return *this;
3939  }
3940 
3941  /// Matching Algorithm - CME assigned values.
3945  {
3947 
3948  return ordinary<CHAR>(offset);
3949  }
3950 
3951  /// Matching Algorithm - CME assigned values.
3952  ThisType& setMatchAlgorithm(CHAR value)
3954  {
3956 
3957  setOrdinary(offset, value);
3958  return *this;
3959  }
3960 
3961  /// The minimum trading volume for a security.
3965  {
3967 
3968  return ordinary<UInt32>(offset);
3969  }
3970 
3971  /// The minimum trading volume for a security.
3972  ThisType& setMinTradeVol(UInt32 value)
3974  {
3976 
3977  setOrdinary(offset, value);
3978  return *this;
3979  }
3980 
3981  /// The maximum trading volume for a security.
3985  {
3987 
3988  return ordinary<UInt32>(offset);
3989  }
3990 
3991  /// The maximum trading volume for a security.
3992  ThisType& setMaxTradeVol(UInt32 value)
3994  {
3996 
3997  setOrdinary(offset, value);
3998  return *this;
3999  }
4000 
4001  /// Minimum constant tick for the instrument.
4005  {
4007 
4008  return decimal<PRICE9>(offset);
4009  }
4010 
4011  /// Minimum constant tick for the instrument.
4012  ThisType& setMinPriceIncrement(PRICE9 value)
4014  {
4016 
4017  setOrdinary(offset, value);
4018  return *this;
4019  }
4020 
4021  /// Contains the multiplier to convert the CME Globex display
4022  /// price to the conventional price.
4026  {
4028 
4029  return decimal<Decimal9>(offset);
4030  }
4031 
4032  /// Contains the multiplier to convert the CME Globex display
4033  /// price to the conventional price.
4034  ThisType& setDisplayFactor(Decimal9 value)
4036  {
4038 
4039  setOrdinary(offset, value);
4040  return *this;
4041  }
4042 
4043  /// Unit of measure for the products' original contract size.
4044  /// This will be populated for all products listed on CME
4045  /// Globex.
4049  {
4052 
4053  return fixedStr<length>(offset);
4054  }
4055 
4056  /// Unit of measure for the products' original contract size.
4057  /// This will be populated for all products listed on CME
4058  /// Globex.
4059  ThisType& setUnitOfMeasure(StrRef value)
4061  {
4064 
4065  setFixedStr<length>(offset, value);
4066  return *this;
4067  }
4068 
4069  /// This field contains the contract size for each instrument.
4070  /// Use in combination with tag 996-UnitofMeasure.
4072  bool unitOfMeasureQty(Decimal9& value) const
4074  {
4076 
4077  return decimal(value, offset, NullDecimal9());
4078  }
4079 
4080  /// This field contains the contract size for each instrument.
4081  /// Use in combination with tag 996-UnitofMeasure.
4084  {
4086 
4087  setOrdinary(offset, value);
4088  return *this;
4089  }
4090 
4093  {
4095 
4096  setOrdinary(offset, NullDecimal9());
4097  return *this;
4098  }
4099 
4100  /// Trading Reference price.
4102  bool tradingReferencePrice(PRICE9& value) const
4104  {
4106 
4107  return decimal(value, offset, NullPRICE9());
4108  }
4109 
4110  /// Trading Reference price.
4113  {
4115 
4116  setOrdinary(offset, value);
4117  return *this;
4118  }
4119 
4122  {
4124 
4125  setOrdinary(offset, NullPRICE9());
4126  return *this;
4127  }
4128 
4129  /// Indicates session date corresponding to the price in tag
4130  /// 1150-TradingReferencePrice.
4132  bool tradingReferenceDate(Timestamp& value) const
4134  {
4135  typedef LocalMktDate FieldValue;
4136 
4138 
4139  FieldValue fieldValue;
4140 
4141  if (ordinary(fieldValue, offset, NullLocalMktDate()))
4142  {
4143  value = localMktDateToTimestamp(fieldValue);
4144  return true;
4145  }
4146  return false;
4147  }
4148 
4149  /// Indicates session date corresponding to the price in tag
4150  /// 1150-TradingReferencePrice.
4153  {
4155 
4156  setOrdinary(offset, timestampToLocalMktDate(value));
4157  return *this;
4158  }
4159 
4162  {
4164 
4165  setOrdinary(offset, NullLocalMktDate());
4166  return *this;
4167  }
4168 
4169  /// Allowable high limit price for the trading day.
4171  bool highLimitPrice(PRICE9& value) const
4173  {
4175 
4176  return decimal(value, offset, NullPRICE9());
4177  }
4178 
4179  /// Allowable high limit price for the trading day.
4180  ThisType& setHighLimitPrice(PRICE9 value)
4182  {
4184 
4185  setOrdinary(offset, value);
4186  return *this;
4187  }
4188 
4191  {
4193 
4194  setOrdinary(offset, NullPRICE9());
4195  return *this;
4196  }
4197 
4198  /// Allowable low limit price for the trading day.
4200  bool lowLimitPrice(PRICE9& value) const
4202  {
4204 
4205  return decimal(value, offset, NullPRICE9());
4206  }
4207 
4208  /// Allowable low limit price for the trading day.
4209  ThisType& setLowLimitPrice(PRICE9 value)
4211  {
4213 
4214  setOrdinary(offset, value);
4215  return *this;
4216  }
4217 
4218  ThisType& lowLimitPriceNull()
4220  {
4222 
4223  setOrdinary(offset, NullPRICE9());
4224  return *this;
4225  }
4226 
4227  /// Differential value for price banding.
4229  bool maxPriceVariation(PRICE9& value) const
4231  {
4233 
4234  return decimal(value, offset, NullPRICE9());
4235  }
4236 
4237  /// Differential value for price banding.
4238  ThisType& setMaxPriceVariation(PRICE9 value)
4240  {
4242 
4243  setOrdinary(offset, value);
4244  return *this;
4245  }
4246 
4249  {
4251 
4252  setOrdinary(offset, NullPRICE9());
4253  return *this;
4254  }
4255 
4256  /// Long name of the instrument.
4260  {
4263 
4264  return fixedStr<length>(offset);
4265  }
4266 
4267  /// Long name of the instrument.
4270  {
4273 
4274  setFixedStr<length>(offset, value);
4275  return *this;
4276  }
4277 
4278  /// Clearing organization.
4282  {
4285 
4286  return fixedStr<length>(offset);
4287  }
4288 
4289  /// Clearing organization.
4292  {
4295 
4296  setFixedStr<length>(offset, value);
4297  return *this;
4298  }
4299 
4300  /// Start date of a financing deal, i.e. the date the buyer
4301  /// pays the seller cash and takes control of the collateral.
4303  bool startDate(Timestamp& value) const
4305  {
4306  typedef LocalMktDate FieldValue;
4307 
4309 
4310  FieldValue fieldValue;
4311 
4312  if (ordinary(fieldValue, offset, NullLocalMktDate()))
4313  {
4314  value = localMktDateToTimestamp(fieldValue);
4315  return true;
4316  }
4317  return false;
4318  }
4319 
4320  /// Start date of a financing deal, i.e. the date the buyer
4321  /// pays the seller cash and takes control of the collateral.
4322  ThisType& setStartDate(Timestamp value)
4324  {
4326 
4327  setOrdinary(offset, timestampToLocalMktDate(value));
4328  return *this;
4329  }
4330 
4331  ThisType& startDateNull()
4333  {
4335 
4336  setOrdinary(offset, NullLocalMktDate());
4337  return *this;
4338  }
4339 
4340  /// End date of a financing deal, i.e. the date the seller
4341  /// reimburses the buyer and takes back control of the
4342  /// collateral.
4344  bool endDate(Timestamp& value) const
4346  {
4347  typedef LocalMktDate FieldValue;
4348 
4350 
4351  FieldValue fieldValue;
4352 
4353  if (ordinary(fieldValue, offset, NullLocalMktDate()))
4354  {
4355  value = localMktDateToTimestamp(fieldValue);
4356  return true;
4357  }
4358  return false;
4359  }
4360 
4361  /// End date of a financing deal, i.e. the date the seller
4362  /// reimburses the buyer and takes back control of the
4363  /// collateral.
4364  ThisType& setEndDate(Timestamp value)
4366  {
4368 
4369  setOrdinary(offset, timestampToLocalMktDate(value));
4370  return *this;
4371  }
4372 
4373  ThisType& endDateNull()
4375  {
4377 
4378  setOrdinary(offset, NullLocalMktDate());
4379  return *this;
4380  }
4381 
4382  /// For Repos the timing or method for terminating the
4383  /// agreement. Term code.
4387  {
4390 
4391  return fixedStr<length>(offset);
4392  }
4393 
4394  /// For Repos the timing or method for terminating the
4395  /// agreement. Term code.
4396  ThisType& setTerminationType(StrRef value)
4398  {
4401 
4402  setFixedStr<length>(offset, value);
4403  return *this;
4404  }
4405 
4406  /// Repo Sub Security Type.
4410  {
4412 
4413  return enumeration<RepoSubType>(offset);
4414  }
4415 
4416  /// Repo Sub Security Type.
4419  {
4421 
4422  setEnumeration<RepoSubType>(offset, value);
4423  return *this;
4424  }
4425 
4426  /// Money or Par indicates if the GC is filled by par amount
4427  /// or by money amount.
4429  bool moneyOrPar(MoneyOrPar::Enum& value) const
4431  {
4433 
4434  return enumeration<MoneyOrPar>(value, offset, NullUInt8());
4435  }
4436 
4437  /// Money or Par indicates if the GC is filled by par amount
4438  /// or by money amount.
4441  {
4443 
4444  setEnumeration<MoneyOrPar>(offset, value);
4445  return *this;
4446  }
4447 
4448  ThisType& moneyOrParNull()
4450  {
4452 
4453  setOrdinary(offset, NullUInt8());
4454  return *this;
4455  }
4456 
4457  /// Max number of substitutions allowed. The value of 0
4458  /// indicates that substitutions are not allowed.
4462  {
4464 
4465  return ordinary<UInt8>(offset);
4466  }
4467 
4468  /// Max number of substitutions allowed. The value of 0
4469  /// indicates that substitutions are not allowed.
4472  {
4474 
4475  setOrdinary(offset, value);
4476  return *this;
4477  }
4478 
4479  /// Price quotation method.
4483  {
4486 
4487  return fixedStr<length>(offset);
4488  }
4489 
4490  /// Price quotation method.
4491  ThisType& setPriceQuoteMethod(StrRef value)
4493  {
4496 
4497  setFixedStr<length>(offset, value);
4498  return *this;
4499  }
4500 
4501  /// User-defined instrument flag.
4505  {
4507 
4508  return ordinary<UserDefinedInstrument>(offset);
4509  }
4510 
4511  /// User-defined instrument flag.
4512  ThisType&
4514  UserDefinedInstrument value)
4516  {
4518 
4519  setOrdinary(offset, value);
4520  return *this;
4521  }
4522 
4523  /// Risk Set identifies the list of instruments sharing credit
4524  /// limits set up.
4526  StrRef riskSet() const
4528  {
4531 
4532  return fixedStr<length>(offset);
4533  }
4534 
4535  /// Risk Set identifies the list of instruments sharing credit
4536  /// limits set up.
4537  ThisType& setRiskSet(StrRef value)
4539  {
4542 
4543  setFixedStr<length>(offset, value);
4544  return *this;
4545  }
4546 
4547  /// MarketSet defines the bilateral relationship and Self
4548  /// Match Prevention configuration for eligible markets.
4552  {
4555 
4556  return fixedStr<length>(offset);
4557  }
4558 
4559  /// MarketSet defines the bilateral relationship and Self
4560  /// Match Prevention configuration for eligible markets.
4561  ThisType& setMarketSet(StrRef value)
4563  {
4566 
4567  setFixedStr<length>(offset, value);
4568  return *this;
4569  }
4570 
4571  /// External unique instrument ID.
4573  bool instrumentGUId(UInt64& value) const
4575  {
4577 
4578  return ordinary(value, offset, NullUInt64());
4579  }
4580 
4581  /// External unique instrument ID.
4582  ThisType& setInstrumentGUId(UInt64 value)
4584  {
4586 
4587  setOrdinary(offset, value);
4588  return *this;
4589  }
4590 
4593  {
4595 
4596  setOrdinary(offset, NullUInt64());
4597  return *this;
4598  }
4599 
4600  /// Full Repo Term Code.
4604  {
4607 
4608  return fixedStr<length>(offset);
4609  }
4610 
4611  /// Full Repo Term Code.
4612  ThisType& setTermCode(StrRef value)
4614  {
4617 
4618  setFixedStr<length>(offset, value);
4619  return *this;
4620  }
4621 
4622  /// \return instance of Events repeating group.
4624  Events events() const
4626  {
4627  return getGroup<Events>(EventsAccess(), *this);
4628  }
4629 
4630  /// \return instance of Events repeating group.
4634  {
4635  return getGroup<Events>(EventsAccess(), *this);
4636  }
4637 
4638  /// Setup repeating group with the given number of entries.
4639  /// Sets all optional fields of the group entries to null.
4640  /// \return NoEvents(864) repeating group.
4642  {
4643  return constructGroup<Events>(
4644  EventsAccess(),
4645  length,
4646  *this);
4647  }
4648 
4649  /// Setup repeating group with the given number of entries.
4650  /// \return NoEvents(864) repeating group.
4651  Events
4653  Events::Size length,
4654  NoFieldsInit)
4655  {
4656  return setupGroup<Events>(
4657  EventsAccess(),
4658  length,
4659  *this);
4660  }
4661 
4662  /// \return instance of FeedTypes repeating group.
4666  {
4667  return getGroup<FeedTypes>(FeedTypesAccess(), *this);
4668  }
4669 
4670  /// \return instance of FeedTypes repeating group.
4674  {
4675  return getGroup<FeedTypes>(FeedTypesAccess(), *this);
4676  }
4677 
4678  /// Setup repeating group with the given number of entries.
4679  /// Sets all optional fields of the group entries to null.
4680  /// \return NoMDFeedTypes(1141) repeating group.
4682  {
4683  return constructGroup<FeedTypes>(
4684  FeedTypesAccess(),
4685  length,
4686  *this);
4687  }
4688 
4689  /// Setup repeating group with the given number of entries.
4690  /// \return NoMDFeedTypes(1141) repeating group.
4691  FeedTypes
4693  FeedTypes::Size length,
4694  NoFieldsInit)
4695  {
4696  return setupGroup<FeedTypes>(
4697  FeedTypesAccess(),
4698  length,
4699  *this);
4700  }
4701 
4702  /// \return instance of InstAttrib repeating group.
4706  {
4707  return getGroup<InstAttrib>(
4708  InstAttribAccess(),
4709  *this);
4710  }
4711 
4712  /// \return instance of InstAttrib repeating group.
4716  {
4717  return getGroup<InstAttrib>(
4718  InstAttribAccess(),
4719  *this);
4720  }
4721 
4722  /// Setup repeating group with the given number of entries.
4723  /// Sets all optional fields of the group entries to null.
4724  /// \return NoInstAttrib(870) repeating group.
4726  {
4727  return constructGroup<InstAttrib>(
4728  InstAttribAccess(),
4729  length,
4730  *this);
4731  }
4732 
4733  /// Setup repeating group with the given number of entries.
4734  /// \return NoInstAttrib(870) repeating group.
4735  InstAttrib
4737  InstAttrib::Size length,
4738  NoFieldsInit)
4739  {
4740  return setupGroup<InstAttrib>(
4741  InstAttribAccess(),
4742  length,
4743  *this);
4744  }
4745 
4746  /// \return instance of LotTypeRules repeating group.
4750  {
4751  return getGroup<LotTypeRules>(
4752  LotTypeRulesAccess(),
4753  *this);
4754  }
4755 
4756  /// \return instance of LotTypeRules repeating group.
4760  {
4761  return getGroup<LotTypeRules>(
4762  LotTypeRulesAccess(),
4763  *this);
4764  }
4765 
4766  /// Setup repeating group with the given number of entries.
4767  /// Sets all optional fields of the group entries to null.
4768  /// \return NoLotTypeRules(1234) repeating group.
4769  LotTypeRules
4771  LotTypeRules::Size length)
4772  {
4773  return constructGroup<LotTypeRules>(
4774  LotTypeRulesAccess(),
4775  length,
4776  *this);
4777  }
4778 
4779  /// Setup repeating group with the given number of entries.
4780  /// \return NoLotTypeRules(1234) repeating group.
4781  LotTypeRules
4783  LotTypeRules::Size length,
4784  NoFieldsInit)
4785  {
4786  return setupGroup<LotTypeRules>(
4787  LotTypeRulesAccess(),
4788  length,
4789  *this);
4790  }
4791 
4792  /// \return instance of Underlyings repeating group.
4796  {
4797  return getGroup<Underlyings>(
4798  UnderlyingsAccess(),
4799  *this);
4800  }
4801 
4802  /// \return instance of Underlyings repeating group.
4806  {
4807  return getGroup<Underlyings>(
4808  UnderlyingsAccess(),
4809  *this);
4810  }
4811 
4812  /// Setup repeating group with the given number of entries.
4813  /// Sets all optional fields of the group entries to null.
4814  /// \return NoUnderlyings(711) repeating group.
4816  {
4817  return constructGroup<Underlyings>(
4818  UnderlyingsAccess(),
4819  length,
4820  *this);
4821  }
4822 
4823  /// Setup repeating group with the given number of entries.
4824  /// \return NoUnderlyings(711) repeating group.
4825  Underlyings
4827  Underlyings::Size length,
4828  NoFieldsInit)
4829  {
4830  return setupGroup<Underlyings>(
4831  UnderlyingsAccess(),
4832  length,
4833  *this);
4834  }
4835 
4836  /// \return instance of RelatedInstruments repeating group.
4840  {
4841  return getGroup<RelatedInstruments>(
4842  RelatedInstrumentsAccess(),
4843  *this);
4844  }
4845 
4846  /// \return instance of RelatedInstruments repeating group.
4850  {
4851  return getGroup<RelatedInstruments>(
4852  RelatedInstrumentsAccess(),
4853  *this);
4854  }
4855 
4856  /// Setup repeating group with the given number of entries.
4857  /// Sets all optional fields of the group entries to null.
4858  /// \return NoRelatedInstruments(1647) repeating group.
4861  RelatedInstruments::Size length)
4862  {
4863  return constructGroup<RelatedInstruments>(
4864  RelatedInstrumentsAccess(),
4865  length,
4866  *this);
4867  }
4868 
4869  /// Setup repeating group with the given number of entries.
4870  /// \return NoRelatedInstruments(1647) repeating group.
4873  RelatedInstruments::Size length,
4874  NoFieldsInit)
4875  {
4876  return setupGroup<RelatedInstruments>(
4877  RelatedInstrumentsAccess(),
4878  length,
4879  *this);
4880  }
4881 
4882  /// Size of message body in bytes.
4885  static
4886  BlockLength
4888  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
4890  {
4891  return
4892  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
4893  275;
4894  }
4895 
4896  /// Minimal variable fields size (when variable-length fields are empty).
4900  static
4901  MessageSize
4903  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
4904  {
4905  return
4906  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
4907  Events::EmptySize + FeedTypes::EmptySize + InstAttrib::EmptySize + LotTypeRules::EmptySize + Underlyings::EmptySize + RelatedInstruments::EmptySize;
4908  }
4909 
4910  /// Reset all variable-length fields if any.
4913  {
4914  eventsNull();
4915  feedTypesNull();
4916  instAttribNull();
4917  lotTypeRulesNull();
4918  underlyingsNull();
4919  relatedInstrumentsNull();
4920  return *this;
4921  }
4922 
4923  /// Reset all variable-length and optional fields if any.
4924  ThisType& reset()
4926  {
4927  totNumReportsNull();
4928  securityTradingStatusNull();
4929  unitOfMeasureQtyNull();
4930  tradingReferencePriceNull();
4931  tradingReferenceDateNull();
4932  highLimitPriceNull();
4933  lowLimitPriceNull();
4934  maxPriceVariationNull();
4935  startDateNull();
4936  endDateNull();
4937  moneyOrParNull();
4938  instrumentGUIdNull();
4939 
4940  resetVariableFields();
4941  return *this;
4942  }
4943 
4944  /// \return class name.
4948  static const Char* className()
4949  {
4950  return "InstrumentDefinitionRepo58";
4951  }
4952 
4953  /// FIX message type.
4957  static StrRef fixType()
4959  {
4960  return constructStrRef("d");
4961  }
4962 
4963  /// \return the end of the message.
4965  const void* tail() const
4967  {
4968  return
4969  relatedInstruments().tail();
4970  }
4971 
4972  /// \return the size occupied by the message.
4976  {
4977  return
4978  SbeMessage::calculateBinarySize(tail());
4979  }
4980 
4981 private:
4982  void checkLength(
4983  EncodedLength length, SchemaVersion version) const
4984  {
4985  const EncodedLength minimalRequiredLength =
4986  blockLength(version) +
4987  MessageHeader::Size +
4988  getMinimalVariableFieldsSize(version);
4989 
4990  checkBinaryLength(
4991  *this, length, minimalRequiredLength);
4992  }
4993 
4994  /// Checks variable fields consistency.
4995  void checkVarLenFields() const
4996  {
4997  groups().
4998  checkTail<Events>().
4999  checkTail<FeedTypes>().
5000  checkTail<InstAttrib>().
5001  checkTail<LotTypeRules>().
5002  checkTail<Underlyings>().
5003  checkTail<RelatedInstruments>();
5004  }
5005 
5006  void checkCompatibility() const
5007  {
5008  assert(TemplateId == templateId());
5009 
5010  checkSchema<Schema>(schemaId(), version());
5011  checkLength(bufferSize(), version());
5012  checkVarLenFields();
5013  }
5014 
5015  /// Access helper.
5016  struct EventsAccess
5017  {
5018  Events
5019  operator()(
5020  const InstrumentDefinitionRepo58& obj) const
5022  {
5023  return obj.
5024  groups().
5025  head<Events>();
5026  }
5027  };
5028 
5029  /// Reset an instance of the repeating group.
5030  /// All the following data will be invalidated.
5031  void eventsNull()
5033  {
5034  resetGroup<Events>(EventsAccess(), *this);
5035  }
5036 
5037  /// Access helper.
5038  struct FeedTypesAccess
5039  {
5040  FeedTypes
5041  operator()(
5042  const InstrumentDefinitionRepo58& obj) const
5044  {
5045  return obj.
5046  groups().
5047  tail<Events>().
5048  head<FeedTypes>();
5049  }
5050  };
5051 
5052  /// Reset an instance of the repeating group.
5053  /// All the following data will be invalidated.
5054  void feedTypesNull()
5056  {
5057  resetGroup<FeedTypes>(FeedTypesAccess(), *this);
5058  }
5059 
5060  /// Access helper.
5061  struct InstAttribAccess
5062  {
5063  InstAttrib
5064  operator()(
5065  const InstrumentDefinitionRepo58& obj) const
5067  {
5068  return obj.
5069  groups().
5070  tail<Events>().
5071  tail<FeedTypes>().
5072  head<InstAttrib>();
5073  }
5074  };
5075 
5076  /// Reset an instance of the repeating group.
5077  /// All the following data will be invalidated.
5078  void instAttribNull()
5080  {
5081  resetGroup<InstAttrib>(
5082  InstAttribAccess(),
5083  *this);
5084  }
5085 
5086  /// Access helper.
5087  struct LotTypeRulesAccess
5088  {
5089  LotTypeRules
5090  operator()(
5091  const InstrumentDefinitionRepo58& obj) const
5093  {
5094  return obj.
5095  groups().
5096  tail<Events>().
5097  tail<FeedTypes>().
5098  tail<InstAttrib>().
5099  head<LotTypeRules>();
5100  }
5101  };
5102 
5103  /// Reset an instance of the repeating group.
5104  /// All the following data will be invalidated.
5105  void lotTypeRulesNull()
5107  {
5108  resetGroup<LotTypeRules>(
5109  LotTypeRulesAccess(),
5110  *this);
5111  }
5112 
5113  /// Access helper.
5114  struct UnderlyingsAccess
5115  {
5116  Underlyings
5117  operator()(
5118  const InstrumentDefinitionRepo58& obj) const
5120  {
5121  return obj.
5122  groups().
5123  tail<Events>().
5124  tail<FeedTypes>().
5125  tail<InstAttrib>().
5126  tail<LotTypeRules>().
5127  head<Underlyings>();
5128  }
5129  };
5130 
5131  /// Reset an instance of the repeating group.
5132  /// All the following data will be invalidated.
5133  void underlyingsNull()
5135  {
5136  resetGroup<Underlyings>(
5137  UnderlyingsAccess(),
5138  *this);
5139  }
5140 
5141  /// Access helper.
5142  struct RelatedInstrumentsAccess
5143  {
5145  operator()(
5146  const InstrumentDefinitionRepo58& obj) const
5148  {
5149  return obj.
5150  groups().
5151  tail<Events>().
5152  tail<FeedTypes>().
5153  tail<InstAttrib>().
5154  tail<LotTypeRules>().
5155  tail<Underlyings>().
5156  head<RelatedInstruments>();
5157  }
5158  };
5159 
5160  /// Reset an instance of the repeating group.
5161  /// All the following data will be invalidated.
5162  void relatedInstrumentsNull()
5164  {
5165  resetGroup<RelatedInstruments>(
5166  RelatedInstrumentsAccess(),
5167  *this);
5168  }
5169 };
5170 
5171 /// SnapshotRefreshTopOrders.
5174 : SbeMessage
5175 {
5176  /// Used template schema.
5178 
5179  /// This type alias.
5181 
5182  /// Message template ID from SBE schema.
5183  enum { TemplateId = 59 };
5184 
5185  /// Number of data blocks following.
5186  /// Entry of Entry repeating group.
5189  <
5191  >
5192  {
5193  /// Base class type.
5194  typedef
5196  <
5198  >
5200 
5201  /// This type alias.
5202  typedef Entry ThisType;
5203 
5204  /// Initializes instance of given
5205  /// version over given memory block.
5207  void* data,
5208  EncodedLength length,
5209  SchemaVersion version)
5210  : Base(data, length, version)
5211  {
5212  assert(version >= Schema::MinimalVersion);
5213  assert(length >= blockLength(version));
5214  }
5215 
5216  /// Reset all variable-length fields if any.
5219  {
5220  return *this;
5221  }
5222 
5223  /// Reset all variable-length and optional fields if any.
5224  ThisType& reset()
5226  {
5227  resetVariableFields();
5228  return *this;
5229  }
5230 
5231  /// Order ID.
5233  UInt64 orderId() const
5235  {
5237 
5238  return ordinary<UInt64>(offset);
5239  }
5240 
5241  /// Order ID.
5242  ThisType& setOrderId(UInt64 value)
5244  {
5246 
5247  setOrdinary(offset, value);
5248  return *this;
5249  }
5250 
5251  /// Order priority for execution on the order book.
5255  {
5257 
5258  return ordinary<UInt64>(offset);
5259  }
5260 
5261  /// Order priority for execution on the order book.
5262  ThisType& setOrderPriority(UInt64 value)
5264  {
5266 
5267  setOrdinary(offset, value);
5268  return *this;
5269  }
5270 
5271  /// Order price.
5273  PRICE9 entryPx() const
5275  {
5277 
5278  return decimal<PRICE9>(offset);
5279  }
5280 
5281  /// Order price.
5282  ThisType& setEntryPx(PRICE9 value)
5284  {
5286 
5287  setOrdinary(offset, value);
5288  return *this;
5289  }
5290 
5291  /// Visible qty of order.
5295  {
5297 
5298  return ordinary<Int32>(offset);
5299  }
5300 
5301  /// Visible qty of order.
5302  ThisType& setDisplayQty(Int32 value)
5304  {
5306 
5307  setOrdinary(offset, value);
5308  return *this;
5309  }
5310 
5311  /// Market Data entry type.
5315  {
5317 
5318  return enumeration<EntryTypeBook>(offset);
5319  }
5320 
5321  /// Market Data entry type.
5322  ThisType&
5324  EntryTypeBook::Enum value)
5326  {
5328 
5329  setEnumeration<EntryTypeBook>(offset, value);
5330  return *this;
5331  }
5332 
5333  /// \return size of entry body in bytes
5334  /// for given version of message template.
5337  static
5338  BlockLength
5340  ONIXS_CONFLATEDTCP_UNUSED SchemaVersion version)
5342  {
5343  return
5344  ONIXS_CONFLATEDTCP_ASSERT(version >= Schema::MinimalVersion),
5345  29;
5346  }
5347 
5348  /// Entity class name.
5352  static const Char* className()
5353  {
5354  return "SnapshotRefreshTopOrders59.Entry";
5355  }
5356  };
5357 
5358  /// Repeating group containing Entry entries.
5359  typedef
5362 
5363  /// Initializes a blank instance.
5364  SnapshotRefreshTopOrders59() ONIXS_CONFLATEDTCP_DEFAULT;
5365 
5366  /// Initializes an instance over the given memory block.
5368