OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
BinaryMessage.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
27
30
33
35
41template
42<
43 class Container,
44 class BlockLength
45>
47{
50 const
51 Container&
52 container() const
53 {
54 return
55 *static_cast
56 <const Container*>
57 (this);
58 }
59
60protected:
63 {
64 }
65
68 {
69 }
70
72 template
73 <
74 class Value
75 >
76 Value
78 BlockLength offset) const
79 {
80 const
81 size_t
82 sizeOfValue =
83 sizeof(Value);
84
85 assert
86 (
87 (offset + sizeOfValue) <=
88 container().blockLength()
89 );
90
91 const void*
92 const location =
94 container().block(),
95 offset);
96
97 Value result;
98
99 memcpy(
100 &result,
101 location,
102 sizeOfValue);
103
104 return result;
105 }
106
113 template
114 <
115 class Value,
116 class NullValue
117 >
118 bool
120 Value& value,
121 BlockLength offset,
122 const NullValue& null) const
123 {
124 const Value optional =
125 ordinary<Value>(offset);
126
127 if (null != optional)
128 {
129 value = optional;
130
131 return true;
132 }
133
134 return false;
135 }
136
149 template
150 <
151 class Value,
152 class NullValue
153 >
154 bool
156 Value& value,
157 BlockLength offset,
158 const NullValue& null,
159 SchemaVersion since) const
160 {
161 return
162 (
163 since <=
164 container().version()
165 &&
167 (
168 value,
169 offset,
170 null
171 )
172 );
173 }
174
179 template
180 <
181 class Enumeration
182 >
183 typename
184 Enumeration::Enum
186 BlockLength offset) const
187 {
188 typedef
189 typename
190 Enumeration::Base
191 Base;
192
193 typedef
194 typename
195 Enumeration::Enum
196 Enum;
197
198 return
199 static_cast<Enum>(
200 ordinary<Base>(offset));
201 }
202
208 template
209 <
210 class Enumeration,
211 class NullValue
212 >
213 bool
215 typename
216 Enumeration::Enum& value,
217 BlockLength offset,
218 const NullValue& null) const
219 {
220 typedef
221 typename
222 Enumeration::Base
223 Base;
224
225 typedef
226 typename
227 Enumeration::Enum
228 Enum;
229
230 const Base optional =
231 ordinary<Base>(offset);
232
233 if (null != optional)
234 {
235 value =
236 static_cast
237 <Enum>
238 (optional);
239
240 return true;
241 }
242
243 return false;
244 }
245
251 template
252 <
253 class Enumeration,
254 class NullValue
255 >
256 bool
258 typename
259 Enumeration::Enum& value,
260 BlockLength offset,
261 const NullValue& null,
262 SchemaVersion since) const
263 {
264 return
265 (
266 since <=
267 container().version()
268 &&
270 <
271 Enumeration,
272 NullValue
273 >(
274 value,
275 offset,
276 null
277 )
278 );
279 }
280
283 template
284 <
285 class Value
286 >
287 Decimal
289 BlockLength offset) const
290 {
291 return Decimal
292 (
293 ordinary<Value>(offset)
294 );
295 }
296
304 template
305 <
306 class NullValue
307 >
308 bool
310 Decimal& value,
311 BlockLength offset,
312 const NullValue& null) const
313 {
314 typedef
315 typename
316 NullValue::Value
317 Value;
318
319 const Value optional =
320 ordinary<Value>(offset);
321
322 if (null != optional)
323 {
324 value = optional;
325
326 return true;
327 }
328
329 return false;
330 }
331
345 template
346 <
347 class NullValue
348 >
349 bool
351 Decimal& value,
352 BlockLength offset,
353 const NullValue& null,
354 SchemaVersion since) const
355 {
356 return
357 (
358 since <=
359 container().version()
360 &&
361 decimal
362 (
363 value,
364 offset,
365 null
366 )
367 );
368 }
369
374 template
375 <
376 BlockLength Length
377 >
378 StrRef
380 BlockLength offset) const
381 {
382 assert
383 (
384 (offset + Length) <=
385 container().blockLength()
386 );
387
388 const Char*
389 const text =
390 reinterpret_cast
391 <const Char*>
392 (
394 (
395 container().block(),
396 offset
397 )
398 );
399
400 return
401 StrRef
402 (
403 text,
404 strnlen
405 (
406 text,
407 Length
408 )
409 );
410 }
411
417 template
418 <
419 BlockLength Length
420 >
421 StrRef
423 BlockLength offset,
424 SchemaVersion since) const
425 {
426 return (
427 since <=
428 container().version()
429 ? fixedStr<Length>(offset)
430 : StrRef()
431 );
432 }
433};
434
436ONIXS_CONFLATEDUDP_EXPORTED
437void
439 const Char* className);
440
443template
444<
445 class Length
446>
447class
449: public BinaryBlock
450<
451 BinaryGroupEntry
452 <
453 Length
454 >,
455 Length
456>
457{
458 const void* encoded_;
459 Length length_;
460
461 SchemaVersion version_;
462
463public:
466 typedef Length EncodedLength;
467
470 typedef Length BlockLength;
471
474 : encoded_(NULL)
475 , length_(0)
476 , version_(0)
477 {
478 }
479
483 const void* encoded,
484 BlockLength length,
486 : encoded_(encoded)
487 , length_(length)
488 , version_(version)
489 {
490 assert(NULL != encoded);
491
492 assert(
493 version >=
495 minimalVersion());
496 }
497
500 const BinaryGroupEntry& other)
501 : encoded_(other.encoded_)
502 , length_(other.length_)
503 , version_(other.version_)
504 {
505 }
506
508 operator bool() const
509 {
510 return (NULL != encoded_);
511 }
512
515 const void* encoded() const
516 {
517 return encoded_;
518 }
519
523 {
524 return length_;
525 }
526
529 const void* block() const
530 {
531 return encoded_;
532 }
533
537 {
538 return length_;
539 }
540
544 {
545 return version_;
546 }
547
550 operator =(
551 const BinaryGroupEntry& other)
552 {
553 encoded_ = other.encoded_;
554 length_ = other.length_;
555
556 version_ = other.version_;
557
558 return *this;
559 }
560};
561
563template
564<
565 class EntryType,
566 class BlockLength,
567 class NumInGroup,
568 class Length
569>
571{
572 // Allows coping and cloning
573 // for different instantiations.
574 template
575 <
576 class OtherEntry,
577 class OtherBlockLength,
578 class OtherNumInGroup,
579 class OtherLength
580 >
581 friend class BinaryGroupEntries;
582
583 // Actual parameters.
584
585 const void* encoded_;
586
587 BlockLength blockLength_;
588 NumInGroup size_;
589
590 SchemaVersion version_;
591
592public:
595 typedef Length EncodedLength;
596
599
601 typedef NumInGroup Size;
602
606 {
607 const void* encoded_;
608 BlockLength length_;
609
610 SchemaVersion version_;
611
612 public:
614 typedef const Entry value_type;
615
617 typedef const Entry* pointer;
618
620 typedef const Entry& reference;
621
623 typedef ptrdiff_t difference_type;
624
626 typedef
627 std::random_access_iterator_tag
629
632 : encoded_(NULL)
633 , length_(0)
634 , version_(0)
635 {
636 }
637
640 const void* block,
641 BlockLength length,
642 SchemaVersion version)
643 : encoded_(block)
644 , length_(length)
645 , version_(version)
646 {
647 }
648
651 const Iterator& other)
652 : encoded_(other.encoded_)
653 , length_(other.length_)
654 , version_(other.version_)
655 {
656 }
657
659 const Entry get() const
660 {
661 assert(NULL != encoded_);
662
663 return
664 Entry(
665 encoded_,
666 length_,
667 version_);
668 }
669
671 const Entry operator *() const
672 {
673 return get();
674 }
675
677 bool
678 operator ==(
679 const Iterator& other) const
680 {
681 return encoded_ == other.encoded_;
682 }
683
685 bool
686 operator !=(
687 const Iterator& other) const
688 {
689 return encoded_ != other.encoded_;
690 }
691
693 bool
694 operator <(
695 const Iterator& other) const
696 {
697 return encoded_ < other.encoded_;
698 }
699
701 bool
702 operator >(
703 const Iterator& other) const
704 {
705 return encoded_ > other.encoded_;
706 }
707
709 Iterator&
710 operator ++()
711 {
712 encoded_ =
714 encoded_, length_);
715
716 return *this;
717 }
718
720 Iterator&
721 operator --()
722 {
723 encoded_ =
725 encoded_,
726 length_);
727
728 return *this;
729 }
730
732 Iterator
733 operator +(
734 difference_type distance) const
735 {
736 return
738 (
740 (
741 encoded_,
742 distance *
743 static_cast
745 (length_)
746 ),
747 length_,
748 version_
749 );
750 }
751
753 Iterator
754 operator -(
755 difference_type distance) const
756 {
757 return
759 (
761 (
762 encoded_,
763 distance
764 *
765 static_cast
767 (length_)
768 ),
769 length_,
770 version_
771 );
772 }
773
775 Iterator&
776 operator =(
777 const Iterator& other)
778 {
779 encoded_ = other.encoded_;
780 length_ = other.length_;
781 version_ = other.version_;
782
783 return *this;
784 }
785 };
786
789 : encoded_(NULL)
790 , blockLength_(0)
791 , size_(0)
792 , version_(0)
793 {
794 }
795
798 const void* encoded,
799 BlockLength blockLength,
800 Size groupSize,
801 SchemaVersion version)
802 : encoded_(encoded)
803 , blockLength_(blockLength)
804 , size_(groupSize)
805 , version_(version)
806 {
807 }
808
810 template
811 <
812 class OtherEntry,
813 class OtherBlockLength,
814 class OtherNumInGroup,
815 class OtherLength
816 >
818 const
820 <
821 OtherEntry,
822 OtherBlockLength,
823 OtherNumInGroup,
824 OtherLength
825 >& other)
826 : encoded_(
827 other.encoded_)
828 , blockLength_(
829 other.blockLength_)
830 , size_(
831 other.size_)
832 , version_(
833 other.version_)
834 {
835 // Dimension types may vary for the different
836 // instantiations of the template. Therefore,
837 // truncation of the dimensions must be avoided.
838
839 assert(
840 blockLength_ ==
841 other.blockLength_);
842
843 assert(
844 size_ ==
845 other.size_);
846 }
847
850 operator bool() const
851 {
852 return (NULL != encoded_);
853 }
854
857 bool empty() const
858 {
859 return (0 == size_);
860 }
861
863 Size size() const
864 {
865 return size_;
866 }
867
869 Iterator begin() const
870 {
871 return
872 Iterator(
873 encoded_,
874 blockLength_,
875 version_);
876 }
877
879 Iterator end() const
880 {
881 return
882 Iterator
883 (
885 (
886 encoded_,
887 static_cast
888 <ptrdiff_t>
889 (blockLength_) *
890 static_cast
891 <ptrdiff_t>
892 (size_)
893 ),
894 blockLength_,
895 version_
896 );
897 }
898
904 const Entry operator [](Size index) const
905 {
906 assert(index < size_);
907
908 return
909 Entry
910 (
912 (
913 encoded_,
914 static_cast
915 <ptrdiff_t>
916 (blockLength_) *
917 static_cast
918 <ptrdiff_t>
919 (index)
920 ),
921 blockLength_,
922 version_
923 );
924 }
925
927 const void* encoded() const
928 {
929 return encoded_;
930 }
931
935 {
936 return (
937 static_cast
939 (blockLength_)
940 *
941 static_cast
943 (size_)
944 );
945 }
946
949 template
950 <
951 class OtherEntry,
952 class OtherBlockLength,
953 class OtherNumInGroup,
954 class OtherLength
955 >
957 operator =(
958 const
960 <
961 OtherEntry,
962 OtherBlockLength,
963 OtherNumInGroup,
964 OtherLength
965 >& other)
966 {
967 encoded_ = other.encoded_;
968
969 blockLength_ =
970 other.blockLength_;
971
972 assert(
973 blockLength_ ==
974 other.blockLength_);
975
976 size_ = other.size_;
977
978 assert(
979 size_ ==
980 other.size_);
981
982 version_ =
983 other.version_;
984
985 return *this;
986 }
987};
988
990ONIXS_CONFLATEDUDP_EXPORTED
991void
993
995template
996<
997 class EntryType,
998 class DimensionType,
999 class LengthType
1000>
1002{
1003public:
1006 typedef DimensionType Dimension;
1007
1009 typedef
1011 <
1012 EntryType,
1013 typename
1014 Dimension::BlockLength,
1015 typename
1016 Dimension::NumInGroup,
1017 LengthType
1018 >
1020
1022 typedef typename Entries::Iterator Iterator;
1023
1025 typedef typename Entries::Entry Entry;
1026
1028 typedef typename Entries::Size Size;
1029
1031 typedef LengthType EncodedLength;
1032
1035 : header_(NULL)
1036 {
1037 }
1038
1042 const void* encoded,
1043 EncodedLength length,
1044 SchemaVersion version)
1045 : header_(
1046 static_cast
1047 <const Dimension*>
1048 (encoded))
1049 {
1050 if (length <
1052 {
1054 }
1055 else
1056 {
1057 entries_ =
1058 Entries
1059 (
1061 (
1062 header_,
1064 ),
1065 header_->blockLength(),
1066 header_->numInGroup(),
1067 version
1068 );
1069
1070 if (length <
1071 encodedLength())
1072 {
1074 }
1075 }
1076 }
1077
1080 const BinaryGroup& other)
1081 : header_(other.header_)
1082 , entries_(other.entries_)
1083 {
1084 }
1085
1088 operator bool() const
1089 {
1090 return (NULL != header_);
1091 }
1092
1095 bool empty() const
1096 {
1097 return (0 == size());
1098 }
1099
1102 Size size() const
1103 {
1104 return entries_.size();
1105 }
1106
1110 {
1111 return entries_.begin();
1112 }
1113
1117 {
1118 return entries_.end();
1119 }
1120
1126 Entry operator [](Size index) const
1127 {
1128 return entries_[index];
1129 }
1130
1132 const Entries& entries() const
1133 {
1134 return entries_;
1135 }
1136
1139 const void* encoded() const
1140 {
1141 return header_;
1142 }
1143
1147 {
1148 return (
1150 entries_.encodedLength()
1151 );
1152 }
1153
1156 operator =(
1157 const BinaryGroup& other)
1158 {
1159 header_ = other.header_;
1160 entries_ = other.entries_;
1161
1162 return *this;
1163 }
1164
1165private:
1166 const Dimension* header_;
1167 Entries entries_;
1168};
1169
1172template
1173<
1174 class Length
1175>
1177{
1178 const void* encoded_;
1179
1180 Length length_;
1181
1182 SchemaVersion version_;
1183
1184public:
1187 typedef Length EncodedLength;
1188
1191 : encoded_(NULL)
1192 , length_(0)
1193 , version_(0)
1194 {
1195 }
1196
1200 const void* encoded,
1201 EncodedLength length,
1202 SchemaVersion version)
1203 : encoded_(encoded)
1204 , length_(length)
1205 , version_(version)
1206 {
1207 }
1208
1211 const BinaryGroups& other)
1212 : encoded_(other.encoded_)
1213 , length_(other.length_)
1214 , version_(other.version_)
1215 {
1216 }
1217
1219 bool empty() const
1220 {
1221 return (0 == length_);
1222 }
1223
1225 template
1226 <
1227 class Group
1228 >
1229 Group head() const
1230 {
1231 return
1232 Group(
1233 encoded_,
1234 length_,
1235 version_);
1236 }
1237
1239 template
1240 <
1241 class Group
1242 >
1244 {
1245 const
1247 headLength =
1248 head<Group>().
1249 encodedLength();
1250
1251 assert(
1252 length_ >=
1253 headLength);
1254
1255 return
1258 encoded_, headLength),
1259 length_ - headLength,
1260 version_);
1261 }
1262
1264 const void* encoded() const
1265 {
1266 return encoded_;
1267 }
1268
1272 {
1273 return length_;
1274 }
1275
1278 operator =(
1279 const BinaryGroups& other)
1280 {
1281 encoded_ = other.encoded_;
1282 length_ = other.length_;
1283
1284 version_ = other.version_;
1285
1286 return *this;
1287 }
1288};
1289
1291inline
1292void
1294{
1295 throw std::runtime_error(
1296 "Cannot construct message instance. Memory "
1297 "block is too small to access SBE message header. ");
1298}
1299
1301ONIXS_CONFLATEDUDP_EXPORTED
1302void
1304(
1305 const Char*,
1308);
1309
1311ONIXS_CONFLATEDUDP_EXPORTED
1312void
1314 SchemaVersion messageVersion);
1315
1317typedef
1320
1323
1327: public BinaryBlock
1328<
1331>
1332{
1333 typedef
1335 <
1338 >
1339 Base;
1340
1341 const MessageHeader* header_;
1342 MessageSize length_;
1343
1344public:
1347
1351
1353 typedef
1356
1359 : header_(NULL)
1360 , length_(0)
1361 {
1362 }
1363
1366 const void* encoded,
1367 EncodedLength length)
1368 : header_(
1369 static_cast
1370 <const MessageHeader*>
1371 (encoded))
1372 , length_(length)
1373 {
1374 assert(NULL != encoded);
1375
1376 if (length <
1378 ||
1379 length <
1381 header_->blockLength()))
1382 {
1384 }
1385 else
1386 {
1387 const
1389 version =
1390 this->version();
1391
1392 if (version <
1393 SchemaTraits::
1394 minimalVersion())
1395 {
1397 }
1398 }
1399 }
1400
1403 const BinaryMessage& other)
1404 : header_(
1405 other.header_)
1406 , length_(
1407 other.length_)
1408 {
1409 }
1410
1412 operator bool() const
1413 {
1414 return (NULL != header_);
1415 }
1416
1419 {
1420 assert(NULL != header_);
1421
1422 return header_->templateId();
1423 }
1424
1427 {
1428 assert(NULL != header_);
1429
1430 return header_->version();
1431 }
1432
1434 const void* encoded() const
1435 {
1436 return header_;
1437 }
1438
1441 {
1442 return length_;
1443 }
1444
1446 const void* block() const
1447 {
1448 assert(NULL != header_);
1449
1450 return
1452 header_,
1454 }
1455
1459 {
1460 assert(NULL != header_);
1461
1462 return header_->blockLength();
1463 }
1464
1468 {
1469 assert(NULL != header_);
1470
1471 return
1472 Groups
1473 (
1475 (
1476 block(),
1477 blockLength()
1478 ),
1479 length_ -
1481 header_->blockLength(),
1482 header_->version()
1483 );
1484 }
1485
1488 operator =(
1489 const BinaryMessage& other)
1490 {
1491 header_ = other.header_;
1492 length_ = other.length_;
1493
1494 return *this;
1495 }
1496
1497protected:
1499
1501 const void* encoded,
1502 EncodedLength length,
1504 : header_(
1505 static_cast
1506 <const MessageHeader*>
1507 (encoded))
1508 , length_(length)
1509 {
1510 assert(NULL != encoded);
1511
1512 if (length <
1514 ||
1515 length <
1517 header_->blockLength()))
1518 {
1520 }
1521 }
1522};
1523
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Definition Bootstrap.h:95
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
BinaryBlock()
Initializes the blank instance.
StrRef fixedStr(BlockLength offset, SchemaVersion since) const
StrRef fixedStr(BlockLength offset) const
Enumeration::Enum enumeration(BlockLength offset) const
bool decimal(Decimal &value, BlockLength offset, const NullValue &null) const
~BinaryBlock()
Ends life of the instance.
bool ordinary(Value &value, BlockLength offset, const NullValue &null) const
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, const NullValue &null, SchemaVersion since) const
Value ordinary(BlockLength offset) const
Returns value of a field by its offset.
bool ordinary(Value &value, BlockLength offset, const NullValue &null, SchemaVersion since) const
Decimal decimal(BlockLength offset) const
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, const NullValue &null) const
bool decimal(Decimal &value, BlockLength offset, const NullValue &null, SchemaVersion since) const
const Entry * pointer
Aliases pointer to entry for STL conformance.
Iterator()
Initializes instance referring to nothing.
Iterator(const Iterator &other)
Initializes instance as copy of the other one.
const Entry & reference
Aliases entry reference for STL conformance.
const Entry value_type
Aliases entry for STL conformance.
std::random_access_iterator_tag iterator_category
Identifies iterator category.
const Entry get() const
Repeating group entry referenced by the instance.
ptrdiff_t difference_type
Iterator difference type.
Iterator(const void *block, BlockLength length, SchemaVersion version)
Initializes instance for given repeating group.
Encapsulates operations over SBE-encoded repeating group entries.
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
BinaryGroupEntries(const void *encoded, BlockLength blockLength, Size groupSize, SchemaVersion version)
Initializes the instance referencing to a real data.
BinaryGroupEntries()
Initializes blank instance referencing to nothing.
Iterator end() const
Returns iterator pointing to the entry behind the end of the group.
Size size() const
Returns number of blocks.
BinaryGroupEntries(const BinaryGroupEntries< OtherEntry, OtherBlockLength, OtherNumInGroup, OtherLength > &other)
Initializes instance as a copy of the other one.
BinaryGroupEntry()
Initializes instance referring to nothing.
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
BinaryGroupEntry(const void *encoded, BlockLength length, SchemaVersion version)
Encapsulates operations over SBE-encoded repeating group.
Entries::Size Size
Type representing a number of entries in the group.
const Entries & entries() const
Location of repeating group entries.
Entries::Iterator Iterator
Defines type of iterator for group entries.
Entries::Entry Entry
Aliases type of the group entry.
BinaryGroup(const void *encoded, EncodedLength length, SchemaVersion version)
BinaryGroup(const BinaryGroup &other)
Initializes instance as a copy of the other one.
BinaryGroup()
Initializes blank instance referencing to nothing.
BinaryGroupEntries< EntryType, typename Dimension::BlockLength, typename Dimension::NumInGroup, LengthType > Entries
Binary group blocks.
LengthType EncodedLength
Measures binary length of the group.
BinaryGroups(const void *encoded, EncodedLength length, SchemaVersion version)
Group head() const
Provides access to the head group of the list.
bool empty() const
Indicates whether group list is empty.
BinaryGroups()
Initializes empty list.
BinaryGroups(const BinaryGroups &other)
Initializes as copy of other list.
BinaryGroups tail() const
Returns the groups following the head.
Encapsulates services for manipulating SBE-encoded messages.
BinaryMessage()
Initializes the instance referencing to nothing.
SchemaVersion version() const
Version of message being referenced.
BinaryGroups< MessageSize > Groups
Repeating groups.
BinaryMessage(const void *encoded, EncodedLength length)
Initializes instance over the given encoded data.
BinaryMessage(const void *encoded, EncodedLength length, NoVersionCheck)
MessageSize EncodedLength
Length of message binary data.
const void * block() const
Indicates beginning of message body.
EncodedLength encodedLength() const
Size of SBE-encoded message.
MessageTemplateId templateId() const
Template identifier of message being referenced.
const void * encoded() const
SBE-encoded message content.
BinaryMessage(const BinaryMessage &other)
Initializes instance as copy of the other one.
A real number with floating exponent.
Definition Decimal.h:232
Template ID and length of message root.
Definition Composites.h:426
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
Definition Memory.h:109
Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance)
Definition Memory.h:128
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
char Char
Character type alias.
Definition String.h:36
UInt16 MessageSize
Aliases message length type.
ONIXS_CONFLATEDUDP_EXPORTED void throwBadBinaryGroup()
Throws exception on bad repeating group.
UInt16 UInt16
uInt16.
Definition Fields.h:257
ONIXS_CONFLATEDUDP_EXPORTED void throwBadMessageVersion(const Char *, SchemaVersion, SchemaVersion)
Raises exception on bad message version.
void throwBadBinaryMessage()
Raises exception on bad binary message.
ONIXS_CONFLATEDUDP_EXPORTED void throwBadBinaryData(const Char *className)
Throws exception on bad repeating group entry.
MessageHeader::TemplateId MessageTemplateId
Aliases message type (template) identification.
Attributes of SBE message schema.