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 =
107 ordinary<FieldValue>(offset);
109 if (null != fieldValue)
130 ordinary<Value>(offset)
149 const NullValue& null)
const 156 const Value& optional =
157 ordinary<Value>(offset);
159 if (null != optional)
191 const NullValue& null,
195 since <= block().version()
197 ordinary(value, offset, null)
213 BlockSize offset)
const 227 ordinary<Base>(offset));
243 Enumeration::Enum& value,
245 const NullValue& null)
const 257 const Base& fieldValue =
258 ordinary<Base>(offset);
260 if (null != fieldValue)
262 value =
static_cast<Enum
>(fieldValue);
283 Enumeration::Enum& value,
285 const NullValue& null,
289 since <= block().version()
291 enumeration(value, offset, null)
305 BlockSize offset)
const 307 typedef Char Str[Size];
310 ordinary<Str>(offset);
338 ? fixedStr<Size>(offset)
355 BlockSize offset)
const 357 typedef Char Str[Size];
360 ordinary<Str>(offset);
364 value = fixedStr<Size>(offset);
378 const Char* className);
414 Dimension::NumInGroup
444 std::random_access_iterator_tag
479 const Entry
get()
const 491 const Entry operator *()
const 501 return entry_ == other.entry_;
509 return entry_ != other.entry_;
517 return entry_ < other.entry_;
525 return entry_ > other.entry_;
554 difference_type distance)
const 568 difference_type distance)
const 584 entry_ = other.entry_;
587 version_ = other.version_;
616 , size_(Dimension::
Size)
629 group->blockLength();
666 operator bool()
const 709 Entry operator [](
Size index)
const 711 assert(index < size());
728 entries_, Dimension::Size)
755 entries_ = other.entries_;
757 entrySize_ = other.entrySize_;
758 entryCount_ = other.entryCount_;
760 version_ = other.version_;
767 const void* entries_;
805 Dimension::NumInGroup
835 std::forward_iterator_tag
870 const Entry
get()
const 882 const Entry operator *()
const 892 return entry_ == other.entry_;
900 return entry_ != other.entry_;
908 return entry_ < other.entry_;
916 return entry_ > other.entry_;
930 difference_type distance)
const 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();
988 , size_(Dimension::
Size)
1001 group->blockLength();
1004 group->numInGroup();
1006 size_ += (
static_cast<BinarySize
>(entrySize_) * static_cast<BinarySize>(entryCount_));
1030 operator bool()
const 1062 return begin() + size();
1071 entries_, Dimension::Size)
1098 entries_ = other.entries_;
1100 entrySize_ = other.entrySize_;
1101 entryCount_ = other.entryCount_;
1103 version_ = other.version_;
1104 size_ = other.size_;
1110 const void* entries_;
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. ");
1293 body(), bodySize());
1353 operator bool()
const 1382 body_ = other.body_;
1383 size_ = other.size_;
1385 version_ = other.version_;
1430 body(), bodySize());
1436 MessageHeader::Size -
1478 (MessageHeader::Size +
1486 version = this->version();
1489 SchemaTraits::minimalVersion())
1497 const BinaryMessage& other)
1498 : header_(other.header_)
1499 , size_(other.size_)
1504 operator bool()
const 1545 MessageHeader::Size);
1559 const BinaryMessage& other)
1561 header_ = other.header_;
1562 size_ = other.size_;
BinaryGroup(const BinaryGroup &other)
Initializes instance as a copy of the other one.
Timestamp operator-(const Timestamp ×tamp, const TimeSpan &timeSpan)
Subtracts time interval from given time point.
Dimension::NumInGroup Size
Size of group (number of entries).
Encapsulates services for manipulating SBE-encoded messages.
void throwBadBinaryGroup()
Throws exception on bad repeating group.
BinaryGroupList(const void *binary, BinarySize size, SchemaVersion version)
Initializes list over memory block, where given message is stored.
BinaryGroupWithNested(const BinaryGroupWithNested &other)
Initializes instance as a copy of the other one.
const Entry * pointer
Aliases pointer to entry for STL conformance.
BinaryGroupList< MessageSize > GroupList
Binary group list instantiation.
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
Iterator(const Iterator &other)
Initializes instance as copy of the other one.
bool empty() const
Indicates whether a repeating group being referenced is empty.
Encapsulates operations over SBE-encoded repeating group.
StrRef fixedStr(BlockSize offset) const
Provides access to string field by its offset.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
bool enumeration(typename Enumeration::Enum &value, BlockSize offset, const NullValue &null) const
Provides access to value of an optional field by its offset.
EntryType Entry
Aliases type of object referenced by iterator.
Encapsulates operations over SBE-encoded repeating group.
Size size() const
Returns number of entries in a repeating group being referenced.
BinarySize binarySize() const
Size of SBE-encoded data representing repeating group.
Exposes base services to access fields stored in SBE-encoded block of memory.
Group head() const
Provides access to the head group of the list.
const void * body() const
Indicates beginning of message body.
Size size() const
Returns number of entries in a repeating group being referenced.
SchemaVersion version() const
Version of message containing given repeating group instance.
void throwBadBinaryMessage()
Raises exception on bad binary message.
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.
BinaryGroupWithNested()
Initializes blank instance referencing to nothing.
MessageSize BinarySize
Length of message binary data.
EntryType Entry
Aliases type of repeating group entry.
ptrdiff_t difference_type
Iterator difference type.
MessageHeader::TemplateId MessageTemplateId
Aliases message type (template) identification.
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
BinaryMessage()
Initializes blank instance referencing to nothing.
Enumeration::Enum enumeration(BlockSize offset) const
Returns value of a field by its offset.
const Entry & reference
Aliases entry reference for STL conformance.
GroupSizeType BinarySize
Length of group data.
BinaryGroup(const void *data, BinarySize size, 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.
GroupSizeType BinarySize
Length of group data.
EntryType Entry
Aliases type of object referenced by iterator.
MessageTemplateId templateId() const
Template identifier of message being referenced.
StrRef fixedStr(BlockSize offset, SchemaVersion since) const
Provides access to an optional field of string type by its offset.
BodySize bodySize() const
Indicates end of group entry body.
DimensionType::BlockLength EntrySize
Length of group entry data.
Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance)
Returns pointer which is lower than given one to a given number of bytes.
BinaryFields()
Initializes blank instance.
BinaryMessage(const void *data, MessageSize size)
Initializes instance over given memory block.
Provides iterating facilities over SBE-encoded group entries.
BinaryGroup()
Initializes blank instance referencing to nothing.
std::random_access_iterator_tag iterator_category
Identifies iterator category.
Attributes of SBE message schema.
Dimension::NumInGroup Size
Size of group (number of entries).
BinaryGroupWithNested(const void *data, BinarySize size, SchemaVersion version)
Initializes instance referencing to a valid group of a given message.
GroupList groups() const
Returns list of repeating groups of a message being referenced.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
char Char
Character type alias.
bool fixedStr(StrRef &value, BlockSize offset) const
Provides access to an optional field of string type by its offset.
void throwBadMessageVersion(SchemaVersion messageVersion)
Raises exception on bad message version.
MessageHeader::BlockLength BodySize
Length of message body without repeating groups.
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
BinaryGroupEntry(const void *body, BodySize size, SchemaVersion version)
Initializes instance from memory block of given SBE-encoded message.
BinaryGroupList()
Initializes empty list.
bool decimal(Decimal &value, BlockSize offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
Iterator()
Initializes instance referring to nothing.
Provides iterating facilities over SBE-encoded group entries.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null) const
Provides access to a value of an optional field by its offset.
const void * binary() const
SBE-encoded content referenced by given list.
GroupList groups() const
Returns list of repeating groups of a entry being referenced.
UInt16 MessageSize
Aliases message length type.
BodySize bodySize() const
Size of message body in bytes.
const void * binary() const
SBE-encoded data representing repeating group.
DimensionType::BlockLength EntrySize
Length of group entry data.
const Entry & reference
Aliases entry reference for STL conformance.
~BinaryFields()
Cleans everything up.
const Entry value_type
Aliases entry for STL conformance.
BinaryGroupList tail() const
Returns list of groups following the head.
BinaryGroupList(const BinaryGroupList &other)
Initializes as copy of other list.
Iterator(const void *entry, EntrySize size, SchemaVersion version)
Initializes instance for given repeating group.
bool empty() const
Indicates whether group list is empty.
void throwBadBinaryData(const Char *className)
Throws exception on bad 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.
ptrdiff_t difference_type
Iterator difference type.
DimensionType Dimension
Aliases repeating group dimension type.
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
const void * binary() const
SBE-encoded message content.
SchemaVersion version() const
Version of message being referenced.
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
MessageSize binarySize() const
Size of SBE-encoded message.
const void * body() const
Indicates beginning of group entry body.
std::forward_iterator_tag iterator_category
Identifies iterator category.
BodySizeType BodySize
Type to present length of binary data of given repeating group entry.
#define ONIXS_CMESTREAMLINEDMDH_NULLPTR
Provides efficient way of accessing text-based FIX field values.
EntryType Entry
Aliases type of repeating group entry.
A real number with floating exponent.
const void * entries() const
Location of repeating group entries.
Iterator()
Initializes instance referring to nothing.
BinarySize binarySize() const
Size of SBE-encoded content referenced by the list.
BinaryGroupList< MessageSize > GroupList
Binary group list instantiation.
Encapsulates services for manipulating SBE-encoded groups stored sequentially in SBE-encoded message...
DimensionType Dimension
Aliases repeating group dimension type.
MessageSize BlockLength
Length of message body representing a block of fixed-length fields.
EntrySize entrySize() const
Size in bytes of single repeating group entry.
BinaryMessage(const BinaryMessage &other)
Initializes instance as copy of the other one.
const void * binary() const
SBE-encoded data representing repeating group.
const Entry value_type
Aliases entry for STL conformance.
BinarySize binarySize() const
Size of SBE-encoded data representing repeating group.
const FieldValue & ordinary(BlockSize offset) const
Returns value of a field by its offset.
Decimal decimal(BlockSize offset) const
Returns value of a field by its offset converted into a decimal.
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
MessageSize EncodedLength
Length of message binary data.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
Provides access to a value of an optional field by its offset.
BinaryGroupEntry()
Initializes instance referring to nothing.
Encapsulates operations over SBE-encoded repeating group entry instance.
bool empty() const
Indicates whether a repeating group being referenced is empty.
Iterator(const Iterator &other)
Initializes instance as copy of the other one.
Iterator(const void *entry, EntrySize size, SchemaVersion version)
Initializes instance for given repeating group.
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan)
Adds time interval to given time point.
EntrySize entrySize() const
Size in bytes of single repeating group entry.
const Entry * pointer
Aliases pointer to entry for STL conformance.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN