25#include <OnixS/LSE/MarketData/GTP/Export.h>
45 template <
class Block,
class BlockSize>
50 const Block& block()
const
53 return *
static_cast<const Block*
>(
this);
58 template <
class FieldValue>
62 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
69 template <
class FieldValue>
73 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
76 *
static_cast <const FieldValue*
>(
advanceByBytes(block().binary(), offset));
83 template <
class Enumeration>
84 typename Enumeration::Enum
enumeration(BlockSize offset)
const
87 typedef typename Enumeration::Base Base;
89 typedef typename Enumeration::Enum Enum;
98 template <BlockSize Size>
147 operator bool() const
182#if defined(ONIXS_LSE_GTP_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_LSE_GTP_COMPILER_CXX_RVALUE_REFERENCES
186 : data_(std::move(other.data_))
187 , size_(std::move(other.size_))
193 BinaryMessage&& other)
199 data_ = std::move(other.data_);
200 size_ = std::move(other.size_);
#define ONIXS_LSE_GTP_NULLPTR
#define ONIXS_LSE_GTP_NOTHROW
#define ONIXS_LSE_GTP_EXPLICIT
Enumeration::Enum enumeration(BlockSize offset) const ONIXS_LSE_GTP_NOTHROW
const FieldValue & ordinaryRef(BlockSize offset) const ONIXS_LSE_GTP_NOTHROW
Returns value of a field by its offset.
FieldValue ordinary(BlockSize offset) const ONIXS_LSE_GTP_NOTHROW
Returns value of a field by its offset.
StrRef fixedStr(BlockSize offset) const ONIXS_LSE_GTP_NOTHROW
Encapsulates services for manipulating little endian encoded messages.
MessageSize BinarySize
Length of message binary data.
BinaryMessage(const void *data, MessageSize size) ONIXS_LSE_GTP_NOTHROW
Initializes instance over given memory block.
MessageSize binarySize() const ONIXS_LSE_GTP_NOTHROW
Size of message.
BinaryMessage() ONIXS_LSE_GTP_NOTHROW
Initializes blank instance referencing to nothing.
BinaryMessage(const BinaryMessage &other) ONIXS_LSE_GTP_NOTHROW
Initializes instance as copy of the other one.
const void * binary() const ONIXS_LSE_GTP_NOTHROW
Message content.
Provides efficient way of accessing text-based FIX field values.
ONIXS_LSE_GTP_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
char Char
Character type alias.
FieldValue unalignedCopy(const void *p) ONIXS_LSE_GTP_NOTHROW
FixedPointDecimal< UInt64, IntegralConstant< Int8, -8 > > Size
Little-Endian encoded 64 bit unsigned integer with eight implied decimal places.
UInt16 MessageSize
Aliases message length type.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance) ONIXS_LSE_GTP_NOTHROW
Advances given pointer to a given offset (distance) in bytes.