OnixS C++ CME MDP Premium Market Data Handler 5.9.0
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 <class Container, class BlockLength>
43{
44protected:
47
50
52 template <class Value>
53 Value ordinary(BlockLength offset) const
54 {
55 const size_t sizeOfValue = sizeof(Value);
56
57 assert((offset + sizeOfValue) <= container().blockLength());
58
59 const void* const location = advanceByBytes(container().block(), offset);
60
61 Value result;
62
63 memcpy(&result, location, sizeOfValue);
64
65 return result;
66 }
67
74 template <class Value, class NullValue>
75 bool ordinary(Value& value, BlockLength offset, const NullValue& null) const
76 {
77 const Value optional = ordinary<Value>(offset);
78
79 if (null != optional)
80 {
81 value = optional;
82
83 return true;
84 }
85
86 return false;
87 }
88
101 template <class Value, class NullValue>
102 bool ordinary(Value& value, BlockLength offset, const NullValue& null, SchemaVersion since) const
103 {
104 return (since <= container().version() && ordinary(value, offset, null));
105 }
106
111 template <class Enumeration>
112 typename Enumeration::Enum enumeration(BlockLength offset) const
113 {
114 typedef typename Enumeration::Base Base;
115
116 typedef typename Enumeration::Enum Enum;
117
118 return static_cast<Enum>(ordinary<Base>(offset));
119 }
120
126 template <class Enumeration, class NullValue>
127 bool enumeration(typename Enumeration::Enum& value, BlockLength offset, const NullValue& null) const
128 {
129 typedef typename Enumeration::Base Base;
130
131 typedef typename Enumeration::Enum Enum;
132
133 const Base optional = ordinary<Base>(offset);
134
135 if (null != optional)
136 {
137 value = static_cast<Enum>(optional);
138
139 return true;
140 }
141
142 return false;
143 }
144
150 template <class Enumeration, class NullValue>
151 bool
152 enumeration(typename Enumeration::Enum& value, BlockLength offset, const NullValue& null, SchemaVersion since) const
153 {
154 return (since <= container().version() && enumeration<Enumeration, NullValue>(value, offset, null));
155 }
156
159 template <class Value>
160 Decimal decimal(BlockLength offset) const
161 {
162 return Decimal(ordinary<Value>(offset));
163 }
164
172 template <class NullValue>
173 bool decimal(Decimal& value, BlockLength offset, const NullValue& null) const
174 {
175 typedef typename NullValue::Value Value;
176
177 const Value optional = ordinary<Value>(offset);
178
179 if (null != optional)
180 {
181 value = optional;
182
183 return true;
184 }
185
186 return false;
187 }
188
202 template <class NullValue>
203 bool decimal(Decimal& value, BlockLength offset, const NullValue& null, SchemaVersion since) const
204 {
205 return (since <= container().version() && decimal(value, offset, null));
206 }
207
212 template <BlockLength Length>
213 StrRef fixedStr(BlockLength offset) const
214 {
215 assert((offset + Length) <= container().blockLength());
216
217 const Char* const text = reinterpret_cast<const Char*>(advanceByBytes(container().block(), offset));
218
219 return StrRef(text, strnlen(text, Length));
220 }
221
227 template <BlockLength Length>
228 StrRef fixedStr(BlockLength offset, SchemaVersion since) const
229 {
230 return (since <= container().version() ? fixedStr<Length>(offset) : StrRef());
231 }
232
233private:
236 const Container& container() const
237 {
238 return *static_cast<const Container*>(this);
239 }
240
241};
242
245void throwBadBinaryData(const Char* className);
246
249template <class Length>
250class BinaryGroupEntry : public BinaryBlock<BinaryGroupEntry<Length>, Length>
251{
252public:
255 typedef Length EncodedLength;
256
259 typedef Length BlockLength;
260
263 : encoded_(ONIXS_CMEMDH_NULLPTR)
264 , length_(0)
265 , version_(0)
266 {
267 }
268
272 : encoded_(encoded)
273 , length_(length)
274 , version_(version)
275 {
276 assert(ONIXS_CMEMDH_NULLPTR != encoded);
277
279 }
280
283 : encoded_(other.encoded_)
284 , length_(other.length_)
285 , version_(other.version_)
286 {
287 }
288
290 operator bool() const
291 {
292 return (ONIXS_CMEMDH_NULLPTR != encoded_);
293 }
294
297 const void* encoded() const
298 {
299 return encoded_;
300 }
301
305 {
306 return length_;
307 }
308
311 const void* block() const
312 {
313 return encoded_;
314 }
315
319 {
320 return length_;
321 }
322
326 {
327 return version_;
328 }
329
332 {
333 encoded_ = other.encoded_;
334 length_ = other.length_;
335
336 version_ = other.version_;
337
338 return *this;
339 }
340
341private:
342 const void* encoded_;
343 Length length_;
344
345 SchemaVersion version_;
346};
347
349template <class EntryType, class BlockLength, class NumInGroup, class Length>
351{
352public:
355 typedef Length EncodedLength;
356
359
361 typedef NumInGroup Size;
362
366 {
367 public:
369 typedef const Entry value_type;
370
372 typedef const Entry* pointer;
373
375 typedef const Entry& reference;
376
378 typedef ptrdiff_t difference_type;
379
381 typedef std::random_access_iterator_tag iterator_category;
382
385 : encoded_(ONIXS_CMEMDH_NULLPTR)
386 , length_(0)
387 , version_(0)
388 {
389 }
390
392 Iterator(const void* block, BlockLength length, SchemaVersion version)
393 : encoded_(block)
394 , length_(length)
395 , version_(version)
396 {
397 }
398
400 Iterator(const Iterator& other)
401 : encoded_(other.encoded_)
402 , length_(other.length_)
403 , version_(other.version_)
404 {
405 }
406
408 const Entry get() const
409 {
410 assert(ONIXS_CMEMDH_NULLPTR != encoded_);
411
412 return Entry(encoded_, length_, version_);
413 }
414
416 const Entry operator*() const
417 {
418 return get();
419 }
420
422 bool operator==(const Iterator& other) const
423 {
424 return encoded_ == other.encoded_;
425 }
426
428 bool operator!=(const Iterator& other) const
429 {
430 return encoded_ != other.encoded_;
431 }
432
434 bool operator<(const Iterator& other) const
435 {
436 return encoded_ < other.encoded_;
437 }
438
440 bool operator>(const Iterator& other) const
441 {
442 return encoded_ > other.encoded_;
443 }
444
447 {
448 encoded_ = advanceByBytes(encoded_, length_);
449
450 return *this;
451 }
452
455 {
456 encoded_ = advanceBackByBytes(encoded_, length_);
457
458 return *this;
459 }
460
463 {
464 return Iterator(
465 advanceByBytes(encoded_, distance * static_cast<difference_type>(length_)), length_, version_
466 );
467 }
468
471 {
472 return Iterator(
473 advanceBackByBytes(encoded_, distance * static_cast<difference_type>(length_)), length_, version_
474 );
475 }
476
479 {
480 encoded_ = other.encoded_;
481 length_ = other.length_;
482 version_ = other.version_;
483
484 return *this;
485 }
486
487 private:
488 const void* encoded_;
489 BlockLength length_;
490
491 SchemaVersion version_;
492 };
493
496 : encoded_(ONIXS_CMEMDH_NULLPTR)
497 , blockLength_(0)
498 , size_(0)
499 , version_(0)
500 {
501 }
502
504 BinaryGroupEntries(const void* encoded, BlockLength blockLength, Size groupSize, SchemaVersion version)
505 : encoded_(encoded)
506 , blockLength_(blockLength)
507 , size_(groupSize)
508 , version_(version)
509 {
510 }
511
513 template <class OtherEntry, class OtherBlockLength, class OtherNumInGroup, class OtherLength>
515 : encoded_(other.encoded_)
516 , blockLength_(other.blockLength_)
517 , size_(other.size_)
518 , version_(other.version_)
519 {
520 // Dimension types may vary for the different
521 // instantiations of the template. Therefore,
522 // truncation of the dimensions must be avoided.
523
524 assert(blockLength_ == other.blockLength_);
525
526 assert(size_ == other.size_);
527 }
528
531 operator bool() const
532 {
533 return (ONIXS_CMEMDH_NULLPTR != encoded_);
534 }
535
538 bool empty() const
539 {
540 return (0 == size_);
541 }
542
544 Size size() const
545 {
546 return size_;
547 }
548
550 Iterator begin() const
551 {
552 return Iterator(encoded_, blockLength_, version_);
553 }
554
556 Iterator end() const
557 {
558 return Iterator(
559 advanceByBytes(encoded_, static_cast<ptrdiff_t>(blockLength_) * static_cast<ptrdiff_t>(size_)),
560 blockLength_,
561 version_
562 );
563 }
564
570 const Entry operator[](Size index) const
571 {
572 assert(index < size_);
573
574 return Entry(
575 advanceByBytes(encoded_, static_cast<ptrdiff_t>(blockLength_) * static_cast<ptrdiff_t>(index)),
576 blockLength_,
577 version_
578 );
579 }
580
582 const void* encoded() const
583 {
584 return encoded_;
585 }
586
590 {
591 return (static_cast<EncodedLength>(blockLength_) * static_cast<EncodedLength>(size_));
592 }
593
596 template <class OtherEntry, class OtherBlockLength, class OtherNumInGroup, class OtherLength>
599 {
600 encoded_ = other.encoded_;
601
602 blockLength_ = other.blockLength_;
603
604 assert(blockLength_ == other.blockLength_);
605
606 size_ = other.size_;
607
608 assert(size_ == other.size_);
609
610 version_ = other.version_;
611
612 return *this;
613 }
614
615private:
616 // Allows coping and cloning
617 // for different instantiations.
618 template <class OtherEntry, class OtherBlockLength, class OtherNumInGroup, class OtherLength>
619 friend class BinaryGroupEntries;
620
621 // Actual parameters.
622
623 const void* encoded_;
624
625 BlockLength blockLength_;
626 NumInGroup size_;
627
628 SchemaVersion version_;
629};
630
634
636template <class EntryType, class DimensionType, class LengthType>
638{
639public:
642 typedef DimensionType Dimension;
643
647
649 typedef typename Entries::Iterator Iterator;
650
652 typedef typename Entries::Entry Entry;
653
655 typedef typename Entries::Size Size;
656
658 typedef LengthType EncodedLength;
659
662 : header_(ONIXS_CMEMDH_NULLPTR)
663 {
664 }
665
668 BinaryGroup(const void* encoded, EncodedLength length, SchemaVersion version)
669 : header_(static_cast<const Dimension*>(encoded))
670 {
671 if (length < Dimension::Size)
672 {
674 }
675 else
676 {
677 entries_ = Entries(
678 advanceByBytes(header_, Dimension::Size), header_->blockLength(), header_->numInGroup(), version
679 );
680
681 if (length < encodedLength())
682 {
684 }
685 }
686 }
687
690 : header_(other.header_)
691 , entries_(other.entries_)
692 {
693 }
694
697 operator bool() const
698 {
699 return (ONIXS_CMEMDH_NULLPTR != header_);
700 }
701
704 bool empty() const
705 {
706 return (0 == size());
707 }
708
711 Size size() const
712 {
713 return entries_.size();
714 }
715
719 {
720 return entries_.begin();
721 }
722
725 Iterator end() const
726 {
727 return entries_.end();
728 }
729
735 Entry operator[](Size index) const
736 {
737 return entries_[index];
738 }
739
741 const Entries& entries() const
742 {
743 return entries_;
744 }
745
748 const void* encoded() const
749 {
750 return header_;
751 }
752
756 {
757 return (Dimension::Size + entries_.encodedLength());
758 }
759
762 {
763 header_ = other.header_;
764 entries_ = other.entries_;
765
766 return *this;
767 }
768
769private:
770 const Dimension* header_;
771 Entries entries_;
772};
773
776template <class Length>
778{
779public:
782 typedef Length EncodedLength;
783
786 : encoded_(ONIXS_CMEMDH_NULLPTR)
787 , length_(0)
788 , version_(0)
789 {
790 }
791
794 BinaryGroups(const void* encoded, EncodedLength length, SchemaVersion version)
795 : encoded_(encoded)
796 , length_(length)
797 , version_(version)
798 {
799 }
800
803 : encoded_(other.encoded_)
804 , length_(other.length_)
805 , version_(other.version_)
806 {
807 }
808
810 bool empty() const
811 {
812 return (0 == length_);
813 }
814
816 template <class Group>
817 Group head() const
818 {
819 return Group(encoded_, length_, version_);
820 }
821
823 template <class Group>
825 {
826 const EncodedLength headLength = head<Group>().encodedLength();
827
828 assert(length_ >= headLength);
829
830 return BinaryGroups(advanceByBytes(encoded_, headLength), length_ - headLength, version_);
831 }
832
834 const void* encoded() const
835 {
836 return encoded_;
837 }
838
842 {
843 return length_;
844 }
845
848 {
849 encoded_ = other.encoded_;
850 length_ = other.length_;
851
852 version_ = other.version_;
853
854 return *this;
855 }
856
857private:
858 const void* encoded_;
859
860 Length length_;
861
862 SchemaVersion version_;
863};
864
867{
868 throw std::runtime_error("Cannot construct message instance. Memory "
869 "block is too small to access SBE message header. ");
870}
871
875
878
881
883class ONIXS_CMEMDH_LTWT BinaryMessage : public BinaryBlock<BinaryMessage, MessageSize>
884{
885public:
888
892
895
898 : header_(ONIXS_CMEMDH_NULLPTR)
899 , length_(0)
900 {
901 }
902
905 : header_(static_cast<const MessageHeader*>(encoded))
906 , length_(length)
907 {
908 assert(ONIXS_CMEMDH_NULLPTR != encoded);
909
910 if (length < MessageHeader::Size || length < (MessageHeader::Size + header_->blockLength()))
911 {
913 }
914 }
915
918 : header_(other.header_)
919 , length_(other.length_)
920 {
921 }
922
924 operator bool() const
925 {
926 return (ONIXS_CMEMDH_NULLPTR != header_);
927 }
928
931 {
932 assert(ONIXS_CMEMDH_NULLPTR != header_);
933
934 return header_->templateId();
935 }
936
939 {
940 assert(ONIXS_CMEMDH_NULLPTR != header_);
941
942 return header_->version();
943 }
944
946 const void* encoded() const
947 {
948 return header_;
949 }
950
953 {
954 return length_;
955 }
956
958 const void* block() const
959 {
960 assert(ONIXS_CMEMDH_NULLPTR != header_);
961
962 return advanceByBytes(header_, MessageHeader::Size);
963 }
964
968 {
969 assert(ONIXS_CMEMDH_NULLPTR != header_);
970
971 return header_->blockLength();
972 }
973
977 {
978 assert(ONIXS_CMEMDH_NULLPTR != header_);
979
980 return Groups(
982 length_ - MessageHeader::Size - header_->blockLength(),
983 header_->version()
984 );
985 }
986
989 {
990 header_ = other.header_;
991 length_ = other.length_;
992
993 return *this;
994 }
995
996protected:
999 : header_(static_cast<const MessageHeader*>(encoded))
1000 , length_(length)
1001 {
1002 assert(ONIXS_CMEMDH_NULLPTR != encoded);
1003
1004 if (length < MessageHeader::Size || length < (MessageHeader::Size + header_->blockLength()))
1006
1007 const SchemaVersion current = version();
1008
1009 if (current < since)
1010 throwBadMessageVersion(current, since);
1011 }
1012
1013private:
1015
1016 const MessageHeader* header_;
1017 MessageSize length_;
1018};
1019
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_NULLPTR
Definition Compiler.h:178
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
Exposes base services to access fields stored in a SBE-encoded block of fixed-length fields.
BinaryBlock()
Initializes the blank instance.
StrRef fixedStr(BlockLength offset, SchemaVersion since) const
Provides access to an optional field of string type by its offset.
StrRef fixedStr(BlockLength offset) const
Provides access to string field by its offset.
Enumeration::Enum enumeration(BlockLength offset) const
Returns value of a field by its offset.
bool decimal(Decimal &value, BlockLength offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
~BinaryBlock()
Ends life of the instance.
bool ordinary(Value &value, BlockLength offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, const NullValue &null, SchemaVersion since) const
Provides access to value of an optional field by its offset.
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
Provides access to a value of an optional field by its offset.
Decimal decimal(BlockLength offset) const
Returns value of a field by its offset converted into a decimal.
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, const NullValue &null) const
Provides access to value of an optional field by its offset.
bool decimal(Decimal &value, BlockLength offset, const NullValue &null, SchemaVersion since) const
Provides access to a value of an optional field by its offset.
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.
Iterator operator+(difference_type distance) const
Advances instance by given number of entries.
bool operator<(const Iterator &other) const
Established order between two iterators.
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.
Iterator operator-(difference_type distance) const
Advances instance by given number of entries.
bool operator!=(const Iterator &other) const
Compares the given iterator with the other instance.
const Entry operator*() const
Repeating group block referenced by the iterator.
const Entry get() const
Repeating group entry referenced by the instance.
bool operator>(const Iterator &other) const
Established order between two iterators.
ptrdiff_t difference_type
Iterator difference type.
Iterator & operator=(const Iterator &other)
Re-initializes instance as copy of the other one.
Iterator & operator++()
Advances instance to the next repeating group entry.
Iterator & operator--()
Advances instance to the next repeating group entry.
Iterator(const void *block, BlockLength length, SchemaVersion version)
Initializes instance for given repeating group.
bool operator==(const Iterator &other) const
Compares the given iterator with the other instance.
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.
const Entry operator[](Size index) const
Provides access to the group entry by its index in the group.
BinaryGroupEntries()
Initializes blank instance referencing to nothing.
Iterator end() const
Returns iterator pointing to the entry behind the end of the group.
bool empty() const
Indicates whether a repeating group being referenced is empty.
EncodedLength encodedLength() const
Length of the binary data occupied by the given collection of entries.
Size size() const
Returns number of blocks.
BinaryGroupEntries & operator=(const BinaryGroupEntries< OtherEntry, OtherBlockLength, OtherNumInGroup, OtherLength > &other)
Re-initializes instance as copy of the other one.
BinaryGroupEntries(const BinaryGroupEntries< OtherEntry, OtherBlockLength, OtherNumInGroup, OtherLength > &other)
Initializes instance as a copy of the other one.
BinaryGroupEntry()
Initializes instance referring to nothing.
BlockLength blockLength() const
Returns length of the block containing fixed-length fields of the given entry.
const void * block() const
Returns pointer to the block containing fixed-length fields of the given entry.
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
EncodedLength encodedLength() const
Length of the SBE-encoded data referring to the given entry.
BinaryGroupEntry(const void *encoded, BlockLength length, SchemaVersion version)
Initializes instance from memory block of given SBE-encoded message.
BinaryGroupEntry & operator=(const BinaryGroupEntry &other)
Re-initializes instance as a copy of the other one.
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
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)
Initializes instance referencing to a valid group of a given message.
Iterator end() const
Returns iterator pointing to the entry behind the end of the group.
bool empty() const
Indicates whether a repeating group being referenced is empty.
BinaryGroupEntries< EntryType, typename Dimension::BlockLength, typename Dimension::NumInGroup, LengthType > Entries
Binary group blocks.
Entry operator[](Size index) const
Provides access to the repeating group entry by its index in the group.
BinaryGroup(const BinaryGroup &other)
Initializes instance as a copy of the other one.
DimensionType Dimension
Binary group dimensions (actual length, number of entries, etc).
BinaryGroup()
Initializes blank instance referencing to nothing.
LengthType EncodedLength
Measures binary length of the group.
BinaryGroup & operator=(const BinaryGroup &other)
Re-initializes instance as copy of the other one.
Encapsulates services for manipulating SBE-encoded groups stored sequentially in SBE-encoded message.
BinaryGroups(const void *encoded, EncodedLength length, SchemaVersion version)
Initializes list over memory block, where given message is stored.
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 & operator=(const BinaryGroups &other)
Re-initializes instance as copy of the other one.
BinaryGroups(const BinaryGroups &other)
Initializes as copy of other list.
EncodedLength encodedLength() const
Length of SBE-encoded content referenced by the given group list.
Length EncodedLength
Represents the length of binary data occupied by the given list of groups.
BinaryGroups tail() const
Returns the groups following the head.
BinaryMessage()
Initializes the instance referencing to nothing.
BinaryMessage(const void *encoded, EncodedLength length, SchemaVersion since)
Initializes instance over the given encoded data.
SchemaVersion version() const
Version of message being referenced.
BlockLength blockLength() const
Length of the message body ( block of fixed-length fields).
BinaryMessage & operator=(const BinaryMessage &other)
Re-initializes instance as a copy of the other one.
BinaryGroups< MessageSize > Groups
Repeating groups.
BinaryMessage(const void *encoded, EncodedLength length)
Initializes instance over the given encoded data.
Groups groups() const
Collection of repeating groups of the message being referenced.
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.
MessageSize BlockLength
Length of message body representing a block of fixed-length fields.
A real number with floating exponent.
Definition Decimal.h:137
Template ID and length of message root.
Definition Composites.h:358
UInt16 TemplateId
templateId type.
Definition Composites.h:370
Provides efficient way of accessing text-based values without copying content of the text being refer...
Definition String.h:42
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
Definition Memory.h:75
void throwBadBinaryData(const Char *className)
Throws exception on bad repeating group entry.
Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance)
Returns pointer which is lower than given one to a given number of bytes.
Definition Memory.h:83
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
char Char
Character type alias.
Definition String.h:36
void throwBadBinaryGroup()
Throws exception on bad repeating group.
UInt16 MessageSize
Aliases message length type.
void throwBadMessageVersion(SchemaVersion, SchemaVersion, const Char *=nullptr)
Raises exception on bad message version.
UInt16 UInt16
uInt16.
Definition Fields.h:199
void throwBadBinaryMessage()
Raises exception on bad binary message.
MessageHeader::TemplateId MessageTemplateId
Aliases message type (template) identification.
MDEntryType type.
Definition Fields.h:308
static SchemaVersion minimalVersion()
Returns minimal version supported by the SDK.