47 const Block& block()
const
49 return *
static_cast<const Block*
>(
this);
71 BlockSize offset)
const
75 (offset +
sizeof(FieldValue)));
104 const NullValue& null)
const
106 const FieldValue& fieldValue =
109 if (null != fieldValue)
149 const NullValue& null)
const
156 const Value& optional =
159 if (null != optional)
191 const NullValue& null,
195 since <= block().version()
213 BlockSize offset)
const
243 Enumeration::Enum& value,
245 const NullValue& null)
const
257 const Base& fieldValue =
260 if (null != fieldValue)
262 value =
static_cast<Enum
>(fieldValue);
283 Enumeration::Enum& value,
285 const NullValue& null,
289 since <= block().version()
305 BlockSize offset)
const
307 typedef Char Str[Size];
355 BlockSize offset)
const
357 typedef Char Str[Size];
378 const Char* className);
407 DimensionType::BlockLength
414 Dimension::NumInGroup
444 std::random_access_iterator_tag
501 return entry_ == other.entry_;
509 return entry_ != other.entry_;
517 return entry_ < other.entry_;
525 return entry_ > other.entry_;
584 entry_ = other.entry_;
587 version_ = other.version_;
666 operator bool()
const
711 assert(index <
size());
755 entries_ = other.entries_;
757 entrySize_ = other.entrySize_;
758 entryCount_ = other.entryCount_;
760 version_ = other.version_;
767 const void* entries_;
769 EntrySize entrySize_;
798 DimensionType::BlockLength
805 Dimension::NumInGroup
835 std::forward_iterator_tag
892 return entry_ == other.entry_;
900 return entry_ != other.entry_;
908 return entry_ < other.entry_;
916 return entry_ > other.entry_;
933 result.advance(distance);
942 entry_ = other.entry_;
945 version_ = other.version_;
950 void advance(difference_type count)
952 const void* rawEntry = entry_;
953 for (difference_type i = 0; i < count; ++i)
957 Entry e(rawEntry, size_, version_);
959 rawEntry = e.next(version_).body();
1030 operator bool()
const
1098 entries_ = other.entries_;
1100 entrySize_ = other.entrySize_;
1101 entryCount_ = other.entryCount_;
1103 version_ = other.version_;
1104 size_ = other.size_;
1110 const void* entries_;
1112 EntrySize entrySize_;
1127 const void* binary_;
1167 return (0 == size_);
1197 assert(headSize <= size_);
1226 binary_ = other.binary_;
1227 size_ = other.size_;
1229 version_ = other.version_;
1243 throw std::runtime_error(
1244 "Cannot construct message instance. Memory "
1245 "block is too small to access SBE message header. ");
1353 operator bool()
const
1382 body_ = other.body_;
1383 size_ = other.size_;
1385 version_ = other.version_;
1437 header_->blockLength();
1443 header_->version());
1479 header_->blockLength()))
1498 : header_(other.header_)
1499 , size_(other.size_)
1504 operator bool()
const
1514 return header_->templateId();
1522 return header_->version();
1553 return header_->blockLength();
1561 header_ = other.header_;
1562 size_ = other.size_;
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
#define ONIXS_CMESTREAMLINEDMDH_NULLPTR
Decimal decimal(BlockSize offset) const
Returns value of a field by its offset converted into a decimal.
bool enumeration(typename Enumeration::Enum &value, BlockSize offset, const NullValue &null) const
Provides access to value of an optional field by its offset.
StrRef fixedStr(BlockSize offset, SchemaVersion since) const
Provides access to an optional field of string type by its offset.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
bool decimal(Decimal &value, BlockSize offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
Enumeration::Enum enumeration(BlockSize offset) const
Returns value of a field by its offset.
StrRef fixedStr(BlockSize offset) const
Provides access to string field by its offset.
BinaryFields()
Initializes blank instance.
~BinaryFields()
Cleans everything up.
const FieldValue & ordinary(BlockSize offset) const
Returns value of a field by its offset.
bool fixedStr(StrRef &value, BlockSize offset) const
Provides access to an optional field of string type by its offset.
bool enumeration(typename Enumeration::Enum &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
Provides access to value of an optional field by its offset.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
Provides access to a value of an optional field by its offset.
Encapsulates operations over SBE-encoded repeating group entry instance.
BinaryGroupEntry(const void *body, BodySize size, SchemaVersion version)
Initializes instance from memory block of given SBE-encoded message.
const void * body() const
SchemaVersion version() const
BinaryGroupEntry()
Initializes instance referring to nothing.
BinaryGroupList< MessageSize > GroupList
Binary group list instantiation.
GroupList groups() const
Returns list of repeating groups of a entry being referenced.
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
BodySize bodySize() const
BodySizeType BodySize
Type to present length of binary data of given repeating group entry.
Encapsulates services for manipulating SBE-encoded groups stored sequentially in SBE-encoded message.
const void * binary() const
MessageSize binarySize() const
Group head() const
Provides access to the head group of the list.
BinaryGroupList tail() const
Returns list of groups following the head.
bool empty() const
Indicates whether group list is empty.
BinaryGroupList(const BinaryGroupList &other)
Initializes as copy of other list.
BinaryGroupList()
Initializes empty list.
BinaryGroupList(const void *binary, BinarySize size, SchemaVersion version)
Initializes list over memory block, where given message is stored.
Provides iterating facilities over SBE-encoded group entries.
Iterator(const void *entry, EntrySize size, SchemaVersion version)
Initializes instance for given repeating group.
const Entry * pointer
Aliases pointer to entry for STL conformance.
Iterator()
Initializes instance referring to nothing.
std::forward_iterator_tag iterator_category
Identifies iterator category.
Iterator(const Iterator &other)
Initializes instance as copy of the other one.
EntryType Entry
Aliases type of object referenced by iterator.
const Entry & reference
Aliases entry reference for STL conformance.
const Entry value_type
Aliases entry for STL conformance.
const Entry get() const
Repeating group entry referenced by the instance.
ptrdiff_t difference_type
Iterator difference type.
Encapsulates operations over SBE-encoded repeating group.
const void * binary() const
SBE-encoded data representing repeating group.
BinarySize binarySize() const
Size of SBE-encoded data representing repeating group.
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
Dimension::NumInGroup Size
Size of group (number of entries).
GroupSizeType BinarySize
Length of group data.
DimensionType::BlockLength EntrySize
Length of group entry data.
EntryType Entry
Aliases type of repeating group entry.
const void * entries() const
Location of repeating group entries.
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.
BinaryGroupWithNested(const void *data, BinarySize size, SchemaVersion version)
Initializes instance referencing to a valid group of a given message.
EntrySize entrySize() const
Size in bytes of single repeating group entry.
BinaryGroupWithNested(const BinaryGroupWithNested &other)
Initializes instance as a copy of the other one.
DimensionType Dimension
Aliases repeating group dimension type.
Size size() const
Returns number of entries in a repeating group being referenced.
BinaryGroupWithNested()
Initializes blank instance referencing to nothing.
Provides iterating facilities over SBE-encoded group entries.
Iterator(const void *entry, EntrySize size, SchemaVersion version)
Initializes instance for given repeating group.
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.
EntryType Entry
Aliases type of object referenced by iterator.
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.
Encapsulates operations over SBE-encoded repeating group.
const void * binary() const
BinarySize binarySize() const
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
Dimension::NumInGroup Size
Size of group (number of entries).
GroupSizeType BinarySize
Length of group data.
DimensionType::BlockLength EntrySize
Length of group entry data.
EntryType Entry
Aliases type of repeating group entry.
const void * entries() const
Iterator end() const
Returns iterator pointing to the entry behind the end of the group.
BinaryGroup(const void *data, BinarySize size, SchemaVersion version)
Initializes instance referencing to a valid group of a given message.
bool empty() const
Indicates whether a repeating group being referenced is empty.
BinaryGroup(const BinaryGroup &other)
Initializes instance as a copy of the other one.
EntrySize entrySize() const
Size in bytes of single repeating group entry.
DimensionType Dimension
Aliases repeating group dimension type.
Size size() const
Returns number of entries in a repeating group being referenced.
BinaryGroup()
Initializes blank instance referencing to nothing.
Encapsulates services for manipulating SBE-encoded messages.
const void * binary() const
SBE-encoded message content.
BinaryMessage()
Initializes blank instance referencing to nothing.
MessageHeader::BlockLength BodySize
Length of message body without repeating groups.
const void * body() const
Indicates beginning of message body.
MessageSize BinarySize
Length of message binary data.
SchemaVersion version() const
Version of message being referenced.
BinaryMessage(const void *data, MessageSize size)
Initializes instance over given memory block.
MessageSize binarySize() const
Size of SBE-encoded message.
BinaryGroupList< MessageSize > GroupList
Binary group list instantiation.
GroupList groups() const
Returns list of repeating groups of a message being referenced.
MessageTemplateId templateId() const
Template identifier of message being referenced.
BodySize bodySize() const
Size of message body in bytes.
BinaryMessage(const BinaryMessage &other)
Initializes instance as copy of the other one.
A real number with floating exponent.
NumInGroup numInGroup() const
numInGroup field.
BlockLength blockLength() const
blockLength field.
Provides efficient way of accessing text-based FIX field values.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
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.
void throwBadMessageVersion(SchemaVersion messageVersion)
Raises exception on bad message version.
MessageSize EncodedLength
Length of message binary data.
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
char Char
Character type alias.
void throwBadBinaryGroup()
Throws exception on bad repeating group.
UInt16 MessageSize
Aliases message length type.
MessageSize BlockLength
Length of message body representing a block of fixed-length fields.
void throwBadBinaryMessage()
Raises exception on bad binary message.
MessageHeader::TemplateId MessageTemplateId
Aliases message type (template) identification.
Attributes of SBE message schema.
static SchemaVersion minimalVersion()
Returns minimal version supported by given SDK.