43 template<
typename Message>
inline 46 if ONIXS_CONFLATEDTCP_UNLIKELY(length < minimalRequiredLength)
47 throwBinaryBlockIsTooSmall(length, minimalRequiredLength, Message::className());
62 template < class Container, class BlockLength >
68 return *static_cast <
const Container*> (
this);
81 assert(container().blockLength() >= (offset + size<Value>()) &&
82 "The requested field exceeds provided block boundaries.");
84 const void*
const location = advanceByBytes(container().block(), offset);
85 return getValue<Value>(location);
95 value = ordinary<Value>(offset);
97 return (null != value);
107 return (since <= container().version() && ordinary (value, offset, null ) );
114 typedef typename Enumeration::Base Base;
115 typedef typename Enumeration::Enum Enum;
117 return static_cast<Enum
>(ordinary<Base>(offset));
124 typedef typename Enumeration::Base Base;
125 typedef typename Enumeration::Enum Enum;
127 value = static_cast <Enum>(ordinary<Base>(offset));
128 return null != value;
135 return (since <= container().version() && enumeration<Enumeration>(value, offset, null) );
142 return ordinary<Value>(offset);
152 value = ordinary<Value>(offset);
153 return null != value;
163 return (since <= container().version() && decimal(value, offset, null));
170 assert(container().blockLength() >= (offset + Length) &&
"The requested field exceeds provided block boundaries.");
172 const Char*
const text = reinterpret_cast <
const Char*> (advanceByBytes(container().block(), offset));
174 return StrRef(text, strnlen(text, Length));
184 value = fixedStr<Length>(offset);
185 return !value.empty();
195 return (since <= container().version() && fixedStr<Length>(value, offset));
203 template <
class Container,
class BlockLength >
210 return *
static_cast<Container*
>(
this);
217 assert(container().blockLength() >= (offset + size<FieldValue>()) &&
"The requested field exceeds provided block boundaries.");
219 void*
const fieldPos = advanceByBytes(container().block(), offset);
220 setValue(fieldPos, value);
227 if ONIXS_CONFLATEDTCP_UNLIKELY(since > container().version())
228 throwDisallowedField();
230 setOrdinary(offset, value);
237 typedef typename Enumeration::Base Base;
238 setOrdinary<Base>(offset,
static_cast<Base
>(value));
245 typedef typename Enumeration::Base Base;
246 setOrdinary(offset, static_cast<Base>(value), since);
253 assert(container().blockLength() >= (offset + Size) &&
"The requested field exceeds provided block boundaries.");
254 assert(value.size() <= Size &&
"The string is truncated.");
256 void*
const fieldPos = advanceByBytes(container().block(), offset);
257 const size_t sizeToCopy = (std::min)(Size, static_cast<BlockLength>(value.size()));
260 std::memcpy(fieldPos, value.data(), sizeToCopy);
262 std::memset(advanceByBytes(fieldPos, sizeToCopy), 0, Size - sizeToCopy);
269 if ONIXS_CONFLATEDTCP_UNLIKELY(since > container().version())
270 throwDisallowedField();
272 setFixedStr<Size>(offset, value);
283 template <
class BodySizeType>
365 template <
class EntryType,
class BlockLength,
class NumInGroup,
class Length >
422 return Entry(entry_, size_, version_);
426 Entry operator *()
const 434 return entry_ == other.entry_;
440 return entry_ != other.entry_;
446 return entry_ < other.entry_;
452 return entry_ > other.entry_;
460 entry_ = advanceByBytes(entry_, size_);
470 entry_ = advanceBackByBytes(entry_, size_);
481 return Iterator(advanceByBytes(entry_, distance * size_), size_, version_);
490 return Iterator(advanceBackByBytes(entry_, distance * size_), size_, version_);
511 , blockLength_(blockLength)
516 assert(blockLength > 0);
517 assert(version != 0);
541 return Iterator(encoded(), blockLength_, version_);
547 return Iterator(advanceByBytes(encoded(), encodedLength()), blockLength_, version_);
553 Entry operator [](Size index)
const 555 assert(index < size_);
558 return Entry(advanceByBytes(encoded_, static_cast<ptrdiff_t>(index) * blockLength_), blockLength_, version_);
570 return (static_cast<EncodedLength>(blockLength_) * static_cast<EncodedLength>(size_) );
574 template<
class OtherEntry,
class OtherBlockLength,
class OtherNumInGroup,
class OtherLength >
576 : encoded_(other.encoded_)
577 , blockLength_(other.blockLength_)
579 , version_(other.version_)
584 assert(blockLength_ == other.blockLength_);
585 assert(size_ == other.size_);
588 template <
class OtherEntry,
class OtherBlockLength,
class OtherNumInGroup,
class OtherLength>
591 encoded_ = other.encoded_;
593 blockLength_ = other.blockLength_;
595 assert(blockLength_ == other.blockLength_);
599 assert(size_ == other.size_);
601 version_ = other.version_;
608 template <
class OtherEntry,
class OtherBlockLength,
class OtherNumInGroup,
class OtherLength>
friend class SbeGroupEntries;
611 BlockLength blockLength_;
617 template <
class EntryType,
class DimensionType,
class GroupSizeType >
628 enum { EmptySize = Dimension::Size };
649 , entries_(ONIXS_CONFLATEDTCP_NULLPTR)
657 : header_(static_cast <Dimension*>(data))
658 , entries_(advanceByBytes(data, Dimension::Size))
663 assert(size >= Dimension::Size);
690 const Dimension*
const group =
static_cast<const Dimension*
>(header_);
692 return group->numInGroup();
701 return Iterator(entries_, numericCast<Size>(entrySize()), version_);
710 return Iterator(advanceByBytes(binary(), binarySize()), numericCast<Size>(entrySize()), version_);
717 Entry operator [](Size index)
const 720 assert(index < size());
722 return Entry(advanceByBytes(entries_, static_cast<ptrdiff_t>(index) * entrySize()), entrySize(), version_);
732 return Entries (entries_, header_->blockLength(), header_->numInGroup(), version_);
744 return advanceByBytes(toByteBlock(encoded()), binarySize());
758 return Dimension::Size + (
static_cast<BinarySize
>(entrySize()) * static_cast<BinarySize>(size()));
768 Dimension*
const group =
static_cast<Dimension*
>(header_);
769 return group->blockLength();
779 Dimension*
const group =
static_cast<Dimension*
>(header_);
780 group->setBlockLength(entrySize);
781 group->setNumInGroup(0);
785 Size allocate(Size entryCount,
const void* messageTail,
const void* blockEnd)
791 Dimension*
const group =
static_cast<Dimension*
>(header_);
793 const EntrySize entrySize = group->blockLength();
795 if ONIXS_CONFLATEDTCP_UNLIKELY(
796 entrySize < EntryType::blockLength(version_))
798 throwBadBinaryBlock();
801 const Size oldEntryCount = group->numInGroup();
803 if(oldEntryCount == entryCount)
806 const ptrdiff_t memShift =
807 (entryCount - oldEntryCount) * static_cast<ptrdiff_t>(entrySize);
809 const void*
const newMessageTail =
810 advanceByBytes(messageTail, memShift);
812 if ONIXS_CONFLATEDTCP_UNLIKELY(byteDistance(blockEnd, newMessageTail) < 0)
813 throwNotEnoughSpace();
815 const void*
const oldEndOfGroup =
816 advanceByBytes(entries_, static_cast<ptrdiff_t>(entrySize) * oldEntryCount);
818 void*
const newEndGroup =
819 advanceByBytes(entries_, static_cast<ptrdiff_t>(entrySize) * entryCount);
824 byteDistance(messageTail, oldEndOfGroup));
826 group->setNumInGroup(entryCount);
828 return oldEntryCount;
833 void setup(Size entryCount,
const void* messageTail,
const void* blockEnd)
839 const Size oldEntryCount = allocate(entryCount, messageTail, blockEnd);
841 for(Size index = oldEntryCount; index < entryCount; ++index)
842 (*
this)[index].resetVariableFields();
847 void construct(Size entryCount,
const void* messageTail,
const void* blockEnd)
853 const Size oldEntryCount = allocate(entryCount, messageTail, blockEnd);
855 for(Size index = oldEntryCount; index < entryCount; ++index)
856 (*
this)[index].reset();
868 template <
class BinarySize >
888 template<
class BinaryVariableLengthFieldType>
891 return *
static_cast<BinaryVariableLengthFieldType*
>(binary_);
900 const BinarySize headSize = head<BinaryVariableLengthFieldType>().binarySize();
902 assert(headSize <= size_);
913 if ONIXS_CONFLATEDTCP_UNLIKELY(empty() || (size_ < BinaryVariableLengthFieldType::Size))
915 throwBadBinaryBlock();
918 const BinarySize headSize = head<BinaryVariableLengthFieldType>().binarySize();
920 if ONIXS_CONFLATEDTCP_UNLIKELY(headSize > size_)
922 throwBadBinaryBlock();
936 template <
class BinarySize>
961 return Group(binary_, size_, version_);
970 const BinarySize headSize = head<Group>().binarySize();
972 assert(headSize <= size_);
974 return SbeGroupList(advanceByBytes(binary_, headSize), size_ - headSize, version_);
983 const BinarySize headSize = head<Group>().binarySize();
985 assert(headSize <= size_);
996 const BinarySize headSize = checkHead<Group>();
998 return SbeGroupList(advanceByBytes(binary_, headSize), size_ - headSize, version_);
1007 const BinarySize headSize = checkHead<Group>();
1013 template<
class Group>
1014 BinarySize checkHead()
const 1016 if ONIXS_CONFLATEDTCP_UNLIKELY(size_ < Group::Dimension::Size)
1018 throwBadBinaryBlock();
1021 const Group group = head<Group>();
1023 const BinarySize headSize = group.binarySize();
1025 if ONIXS_CONFLATEDTCP_UNLIKELY(headSize > size_)
1027 throwBadBinaryBlock();
1032 const BinarySize entrySize = group.entrySize();
1033 const BinarySize expectedEntrySize = Group::Entry::blockLength(version_);
1035 if ONIXS_CONFLATEDTCP_UNLIKELY(entrySize < expectedEntrySize)
1037 throwBadBinaryBlock();
1050 template<
typename Traits>
1053 Int16 tmp = version;
1054 if ONIXS_CONFLATEDTCP_UNLIKELY (tmp < Traits::MinimalVersion)
1056 throwBadMessageVersion(version, Traits::MinimalVersion);
1061 template<
typename Traits>
1064 checkVersion<Traits>(version);
1066 if ONIXS_CONFLATEDTCP_UNLIKELY(version < since)
1068 throwBadMessageVersion(version, since);
1073 template<
typename Traits>
1076 if ONIXS_CONFLATEDTCP_UNLIKELY(
id != Traits::Id)
1078 throwBadSchemaId(Traits::Id,
id);
1083 template<
typename Traits>
1086 checkSchemaId<Traits>(id);
1087 checkVersion<Traits>(version);
1121 if ONIXS_CONFLATEDTCP_UNLIKELY(size < MessageHeader::Size)
1122 throwBinaryBlockIsTooSmall(size, MessageHeader::Size);
1124 this->version(version);
1136 if ONIXS_CONFLATEDTCP_UNLIKELY(size < MessageHeader::Size)
1137 throwBinaryBlockIsTooSmall(size, MessageHeader::Size);
1140 if ONIXS_CONFLATEDTCP_UNLIKELY(size < (MessageHeader::Size + header_->blockLength()))
1141 throwBinaryBlockIsTooSmall(size, MessageHeader::Size + header_->blockLength());
1155 assert(size >= MessageHeader::Size);
1156 assert(size >= MessageHeader::Size + header_->blockLength());
1177 return header_->templateId();
1185 return header_->version();
1193 return header_->schemaId();
1217 return advanceByBytes(header_, size_);
1225 return advanceByBytes(header_, size_);
1239 return advanceByBytes(header_, MessageHeader::Size);
1247 return header_->blockLength();
1255 return advanceByBytes(header_, MessageHeader::Size);
1263 return advanceByBytes(header_, MessageHeader::Size);
1275 header_->setVersion(version);
1286 void* list = advanceByBytes<void>(body(), blockLength());
1288 const MessageSize listSize = size_ - MessageHeader::Size - header_->blockLength();
1290 return GroupList(list, listSize, header_->version());
1299 const void* list = advanceByBytes(block(), blockLength());
1301 const MessageSize listSize = size_ - MessageHeader::Size - header_->blockLength();
1303 return GroupList(const_cast<void*>(list), listSize, header_->version());
1307 template<
typename Group>
1311 assert(group.valid());
1312 group.init(entrySize);
1316 template<
typename Group>
1318 void setupGroup(Group& group,
typename Group::Size entryCount,
const void* messageTail)
1320 assert(messageTail);
1321 assert(group.valid());
1322 group.setup(entryCount, messageTail, blockEnd());
1326 template<
typename Group>
1328 void constructGroup(Group& group,
typename Group::Size entryCount,
const void* messageTail)
1330 assert(messageTail);
1331 assert(group.valid());
1332 group.construct(entryCount, messageTail, blockEnd());
1344 void* list = advanceByBytes<void>(body(), blockLength());
1346 const MessageSize listSize = size_ - MessageHeader::Size - header_->blockLength();
1348 return VariableLengthFieldList(list, listSize, header_->version());
1357 const void* list = advanceByBytes(block(), blockLength());
1359 const MessageSize listSize = size_ - MessageHeader::Size - header_->blockLength();
1361 return VariableLengthFieldList(const_cast<void*>(list), listSize, header_->version());
1369 header_->setTemplateId(value);
1370 header_->setBlockLength(blockLength);
1371 header_->setSchemaId(
id);
1378 const BlockLength encodedBlockLength = container().blockLength();
1380 assert(encodedBlockLength >= offset);
1382 const size_t paddingLength = encodedBlockLength - offset;
1383 std::memset(advanceByBytes(container().block(), offset), 0, paddingLength);
1394 assert(blockLength >= minimalBlockLength);
1396 header_->setTemplateId(value);
1397 header_->setBlockLength(blockLength);
1398 header_->setSchemaId(
id);
1400 zeroPaddingBytes(minimalBlockLength);
1408 const ptrdiff_t distance = byteDistance(tail, binary());
1410 assert(distance > 0);
1412 assert(distance <= (std::numeric_limits<MessageSize>::max)());
1416 assert(size <= size_);
1422 template<
class Callable,
class Owner>
1425 setVarDataField(callable(owner), value, owner.tail());
1429 template<
class Callable,
class Owner>
1432 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1433 throwDisallowedField();
1435 setVariableLengthField(callable, value, owner);
1439 template<
class Callable,
class Owner>
1442 ONIXS_CONFLATEDTCP_CHECK_NOTHROW(callable(owner));
1443 return callable(owner).varData();
1447 template<
class Callable,
class Owner>
1450 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1453 return getVariableLengthField(callable, owner);
1457 template<
class Callable,
class Owner>
1460 ONIXS_CONFLATEDTCP_CHECK_NOTHROW(callable(owner));
1461 callable(owner).length(0);
1465 template<
class Group,
class Callable,
class Owner>
1468 const typename Group::EntrySize entrySize = Group::Entry::blockLength(version());
1470 Group grp = callable(owner);
1472 initGroup(grp, entrySize);
1476 template<
class Callable,
class Owner>
1479 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1482 setVariableLengthFieldToNull(callable, owner);
1486 template<
class Group,
class Callable,
class Owner>
1489 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1492 resetGroup<Group>(callable, owner);
1496 template<
class Group,
class Callable,
class Owner>
1499 return callable(owner);
1503 template<
class Group,
class Callable,
class Owner>
1506 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1509 return getGroup<Group>(callable, owner);
1513 template<
class Group,
class Callable,
class Owner>
1516 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1519 return constructGroup<Group>(callable, length, owner);
1523 template<
class Group,
class Callable,
class Owner>
1526 Group group = callable(owner);
1528 constructGroup(group, length, owner.tail());
1534 template<
class Group,
class Callable,
class Owner>
1537 if ONIXS_CONFLATEDTCP_UNLIKELY(since > version())
1540 return setupGroup<Group>(callable, length, owner);
1544 template<
class Group,
class Callable,
class Owner>
1545 Group
setupGroup(Callable callable,
typename Group::Size length, Owner& owner)
1547 Group group = callable(owner);
1549 setupGroup(group, length, owner.tail());
Entries::Size Size
Number of entries in the group.
BlockLength blockLength() const noexcept
bool operator>(const StrRef &left, const StrRef &right)
Compares instances.
Iterator end() const
Returns the iterator pointing to the entry behind the end of the group.
SBE-encoded repeating group.
void setupGroup(Group &group, typename Group::Size entryCount, const void *messageTail)
Initializes the group header.
#define ONIXS_CONFLATEDTCP_HOTPATH
GroupList groups() noexcept
ptrdiff_t difference_type
void setEnumeration(BlockLength offset, typename Enumeration::Enum value, SchemaVersion since)
Sets the field value.
void checkSchemaId(SchemaId id)
Checks the compatibility with the provided SBE Schema ID.
bool fixedStr(StrRef &value, BlockLength offset) const noexcept
Provides access to an optional string field value.
GroupList groups() const noexcept
#define ONIXS_CONFLATEDTCP_LTWT_EXPORTED
Group getGroup(Callable callable, Owner &owner) const noexcept
Container & container() noexcept
void setFixedStr(BlockLength offset, StrRef value, SchemaVersion since)
Sets the field value.
bool operator<(const StrRef &left, const StrRef &right)
Compares instances.
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_END
Value ordinary(BlockLength offset) const noexcept
void checkVersion(SchemaVersion since, SchemaVersion version)
Checks the compatibility with the provided SBE Schema version.
DimensionType::BlockLength EntrySize
Length of group entry data.
Variable-length fields list.
void setOrdinary(BlockLength offset, FieldValue value) noexcept
Sets the field value.
bool empty() const noexcept
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan) noexcept
Adds te time interval.
#define ONIXS_CONFLATEDTCP_NOTHROW
static constexpr MessageSize getMaxMessageSize() noexcept
Maximal message size.
SbeVariableLengthFieldList< MessageSize > VariableLengthFieldList
Binary group list instantiation.
void initGroup(Group &group, typename Group::EntrySize entrySize) noexcept
Resets the group to the initial state.
Size size() const noexcept
Base services to access fields stored in an SBE-encoded block of memory.
MessageHeader::TemplateId MessageTemplateId
Message type (template) identification.
MessageSize calculateBinarySize(const void *tail) const noexcept
Group head() const noexcept
Group getGroup(Callable callable, SchemaVersion since, Owner &owner) const noexcept
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, NullValue null, SchemaVersion since) const noexcept
Provides access to an optional field value.
const void * blockEnd() const noexcept
EntrySize entrySize() const noexcept
SchemaVersion version() const noexcept
void clear() noexcept
Blank the instance.
MessageSize bufferSize() const noexcept
void * binary() const noexcept
Group setupGroup(Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
Setups the repeating group with the given number of entries.
SchemaId schemaId() const noexcept
SbeGroupEntries(const SbeGroupEntries< OtherEntry, OtherBlockLength, OtherNumInGroup, OtherLength > &other) noexcept
Copy constructor.
Entries::Iterator Iterator
The iterator type for group entries.
MessageSize EncodedLength
Length of the message binary data.
EncodedLength encodedLength() const noexcept
Operations over SBE-encoded repeating group entries.
#define ONIXS_CONFLATEDTCP_UNUSED
SbeGroupEntry()
Initializes a blank instance.
DimensionType Dimension
Repeating group dimension type.
SbeMessage(void *data, MessageSize size)
Initializes the instance over the given memory block.
SbeGroupEntries< EntryType, typename Dimension::BlockLength, typename Dimension::NumInGroup, GroupSizeType > Entries
Binary group blocks.
void constructGroup(Group &group, typename Group::Size entryCount, const void *messageTail)
Initializes the group header, sets all optional fields to null.
SbeMessage(void *data, MessageSize size, NoCheck) noexcept
Initializes the instance over the given memory block.
SbeVariableLengthFieldList(void *binary, BinarySize size, SchemaVersion version) noexcept
Initializes the list over the given memory block.
Services to access fields stored in an SBE-encoded block of fixed-length fields.
MessageHeader::SchemaId SchemaId
Value decimal(BlockLength offset) const noexcept
bool empty() const noexcept
StrRef fixedStr(BlockLength offset) const noexcept
Provides access to a string field value.
const void * block() const noexcept
Entries entries() const noexcept
#define ONIXS_CONFLATEDTCP_CONSTEXPR
std::random_access_iterator_tag iterator_category
BodySizeType BlockLength
Type to present the length of binary data of the repeating group entry.
#define ONIXS_CONFLATEDTCP_NODISCARD
SbeGroupEntry(void *encoded, BlockLength size, SchemaVersion version)
Initializes the instance from the memory block of the encoded message.
bool enumeration(typename Enumeration::Enum &value, BlockLength offset, NullValue null) const noexcept
Provides access to an optional field value.
bool valid() const noexcept
SchemaVersion version() const noexcept
SbeVariableLengthFieldList checkTail() const
Checks the variable-length field list consistency.
void * encoded() const noexcept
Operations over a repeating group instance.
void initHeader(MessageHeader::TemplateId value, MessageHeader::BlockLength blockLength, SchemaId id) noexcept
const void * block() const noexcept
MessageSize BlockLength
Length of the message body representing a block of fixed-length fields.
bool fixedStr(StrRef &value, BlockLength offset, SchemaVersion since) const noexcept
Provides access to an optional string field value.
An iterator over SBE-encoded group entries.
void setVariableLengthField(Callable callable, StrRef value, SchemaVersion since, Owner &owner)
Sets the value of the variable length field.
SbeGroupList< MessageSize > GroupList
Binary group list instantiation.
VariableLengthFieldList variableLengthFields() const noexcept
void setEnumeration(BlockLength offset, typename Enumeration::Enum value) noexcept
Sets the field value.
const void * encoded() const noexcept
SbeGroupEntries(void *encoded, BlockLength blockLength, Size groupSize, SchemaVersion version) noexcept
Initializes the instance referencing to data.
SbeMessage() noexcept
Initializes a blank instance.
const void * tail() const noexcept
#define ONIXS_CONFLATEDTCP_DEFAULT
void setOrdinary(BlockLength offset, FieldValue value, SchemaVersion since)
Sets the field value.
void setVariableLengthFieldToNull(Callable callable, SchemaVersion since, Owner &owner) noexcept
Sets the variable length field to null.
const void * encoded() const noexcept
constexpr UInt16 MaxConflatedTcpMessageSize
Maximum supported message size.
Iterator(void *entry, Size size, SchemaVersion version) noexcept
Initializes the instance to the given repeating group.
void resetGroup(Callable callable, SchemaVersion since, Owner &owner)
Resets the repeating group.
SbeGroupList tail() const noexcept
NumInGroup Size
Number of entries in the collection.
SbeVariableLengthFieldList< BinarySize > checkVariableLengthFields() const
Checks the variable length fields list consistency.
SbeGroup() noexcept
Initializes a blank instance referencing to nothing.
Length EncodedLength
The length of the binary data occupied by the group entries.
bool ordinary(Value &value, BlockLength offset, NullValue null, SchemaVersion since) const noexcept
Provides access to an optional field value.
Group setupGroup(Callable callable, typename Group::Size length, Owner &owner)
Setups the repeating group with the given number of entries.
bool operator==(const StrRef &left, const StrRef &right)
Compares instances.
bool valid() const noexcept
MessageHeader::Version SchemaVersion
SBE-encoded data version type.
MessageTemplateId templateId() const noexcept
void init(MessageHeader::TemplateId value, MessageHeader::BlockLength minimalBlockLength, MessageHeader::BlockLength blockLength, SchemaId id)
UInt16 MessageSize
Message length type.
SbeMessage & version(SchemaVersion version) noexcept
Sets the SBE Schema version.
Group constructGroup(Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
Creates a repeating group with the given number of entries, sets all optional fields of the group ent...
#define ONIXS_CONFLATEDTCP_LTWT_CLASS
StrRef getVariableLengthField(Callable callable, const Owner &owner) const noexcept
SbeMessage(void *data, MessageSize size, SchemaVersion version)
Initializes the instance over the given memory block.
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_BEGIN
Size size() const noexcept
const void * binary() const noexcept
BinaryVariableLengthFieldType & head() const noexcept
Group constructGroup(Callable callable, typename Group::Size length, Owner &owner)
Creates a repeating group with the given number of entries, sets all optional fields of the group ent...
EntryType Entry
The type of the repeating group entry.
Iterator() noexcept
Initializes the instance that refers to nothing.
Enumeration::Enum enumeration(BlockLength offset) const noexcept
void zeroPaddingBytes(BlockLength offset)
If specified, the extra space is padded at the end of each entry and should be set to zeroes by encod...
bool valid() const noexcept
void setFixedStr(BlockLength offset, StrRef value) noexcept
Sets the field value.
bool ordinary(Value &value, BlockLength offset, NullValue null) const noexcept
Provides access to an optional field value.
#define ONIXS_CONFLATEDTCP_NULLPTR
SbeVariableLengthFieldList tail() const noexcept
void checkSchema(SchemaId id, SchemaVersion version)
Checks the compatibility with the provided SBE Schema version.
bool operator!=(const StrRef &left, const StrRef &right)
Compares instances.
void setVariableLengthField(Callable callable, StrRef value, Owner &owner)
Sets the value of the variable length field.
const void * blockEnd() noexcept
SbeGroupEntries() noexcept
Initializes a blank instance referencing to nothing.
bool empty() const noexcept
bool decimal(Value &value, BlockLength offset, NullValue null) const noexcept
TimeSpan operator-(const TimeSpan &timeSpan) noexcept
Changes the sign of the Timestamp.
StrRef getVariableLengthField(Callable callable, SchemaVersion since, Owner &owner) const noexcept
bool valid() const noexcept
VariableLengthFieldList variableLengthFields() noexcept
void resetGroup(Callable callable, Owner &owner) noexcept
Sets the group to the initial state.
SbeGroupList checkTail() const
Checks the list consistency.
Entries::Entry Entry
Group entry type.
SbeGroup(void *data, BinarySize size, SchemaVersion version) noexcept
Initializes an instance referencing to a valid group of a given message.
BinarySize binarySize() const noexcept
bool decimal(Value &value, BlockLength offset, NullValue null, SchemaVersion since) const noexcept
Iterator begin() const noexcept
void setVariableLengthFieldToNull(Callable callable, Owner &owner) noexcept
Resets the variable length field.
BlockLength blockLength() const noexcept
char Char
Character type alias.
SbeGroupList(void *binary, BinarySize size, SchemaVersion version) noexcept
Initializes the list over the memory block.
SbeVariableLengthFieldList< BinarySize > variableLengthFields() const noexcept
bool empty() const noexcept
void * encoded() noexcept
GroupSizeType BinarySize
Length of group data.
bool valid() const noexcept
Iterator end() const noexcept