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)
140 const NullValue& null,
144 since <= block().version()
146 ordinary(value, offset, null)
161 BlockSize offset)
const 175 ordinary<Base>(offset));
191 Enumeration::Enum& value,
193 const NullValue& null)
const 205 const Base& fieldValue =
206 ordinary<Base>(offset);
208 if (null != fieldValue)
210 value =
static_cast<Enum
>(fieldValue);
231 Enumeration::Enum& value,
233 const NullValue& null,
237 since <= block().version()
239 enumeration(value, offset, null)
251 BlockSize offset)
const 276 const NullValue& null)
const 283 const FieldValue& fieldValue =
284 ordinary<FieldValue>(offset);
286 if (null != fieldValue)
317 const NullValue& null,
321 since <= block().version()
323 decimal(value, offset, null)
337 BlockSize offset)
const 339 typedef Char Str[Size];
342 ordinary<Str>(offset);
370 ? fixedStr<Size>(offset)
377 ONIXS_CMEMDH_EXPORTED
380 const Char* className);
429 assert(NULL != body);
450 operator bool()
const 452 return (NULL != body_);
482 version_ = other.version_;
489 ONIXS_CMEMDH_EXPORTED
515 DimensionType::BlockLength
522 Dimension::NumInGroup
552 std::random_access_iterator_tag
587 const Entry
get()
const 589 assert(NULL != entry_);
599 const Entry operator *()
const 609 return entry_ == other.entry_;
617 return entry_ != other.entry_;
625 return entry_ < other.entry_;
633 return entry_ > other.entry_;
662 difference_type distance)
const 676 difference_type distance)
const 692 entry_ = other.entry_;
695 version_ = other.version_;
724 , size_(Dimension::
Size)
737 group->blockLength();
774 operator bool()
const 776 return (NULL != entries_);
817 Entry operator [](
Size index)
const 819 assert(index < size());
836 entries_, Dimension::Size)
863 entries_ = other.entries_;
865 entrySize_ = other.entrySize_;
866 entryCount_ = other.entryCount_;
868 version_ = other.version_;
875 const void* entries_;
962 assert(headSize <= size_);
989 binary_ = other.binary_;
992 version_ = other.version_;
1003 throw std::runtime_error(
1004 "Cannot construct message instance. Memory " 1005 "block is too small to access SBE message header. ");
1009 ONIXS_CMEMDH_EXPORTED
1044 assert(NULL != header_);
1049 body(), bodySize());
1055 MessageHeader::Size -
1091 assert(NULL != data);
1097 (MessageHeader::Size +
1105 version = this->version();
1108 SchemaTraits::minimalVersion())
1116 const BinaryMessage& other)
1117 : header_(other.header_)
1118 , size_(other.size_)
1123 operator bool()
const 1125 return (NULL != header_);
1131 assert(NULL != header_);
1139 assert(NULL != header_);
1159 assert(NULL != header_);
1164 MessageHeader::Size);
1170 assert(NULL != header_);
1178 const BinaryMessage& other)
1180 header_ = other.header_;
1181 size_ = other.size_;
#define ONIXS_CMEMDH_LTWT_CLASS
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Iterator end() const
Returns iterator pointing to the entry behind the end of the group.
const FieldValue & ordinary(BlockSize offset) const
Returns value of a field by its offset.
const Entry & reference
Aliases entry reference for STL conformance.
Group head() const
Provides access to the head group of the list.
BinaryMessage(const void *data, MessageSize size)
Initializes instance over given memory block.
bool empty() const
Indicates whether group list is empty.
bool enumeration(typename Enumeration::Enum &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
EntryType Entry
Aliases type of repeating group entry.
GroupSizeType BinarySize
Length of group data.
ONIXS_CMEMDH_EXPORTED void throwBadMessageVersion(SchemaVersion messageVersion)
Raises exception on bad message version.
const void * binary() const
SBE-encoded content referenced by given list.
ONIXS_CMEMDH_EXPORTED void throwBadBinaryData(const Char *className)
Throws exception on bad repeating group entry.
BinaryMessage()
Initializes blank instance referencing to nothing.
BinaryGroupList()
Initializes empty list.
BinaryGroupEntry()
Initializes instance referring to nothing.
Dimension::NumInGroup Size
Size of group (number of entries).
BodySize bodySize() const
Indicates end of group entry body.
const void * binary() const
SBE-encoded data representing repeating group.
DimensionType::BlockLength EntrySize
Length of group entry data.
const void * body() const
Indicates beginning of message body.
Enumeration::Enum enumeration(BlockSize offset) const
bool decimal(Decimal &value, BlockSize offset, const NullValue &null) const
BinaryGroupEntry(const BinaryGroupEntry &other)
Initializes instance as a copy of the other one.
bool decimal(Decimal &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
Iterator()
Initializes instance referring to nothing.
ONIXS_CMEMDH_EXPORTED void throwBadBinaryGroup()
Throws exception on bad repeating group.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null, SchemaVersion since) const
char Char
Character type alias.
UInt16 MessageSize
Aliases message length type.
BinarySize binarySize() const
Size of SBE-encoded content referenced by the list.
BodySize bodySize() const
Size of message body in bytes.
std::random_access_iterator_tag iterator_category
Identifies iterator category.
BinaryMessage(const BinaryMessage &other)
Initializes instance as copy of the other one.
SchemaVersion version() const
bool operator>(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
bool ordinary(FieldValue &value, BlockSize offset, const NullValue &null) const
BinaryFields()
Initializes blank instance.
MessageTemplateId templateId() const
Template identifier of message being referenced.
BinaryGroupList< MessageSize > GroupList
Binary group list instantiation.
Decimal decimal(BlockSize offset) const
Provides efficient way of accessing text-based FIX field values.
const void * binary() const
SBE-encoded message content.
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
EntryType Entry
Aliases type of object referenced by iterator.
const Entry value_type
Aliases entry for STL conformance.
A real number with floating exponent.
Timestamp operator+(const Timestamp ×tamp, const TimeSpan &timeSpan)
Adds time interval to given time point.
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
BinaryGroupList tail() const
Returns list of groups following the head.
StrRef fixedStr(BlockSize offset, SchemaVersion since) const
StrRef fixedStr(BlockSize offset) const
ptrdiff_t difference_type
Iterator difference type.
BinaryGroup()
Initializes blank instance referencing to nothing.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
Attributes of SBE message schema.
BinaryGroupList(const BinaryGroupList &other)
Initializes as copy of other list.
Encapsulates services for manipulating SBE-encoded messages.
MessageHeader::BlockLength BodySize
Length of message body without repeating groups.
BinaryGroup(const void *data, BinarySize size, SchemaVersion version)
BinaryGroupEntry(const void *body, BodySize size, SchemaVersion version)
BinarySize binarySize() const
Size of SBE-encoded data representing repeating group.
Encapsulates operations over SBE-encoded repeating group.
EntrySize entrySize() const
Size in bytes of single repeating group entry.
bool operator<(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
DimensionType Dimension
Aliases repeating group dimension type.
bool enumeration(typename Enumeration::Enum &value, BlockSize offset, const NullValue &null) const
Iterator begin() const
Returns iterator pointing to the first repeating group entry.
const void * entries() const
Location of repeating group entries.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
Type * advanceBackByBytes(Type *pointer, ptrdiff_t distance)
Timestamp operator-(const Timestamp ×tamp, const TimeSpan &timeSpan)
Subtracts time interval from given time point.
MessageSize binarySize() const
Size of SBE-encoded message.
Iterator(const void *entry, EntrySize size, SchemaVersion version)
Initializes instance for given repeating group.
const void * body() const
Indicates beginning of group entry body.
SchemaVersion version() const
Version of message being referenced.
MessageHeader::TemplateId MessageTemplateId
Aliases message type (template) identification.
Iterator(const Iterator &other)
Initializes instance as copy of the other one.
BinaryGroupList(const void *binary, BinarySize size, SchemaVersion version)
const Entry * pointer
Aliases pointer to entry for STL conformance.
BinaryGroup(const BinaryGroup &other)
Initializes instance as a copy of the other one.
void throwBadBinaryMessage()
Raises exception on bad binary message.
~BinaryFields()
Cleans everything up.
MessageSize BinarySize
Length of message binary data.
#define ONIXS_CMEMDH_NAMESPACE_END