33 template <
template<
class>
class Block,
class FieldAccessor>
40 Block<FieldAccessor>& block()
41 ONIXS_SGX_OUCH_NOTHROW
43 return *
static_cast<Block<FieldAccessor>*
>(
this);
48 template<
class FieldValue>
50 ONIXS_SGX_OUCH_NOTHROW
52 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
56 FieldAccessor::set(fieldPos, value);
60 template <
class FieldValue>
62 ONIXS_SGX_OUCH_NOTHROW
64 assert(block().binarySize() >= (offset +
sizeof(FieldValue)));
65 assert(
sizeof(FieldValue) == 1);
67 *static_cast <FieldValue*>(
advanceByBytes(block().binary(), offset)) = value;
71 template<
class Enumeration>
73 ONIXS_SGX_OUCH_NOTHROW
75 typedef typename Enumeration::Base Base;
76 setOrdinaryRef<Base>(offset,
static_cast<Base
>(value));
79 template<BlockSize Size>
81 ONIXS_SGX_OUCH_NOTHROW
83 assert(block().binarySize() >= (offset + Size));
87 const BlockSize size = std::min(Size, static_cast<BlockSize>(value.size()));
89 memcpy(fieldPos, value.items(), size);
95 template <
typename Accessor>
110 ONIXS_SGX_OUCH_NOTHROW
116 ONIXS_SGX_OUCH_NOTHROW
123 ONIXS_SGX_OUCH_NOTHROW
132 ONIXS_SGX_OUCH_NOTHROW
145 ONIXS_SGX_OUCH_NOTHROW
151 #if defined(ONIXS_SGX_OUCH_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_SGX_OUCH_COMPILER_CXX_RVALUE_REFERENCES
void setEnumeration(BlockSize offset, typename Enumeration::Enum value)
Returns value of a field by its offset.
MutableBinaryMessage(void *data, MessageSize size)
Initializes instance over given memory block.
const void * binary() const
Message content.
Type * advanceByBytes(Type *pointer, ptrdiff_t distance)
Advances given pointer to a given offset (distance) in bytes.
Binary2 MessageSize
Aliases message length type.
void setOrdinaryRef(BlockSize offset, FieldValue value)
Assigns value of a field by its offset.
MessageSize binarySize() const
Size of message.
MessageSize BinarySize
Length of message binary data.
Encapsulates services for manipulating little endian encoded messages.
Provides efficient way of accessing text-based FIX field values.
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_END
void setFixedStr(BlockSize offset, const StrRef &value)
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_BEGIN
void setOrdinary(BlockSize offset, FieldValue value)
Assigns value of a field by its offset.