25#include <OnixS/FmxUST/MarketData/Bimp/Export.h>
40 template <
class FieldValue>
49 template<
class MantissaType,
class ExponentType>
63 template <
class Block,
class BlockSize>
68 const Block& block()
const
71 return *
static_cast<const Block*
>(
this);
76 template <
class SubMessage>
77 const SubMessage
submessage(BlockSize offset, BlockSize size)
const
80 assert(block().binarySize() >= (offset + size));
87 template <
class FieldValue>
91 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
97 template <
class FieldValue>
101 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
104 *
static_cast <const FieldValue*
>(
advanceByBytes(block().binary(), offset));
111 template <
class Enumeration>
115 typedef typename Enumeration::Base Base;
117 typedef typename Enumeration::Enum Enum;
126 template <BlockSize Size>
130 typedef Char Str[Size];
134 return StrRef(str, strnlen(str, Size));
177 operator bool() const
212#if defined(ONIXS_FMXUST_BIMP_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_FMXUST_BIMP_COMPILER_CXX_RVALUE_REFERENCES
216 : data_(std::move(other.data_))
217 , size_(std::move(other.size_))
223 BinaryMessage&& other)
229 data_ = std::move(other.data_);
230 size_ = std::move(other.size_);
238 ONIXS_FMXUST_BIMP_API
239 ONIXS_FMXUST_BIMP_COLDPATH
240 ONIXS_FMXUST_BIMP_NORETURN
#define ONIXS_FMXUST_BIMP_NOTHROW
#define ONIXS_FMXUST_BIMP_EXPLICIT
#define ONIXS_FMXUST_BIMP_NULLPTR
StrRef fixedStr(BlockSize offset) const ONIXS_FMXUST_BIMP_NOTHROW
Enumeration::Enum enumeration(BlockSize offset) const ONIXS_FMXUST_BIMP_NOTHROW
const SubMessage submessage(BlockSize offset, BlockSize size) const ONIXS_FMXUST_BIMP_NOTHROW
Returns sub message.
const FieldValue & ordinaryRef(BlockSize offset) const ONIXS_FMXUST_BIMP_NOTHROW
Returns value of a field by its offset.
FieldValue ordinary(BlockSize offset) const ONIXS_FMXUST_BIMP_NOTHROW
Returns value of a field by its offset.
Encapsulates services for manipulating little endian encoded messages.
MessageSize BinarySize
Length of message binary data.
MessageSize binarySize() const ONIXS_FMXUST_BIMP_NOTHROW
Size of message.
BinaryMessage() ONIXS_FMXUST_BIMP_NOTHROW
Initializes blank instance referencing to nothing.
BinaryMessage(const void *data, MessageSize size) ONIXS_FMXUST_BIMP_NOTHROW
Initializes instance over given memory block.
const void * binary() const ONIXS_FMXUST_BIMP_NOTHROW
Message content.
BinaryMessage(const BinaryMessage &other) ONIXS_FMXUST_BIMP_NOTHROW
Initializes instance as copy of the other one.
MantissaType Mantissa
Aliases mantissa component type.
Provides efficient way of accessing text-based FIX field values.
ONIXS_FMXUST_BIMP_API ONIXS_FMXUST_BIMP_COLDPATH ONIXS_FMXUST_BIMP_NORETURN void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
Integer2 MessageSize
Aliases message length type.
char Char
Character type alias.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance) ONIXS_FMXUST_BIMP_NOTHROW
Advances given pointer to a given offset (distance) in bytes.
FieldValue unalignedCopy(const void *p) ONIXS_FMXUST_BIMP_NOTHROW