OnixS C++ B3 Binary UMDF Market Data Handler 1.10.0
Users' manual and API documentation
Loading...
Searching...
No Matches
SbeFields< Container, BlockLength > Class Template Reference

#include <OnixS/B3/MarketData/UMDF/messaging/SbeMessage.h>

Public Member Functions

Container & container () noexcept
 __attribute__ ((__hot__)) void zeroPaddingBytes(BlockLength offset) noexcept
template<class FieldValue>
 __attribute__ ((__hot__)) void setOrdinary(BlockLength offset
 setValue (fieldPos, value)
template<class FieldValue>
 __attribute__ ((__hot__)) void setOrdinary(BlockLength offset
 setOrdinary (offset, value)
template<class Enumeration>
 __attribute__ ((__hot__)) void setEnumeration(BlockLength offset
 setOrdinary (offset, static_cast< Base >(value))
template<class Enumeration>
 __attribute__ ((__hot__)) void setEnumeration(BlockLength offset
 setOrdinary (offset, static_cast< Base >(value), since)
template<BlockLength Size>
 __attribute__ ((__hot__)) void setFixedStr(BlockLength offset
 assert (value.size()<=Size &&"The string is truncated.")
if(sizeToCopy > 0) std std::memset (advanceByBytes(fieldPos, sizeToCopy), 0, Size - sizeToCopy)
template<BlockLength Size>
 __attribute__ ((__hot__)) void setFixedStr(BlockLength offset
 setFixedStr (offset, value)

Public Attributes

FieldValue value noexcept
void *const fieldPos = advanceByBytes(container().block(), offset)
FieldValue value
FieldValue SchemaVersion since
Enumeration::Enum value noexcept
Enumeration::Enum value
Enumeration::Enum SchemaVersion since
StrRef value noexcept
const size_t sizeToCopy = (std::min)(Size, static_cast<BlockLength>(value.size()))
StrRef value
StrRef SchemaVersion since

Protected Member Functions

 SbeFields ()=default
 ~SbeFields ()=default
Protected Member Functions inherited from BinaryBlock< Container, BlockLength >
 BinaryBlock ()=default
 ~BinaryBlock ()=default
template<class Value>
 __attribute__ ((__hot__)) Value ordinary(BlockLength offset) const noexcept
template<class Value, class NullValue>
 __attribute__ ((__hot__)) bool ordinary(Value &value
 return (null !=value)
template<class Value, class NullValue>
 __attribute__ ((__hot__)) bool ordinary(Value &value

Additional Inherited Members

Protected Attributes inherited from BinaryBlock< Container, BlockLength >
BlockLength offset
BlockLength NullValue null const noexcept
BlockLength NullValue null
BlockLength NullValue SchemaVersion since const noexcept

Detailed Description

template<class Container, class BlockLength>
class OnixS::B3::MarketData::UMDF::Messaging::SbeFields< Container, BlockLength >

This class represents an abstraction to be used by descendants as a base class with static polymorphism.

Definition at line 204 of file SbeMessage.h.

Constructor & Destructor Documentation

◆ SbeFields()

template<class Container, class BlockLength>
SbeFields ( )
protecteddefault

Initializes a blank instance.

◆ ~SbeFields()

template<class Container, class BlockLength>
~SbeFields ( )
protecteddefault

Member Function Documentation

◆ __attribute__() [1/7]

template<class Container, class BlockLength>
template<class Enumeration>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [2/7]

template<class Container, class BlockLength>
template<class Enumeration>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [3/7]

template<class Container, class BlockLength>
template<BlockLength Size>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [4/7]

template<class Container, class BlockLength>
template<BlockLength Size>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [5/7]

template<class Container, class BlockLength>
template<class FieldValue>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [6/7]

template<class Container, class BlockLength>
template<class FieldValue>
__attribute__ ( (__hot__) )

Sets the field value.

◆ __attribute__() [7/7]

template<class Container, class BlockLength>
__attribute__ ( (__hot__) )
inlinenoexcept

If specified, the extra space is padded at the end of each entry and should be set to zeroes by encoders.

Definition at line 214 of file SbeMessage.h.

◆ assert()

template<class Container, class BlockLength>
assert ( value.size()<=Size &&"The string is truncated." )

◆ container()

template<class Container, class BlockLength>
Container & container ( )
inlinenoexcept
Returns
The block container that provides access to the encoded data.

Definition at line 208 of file SbeMessage.h.

◆ setFixedStr()

template<class Container, class BlockLength>
setFixedStr ( offset ,
value  )

◆ setOrdinary() [1/3]

template<class Container, class BlockLength>
setOrdinary ( offset ,
static_cast< Base > value )

◆ setOrdinary() [2/3]

template<class Container, class BlockLength>
setOrdinary ( offset ,
static_cast< Base > value,
since  )

◆ setOrdinary() [3/3]

template<class Container, class BlockLength>
setOrdinary ( offset ,
value  )

◆ setValue()

template<class Container, class BlockLength>
setValue ( fieldPos ,
value  )

◆ std::memset()

template<class Container, class BlockLength>
if(sizeToCopy > 0) std std::memset ( advanceByBytes(fieldPos, sizeToCopy) ,
0 ,
Size - sizeToCopy )

Member Data Documentation

◆ fieldPos

template<class Container, class BlockLength>
void *const fieldPos = advanceByBytes(container().block(), offset)

Definition at line 231 of file SbeMessage.h.

◆ noexcept [1/3]

template<class Container, class BlockLength>
FieldValue value noexcept
Initial value:
{
assert(container().blockLength() >= (offset + size<FieldValue>()) && "The requested field exceeds provided block boundaries.")
assert(value.size()<=Size &&"The string is truncated.")

Definition at line 227 of file SbeMessage.h.

◆ noexcept [2/3]

template<class Container, class BlockLength>
Enumeration::Enum value noexcept
Initial value:
{
typedef typename Enumeration::Base Base

Definition at line 247 of file SbeMessage.h.

◆ noexcept [3/3]

template<class Container, class BlockLength>
StrRef value noexcept
Initial value:
{
assert(container().blockLength() >= (offset + Size) && "The requested field exceeds provided block boundaries.")

Definition at line 263 of file SbeMessage.h.

◆ since [1/3]

template<class Container, class BlockLength>
FieldValue SchemaVersion since
Initial value:
{
if (__builtin_expect((static_cast<bool>((since > container().version()))), false))
throwDisallowedField()

Definition at line 237 of file SbeMessage.h.

◆ since [2/3]

template<class Container, class BlockLength>
Enumeration::Enum SchemaVersion since
Initial value:
{
typedef typename Enumeration::Base Base

Definition at line 255 of file SbeMessage.h.

◆ since [3/3]

template<class Container, class BlockLength>
StrRef SchemaVersion since
Initial value:
{
if (__builtin_expect((static_cast<bool>((since > container().version()))), false))
throwDisallowedField()

Definition at line 279 of file SbeMessage.h.

◆ sizeToCopy

template<class Container, class BlockLength>
const size_t sizeToCopy = (std::min)(Size, static_cast<BlockLength>(value.size()))

Definition at line 269 of file SbeMessage.h.

◆ value [1/3]

template<class Container, class BlockLength>
FieldValue value

Definition at line 237 of file SbeMessage.h.

◆ value [2/3]

template<class Container, class BlockLength>
Enumeration::Enum value

Definition at line 255 of file SbeMessage.h.

◆ value [3/3]

template<class Container, class BlockLength>
StrRef value

Definition at line 279 of file SbeMessage.h.