OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
News Struct Reference

Public Types

enum  
typedef SchemaTraits Schema
typedef News ThisType
Public Types inherited from SbeMessage
typedef MessageSize EncodedLength
typedef MessageSize BlockLength

Public Member Functions

 News ()=default
 News (void *data, EncodedLength length, SchemaVersion version=Schema::Version)
 News (void *data, EncodedLength length, NoFieldsInit, SchemaVersion version=Schema::Version)
 News (void *data, EncodedLength length, NoInit)
 News (SbeMessage message)
 News (void *data, EncodedLength length, NoInit, NoCheck) noexcept
auto userId () const noexcept
ThisTypeuserId (StrRef value) noexcept
auto exchangeCode () const noexcept
ThisTypeexchangeCode (Int32NULL value) noexcept
ThisTypeexchangeCode (NullOpt) noexcept
StrRef text () const noexcept
ThisTypetext (StrRef value)
ThisTyperesetVariableFields () noexcept
ThisTypereset () noexcept
std::string toString () const
const void * tail () const noexcept
EncodedLength calculateBinarySize () const noexcept
Public Member Functions inherited from SbeMessage
 SbeMessage () noexcept
 SbeMessage (void *data, MessageSize size, SchemaVersion version)
 SbeMessage (void *data, MessageSize size)
 SbeMessage (void *data, MessageSize size, NoCheck) noexcept
void clear () noexcept
bool valid () const noexcept
 operator bool () const noexcept
MessageTemplateId templateId () const noexcept
SchemaVersion version () const noexcept
SchemaId schemaId () const noexcept
SequenceId sequenceId () const noexcept
SbeMessagesequenceId (SequenceId value) noexcept
Timestamp sendTime () const noexcept
SbeMessagesendTime (Timestamp value) noexcept
HeaderFlags headerFlags () const noexcept
SbeMessageheaderFlags (HeaderFlags value) noexcept
const void * binary () const noexcept
void * binary () noexcept
const void * blockEnd () noexcept
const void * blockEnd () const noexcept
MessageSize bufferSize () const noexcept
void * body () noexcept
BlockLength blockLength () const noexcept
const void * block () const noexcept
void * block () noexcept
Public Member Functions inherited from SbeFields< Messaging::SbeMessage, MessageSize >
ONIXS_ICEBOE_FORCEINLINE Messaging::SbeMessagecontainer () noexcept
void zeroPaddingBytes (MessageSize offset) noexcept
ONIXS_ICEBOE_FORCEINLINE void setOrdinary (MessageSize offset, FieldValue value) noexcept
ONIXS_ICEBOE_FORCEINLINE void setEnumeration (MessageSize offset, Enumeration value) noexcept
ONIXS_ICEBOE_FORCEINLINE void setFixedStr (MessageSize offset, StrRef value) noexcept

Static Public Member Functions

static constexpr BlockLength minimalBlockLength (SchemaVersion version) noexcept
static constexpr BlockLength blockLength (SchemaVersion version) noexcept
static constexpr MessageSize getMinimalVariableFieldsSize (SchemaVersion version)
static constexpr UInt64 getMaxMessageSize (UInt8) noexcept
static constexpr StrRef className () noexcept
static constexpr StrRef fixType () noexcept

Additional Inherited Members

Protected Types inherited from SbeMessage
typedef SbeGroupList< MessageSizeGroupList
typedef SbeVariableLengthFieldList< MessageSizeVariableLengthFieldList
Protected Member Functions inherited from SbeMessage
SbeMessageversion (SchemaVersion version) noexcept
GroupList groups () noexcept
GroupList groups () const noexcept
template<typename Group>
void initGroup (Group &group, typename Group::EntrySize entrySize) noexcept
template<typename Group>
void setupGroup (Group &group, typename Group::Size entryCount, const void *messageTail)
template<typename Group>
void constructGroup (Group &group, typename Group::Size entryCount, const void *messageTail)
template<typename DATA>
void setVarDataField (DATA &data, StrRef value, const void *oldMessageTail)
VariableLengthFieldList variableLengthFields () noexcept
VariableLengthFieldList variableLengthFields () const noexcept
void init (MessageHeader::TemplateId value, MessageHeader::BlockLength minimalBlockLength, MessageHeader::BlockLength blockLength, SchemaId id) noexcept
MessageSize calculateBinarySize (const void *tail) const noexcept
template<class Callable, class Owner>
void setVariableLengthField (Callable callable, StrRef value, Owner &owner)
template<class Callable, class Owner>
void setVariableLengthField (Callable callable, StrRef value, SchemaVersion since, Owner &owner)
template<class Callable, class Owner>
StrRef getVariableLengthField (Callable callable, const Owner &owner) const noexcept
template<class Callable, class Owner>
StrRef getVariableLengthField (Callable callable, SchemaVersion since, Owner &owner) const noexcept
template<class Callable, class Owner>
void setVariableLengthFieldToNull (Callable callable, Owner &owner) noexcept
template<class Group, class Callable, class Owner>
void resetGroup (Callable callable, Owner &owner) noexcept
template<class Callable, class Owner>
void setVariableLengthFieldToNull (Callable callable, SchemaVersion since, Owner &owner) noexcept
template<class Group, class Callable, class Owner>
void resetGroup (Callable callable, SchemaVersion since, Owner &owner)
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group getGroup (Callable callable, Owner &owner) const noexcept
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group getGroup (Callable callable, SchemaVersion since, Owner &owner) const noexcept
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group constructGroup (Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
template<class Group, class Callable, class Owner>
ONIXS_ICEBOE_FORCEINLINE Group constructGroup (Callable callable, typename Group::Size length, Owner &owner)
template<class Group, class Callable, class Owner>
Group setupGroup (Callable callable, typename Group::Size length, SchemaVersion since, Owner &owner)
template<class Group, class Callable, class Owner>
Group setupGroup (Callable callable, typename Group::Size length, Owner &owner)
Protected Member Functions inherited from SbeFields< Messaging::SbeMessage, MessageSize >
 SbeFields ()=default
 ~SbeFields ()=default
Protected Member Functions inherited from BinaryBlock< Messaging::SbeMessage, MessageSize >
 BinaryBlock ()=default
 ~BinaryBlock ()=default
ONIXS_ICEBOE_FORCEINLINE Value ordinary (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE Enumeration enumeration (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE StrRef fixedStr (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE Value decimal (MessageSize offset) const noexcept
ONIXS_ICEBOE_FORCEINLINE std::enable_if<!isComposite< typenameNullValue::Value >::value, SbeOptionalConverted< decltype(std::declval< Callable >()(std::declval< typenameArgType< Callable >::type >()))> >::type convertible (MessageSize offset, OptionalTag) const noexcept(noexcept(Callable::Nothrow))
Protected Member Functions inherited from BinaryBlockBase
 ~BinaryBlockBase ()=default
Static Protected Member Functions inherited from SbeMessage
static constexpr MessageSize getMaxMessageSize () noexcept

Detailed Description

Definition at line 1638 of file Messages.h.

Member Typedef Documentation

◆ Schema

Used template schema.

Definition at line 1643 of file Messages.h.

◆ ThisType

typedef News ThisType

This type alias.

Definition at line 1646 of file Messages.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Message template ID from SBE schema.

Enumerator
TemplateId 116 

Definition at line 1649 of file Messages.h.

1649{ TemplateId = 116 };

Constructor & Destructor Documentation

◆ News() [1/6]

News ( )
default

Initializes a blank instance.

◆ News() [2/6]

News ( void * data,
EncodedLength length,
SchemaVersion version = Schema::Version )
inline

Initializes an instance over the given memory block.

Definition at line 1655 of file Messages.h.

1656 : SbeMessage(data, length, version)
1657 {
1658 checkVersion<Schema>(version);
1659 checkLength(length, version);
1660 init(TemplateId, minimalBlockLength(version), blockLength(version), Schema::Id);
1661 reset();
1662 }

◆ News() [3/6]

News ( void * data,
EncodedLength length,
NoFieldsInit ,
SchemaVersion version = Schema::Version )
inline

Initializes an instance over the given memory block With no variable-length fields initialization It is assumed that the user does such an initialization manually.

Definition at line 1667 of file Messages.h.

1668 : SbeMessage(data, length, version)
1669 {
1670 checkVersion<Schema>(version);
1671 checkLength(length, version);
1672 init(TemplateId, minimalBlockLength(version), blockLength(version), Schema::Id);
1673 resetVariableFields();
1674 }

◆ News() [4/6]

News ( void * data,
EncodedLength length,
NoInit  )
inline

Creates an instance over the given memory block.

Definition at line 1677 of file Messages.h.

1678 : SbeMessage(data, length)
1679 {
1680 checkCompatibility();
1681 }

◆ News() [5/6]

News ( SbeMessage message)
inlineexplicit

Creates an instance over the given SBE message.

Definition at line 1685 of file Messages.h.

1686 : SbeMessage(message)
1687 {
1688 assert(message.valid());
1689
1690 checkCompatibility();
1691 }

◆ News() [6/6]

News ( void * data,
EncodedLength length,
NoInit ,
NoCheck  )
inlinenoexcept

Creates an instance over the given memory block.

Performs no checks.

Definition at line 1695 of file Messages.h.

1696 : SbeMessage(data, length, NoCheck())
1697 {
1698 assert(schemaId() == Schema::Id);
1699 assert(version() >= Schema::MinimalVersion);
1700 assert(TemplateId == templateId());
1701 }
const char * version() noexcept

Member Function Documentation

◆ blockLength()

constexpr BlockLength blockLength ( SchemaVersion version)
inlinestaticconstexprnoexcept

Size of message body in bytes.

Definition at line 1776 of file Messages.h.

1777 {
1778 return
1779 ONIXS_ICEBOE_ASSERT(version >= Schema::MinimalVersion),
1780 minimalBlockLength(version);
1781 }

◆ calculateBinarySize()

EncodedLength calculateBinarySize ( ) const
inlinenoexcept
Returns
the size occupied by the message.

Definition at line 1849 of file Messages.h.

1850 {
1851 return
1852 SbeMessage::calculateBinarySize(tail());
1853 }

◆ className()

constexpr StrRef className ( )
inlinestaticconstexprnoexcept
Returns
class name.

Definition at line 1821 of file Messages.h.

1822 {
1823 return constructStrRef("News");
1824 }
constexpr StrRef constructStrRef(const char(&value)[Size]) noexcept
Definition StrRef.h:414

◆ exchangeCode() [1/3]

auto exchangeCode ( ) const
inlinenoexcept

int32NULL.

Definition at line 1725 of file Messages.h.

1726 {
1727 constexpr BlockLength offset = 20;
1728
1729 return ordinary<NullInt32NULL>(offset, optional);
1730 }

◆ exchangeCode() [2/3]

ThisType & exchangeCode ( Int32NULL value)
inlinenoexcept

int32NULL.

Definition at line 1733 of file Messages.h.

1734 {
1735 constexpr BlockLength offset = 20;
1736
1737 setOrdinary(offset, value);
1738 return *this;
1739 }

◆ exchangeCode() [3/3]

ThisType & exchangeCode ( NullOpt )
inlinenoexcept

Definition at line 1741 of file Messages.h.

1742 {
1743 constexpr BlockLength offset = 20;
1744
1745 setOrdinary(offset, NullInt32NULL());
1746 return *this;
1747 }
IntegralConstant< Int32, -2147483647-1 > NullInt32NULL
Null value for an optional Int32NULL field.
Definition Fields.h:994

◆ fixType()

constexpr StrRef fixType ( )
inlinestaticconstexprnoexcept

FIX message type.

Definition at line 1829 of file Messages.h.

1830 {
1831 return constructStrRef("News");
1832 }

◆ getMaxMessageSize()

constexpr UInt64 getMaxMessageSize ( UInt8 )
inlinestaticconstexprnoexcept

Maximal message size.

Definition at line 1796 of file Messages.h.

1797 {
1798 return
1799 SbeMessage::getMaxMessageSize();
1800 }

◆ getMinimalVariableFieldsSize()

constexpr MessageSize getMinimalVariableFieldsSize ( SchemaVersion version)
inlinestaticconstexpr

Minimal variable fields size (when variable-length fields are empty).

Definition at line 1786 of file Messages.h.

1787 {
1788 return
1789 ONIXS_ICEBOE_ASSERT(version >= Schema::MinimalVersion),
1790 static_cast<MessageSize>(VarString16::Size);
1791 }
UInt16 MessageSize
Message length type.
Definition Aliases.h:29

◆ minimalBlockLength()

constexpr BlockLength minimalBlockLength ( SchemaVersion version)
inlinestaticconstexprnoexcept

Minimal size of message body in bytes.

Definition at line 1767 of file Messages.h.

1768 {
1769 return
1770 ONIXS_ICEBOE_ASSERT(version >= Schema::MinimalVersion),
1771 24;
1772 }

◆ reset()

ThisType & reset ( )
inlinenoexcept

Reset all variable-length and optional fields if any.

Definition at line 1810 of file Messages.h.

1811 {
1812 exchangeCode(nullOpt);
1813
1814 resetVariableFields();
1815 return *this;
1816 }

◆ resetVariableFields()

ThisType & resetVariableFields ( )
inlinenoexcept

Reset all variable-length fields if any.

Definition at line 1803 of file Messages.h.

1804 {
1805 text(nullOpt);
1806 return *this;
1807 }

◆ tail()

const void * tail ( ) const
inlinenoexcept
Returns
the end of the message.

Definition at line 1840 of file Messages.h.

1841 {
1842 return
1844 (text().end()));
1845 }
ONIXS_ICEBOE_FORCEINLINE void * toOpaquePtr(Type *ptr) noexcept
Makes the pointer an opaque one.
Definition Memory.h:51

◆ text() [1/2]

StrRef text ( ) const
inlinenoexcept

Definition at line 1750 of file Messages.h.

1751 {
1752 return getVariableLengthField(textAccess(), *this);
1753 }

◆ text() [2/2]

ThisType & text ( StrRef value)
inline

Definition at line 1755 of file Messages.h.

1756 {
1757 setVariableLengthField(
1758 textAccess(),
1759 value,
1760 *this);
1761
1762 return *this;
1763 }

◆ toString()

std::string toString ( ) const
inline
Returns
a human-readable presentation.

Definition at line 300 of file MessageSerialization.h.

301{
302 return toStr(*this);
303}
std::string toStr(Order::PriceOptional value)
Definition Order.cpp:34

◆ userId() [1/2]

auto userId ( ) const
inlinenoexcept

Gateway or Trader ID.

Definition at line 1705 of file Messages.h.

1706 {
1707 constexpr BlockLength offset = 0;
1708 constexpr BlockLength length = 20;
1709
1710 return fixedStr<length>(offset);
1711 }

◆ userId() [2/2]

ThisType & userId ( StrRef value)
inlinenoexcept

Gateway or Trader ID.

Definition at line 1714 of file Messages.h.

1715 {
1716 constexpr BlockLength offset = 0;
1717 constexpr BlockLength length = 20;
1718
1719 setFixedStr<length>(offset, value);
1720 return *this;
1721 }