78 BlockLength offset)
const
87 (offset + sizeOfValue) <=
88 container().blockLength()
122 const NullValue& null)
const
124 const Value optional =
127 if (null != optional)
158 const NullValue& null,
164 container().version()
186 BlockLength offset)
const
216 Enumeration::Enum& value,
218 const NullValue& null)
const
230 const Base optional =
233 if (null != optional)
259 Enumeration::Enum& value,
261 const NullValue& null,
267 container().version()
289 BlockLength offset)
const
312 const NullValue& null)
const
319 const Value optional =
322 if (null != optional)
353 const NullValue& null,
359 container().version()
380 BlockLength offset)
const
385 container().blockLength()
428 container().version()
436ONIXS_CONFLATEDUDP_EXPORTED
439 const Char* className);
458 const void* encoded_;
501 : encoded_(other.encoded_)
502 , length_(other.length_)
503 , version_(other.version_)
508 operator bool()
const
510 return (NULL != encoded_);
553 encoded_ = other.encoded_;
554 length_ = other.length_;
556 version_ = other.version_;
577 class OtherBlockLength,
578 class OtherNumInGroup,
585 const void* encoded_;
587 BlockLength blockLength_;
607 const void* encoded_;
627 std::random_access_iterator_tag
652 : encoded_(other.encoded_)
653 , length_(other.length_)
654 , version_(other.version_)
661 assert(NULL != encoded_);
681 return encoded_ == other.encoded_;
689 return encoded_ != other.encoded_;
697 return encoded_ < other.encoded_;
705 return encoded_ > other.encoded_;
779 encoded_ = other.encoded_;
780 length_ = other.length_;
781 version_ = other.version_;
799 BlockLength blockLength,
803 , blockLength_(blockLength)
813 class OtherBlockLength,
814 class OtherNumInGroup,
850 operator bool()
const
852 return (NULL != encoded_);
906 assert(index < size_);
952 class OtherBlockLength,
953 class OtherNumInGroup,
967 encoded_ = other.encoded_;
990ONIXS_CONFLATEDUDP_EXPORTED
1014 Dimension::BlockLength,
1016 Dimension::NumInGroup,
1065 header_->blockLength(),
1066 header_->numInGroup(),
1081 : header_(other.header_)
1082 , entries_(other.entries_)
1088 operator bool()
const
1090 return (NULL != header_);
1097 return (0 ==
size());
1104 return entries_.size();
1111 return entries_.begin();
1118 return entries_.end();
1128 return entries_[index];
1150 entries_.encodedLength()
1159 header_ = other.header_;
1160 entries_ = other.entries_;
1166 const Dimension* header_;
1178 const void* encoded_;
1212 : encoded_(other.encoded_)
1213 , length_(other.length_)
1214 , version_(other.version_)
1221 return (0 == length_);
1258 encoded_, headLength),
1259 length_ - headLength,
1281 encoded_ = other.encoded_;
1282 length_ = other.length_;
1284 version_ = other.version_;
1295 throw std::runtime_error(
1296 "Cannot construct message instance. Memory "
1297 "block is too small to access SBE message header. ");
1301ONIXS_CONFLATEDUDP_EXPORTED
1311ONIXS_CONFLATEDUDP_EXPORTED
1381 header_->blockLength()))
1412 operator bool()
const
1414 return (NULL != header_);
1420 assert(NULL != header_);
1422 return header_->templateId();
1428 assert(NULL != header_);
1430 return header_->version();
1448 assert(NULL != header_);
1460 assert(NULL != header_);
1462 return header_->blockLength();
1469 assert(NULL != header_);
1481 header_->blockLength(),
1491 header_ = other.header_;
1492 length_ = other.length_;
1517 header_->blockLength()))
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
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.
friend class BinaryGroupEntries
EncodedLength encodedLength() const
MessageSize EncodedLength
const void * encoded() const
Size size() const
Returns number of blocks.
BinaryGroupEntries(const BinaryGroupEntries< OtherEntry, OtherBlockLength, OtherNumInGroup, OtherLength > &other)
Initializes instance as a copy of the other one.
SchemaVersion version() const
BinaryGroupEntry()
Initializes instance referring to nothing.
BlockLength blockLength() const
const void * block() const
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
EncodedLength encodedLength() const
MessageSize EncodedLength
const void * encoded() const
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.
EncodedLength encodedLength() const
const void * encoded() const
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.
EncodedLength encodedLength() const
const void * encoded() const
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.
BlockLength blockLength() const
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.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance)
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
char Char
Character type alias.
UInt16 MessageSize
Aliases message length type.
ONIXS_CONFLATEDUDP_EXPORTED void throwBadBinaryGroup()
Throws exception on bad repeating group.
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.