OnixS C++ CME iLink 3 Binary Order Entry Handler 1.19.4
Users' manual and API documentation
Loading...
Searching...
No Matches
Message Class Reference

#include <OnixS/CME/iLink3/messaging/TagBased/Message.h>

Public Member Functions

 Message () noexcept
 Message (const Message &r) noexcept
Messageoperator= (const Message &r) noexcept
StrRef type () const noexcept
Group group (Tag tag) const noexcept
Group group (Tag tag, MessageSize size)
StrRef getVarData (Tag tag) const
MessagesetVarData (Tag tag, StrRef value)
MessageSize calculateBinarySize () const noexcept
void toFix (std::string &str) const
std::string toFix (Char delimiter='\x1') const
std::string toString () const
SchemaVersion version () const
MessageTemplateId templateId () const
Public Member Functions inherited from FieldSet
 operator bool () const noexcept
FieldSetreset () noexcept
Field field (Tag tag) const noexcept
FieldSetsetField (Tag tag, const Field &field)
FieldSetresetField (Tag tag)
Field operator[] (Tag tag) const noexcept
bool contain (Tag tag) const noexcept
Char getChar (Tag tag) const
Int64 getInt64 (Tag tag) const
UInt64 getUInt64 (Tag tag) const
Int32 getInt32 (Tag tag) const
UInt32 getUInt32 (Tag tag) const
Int16 getInt16 (Tag tag) const
UInt16 getUInt16 (Tag tag) const
Int8 getInt8 (Tag tag) const
UInt8 getUInt8 (Tag tag) const
Decimal getDecimal (Tag tag) const
StrRef getStringRef (Tag tag) const
Timestamp getTimestamp (Tag tag) const
MaturityMonthYear getMaturityMonthYear (Tag tag) const
template<typename Enumeration>
Enumeration::Enum getEnumeration (Tag tag) const
template<typename BitSet>
BitSet getBitSet (Tag tag) const
FieldSetset (Tag tag, const Field &field)
template<typename BitSet>
FieldSetset (Tag tag, BitSet value, typename BitSet::Bits *=nullptr)
FieldSetset (Tag tag, Char value)
FieldSetset (Tag tag, UInt64 value)
FieldSetset (Tag tag, Int64 value)
FieldSetset (Tag tag, UInt32 value)
FieldSetset (Tag tag, Int32 value)
FieldSetset (Tag tag, UInt16 value)
FieldSetset (Tag tag, Int16 value)
FieldSetset (Tag tag, UInt8 value)
FieldSetset (Tag tag, Int8 value)
FieldSetset (Tag tag, const Decimal &value)
FieldSetset (Tag tag, StrRef value)
FieldSetset (Tag tag, Timestamp value)
FieldSetset (Tag tag, const MaturityMonthYear &value)

Protected Member Functions

 Message (SbeMessage binary, const MessageAccessor &accessor) noexcept
 ~Message ()=default
Protected Member Functions inherited from FieldSet
 ~FieldSet ()=default
 FieldSet (BinaryBlockBase &binary, const FieldAccessor *accessor) noexcept
const FieldAccessoraccessor () const noexcept
void setAccessor (const FieldAccessor *obj) noexcept

Detailed Description

Implements a tag-based interface over an SBE-encoded message.

Definition at line 662 of file Message.h.

Constructor & Destructor Documentation

◆ Message() [1/3]

Message ( )
inlinenoexcept

Initializes the message which refers to nothing and thus being a null-instance.

Definition at line 668 of file Message.h.

◆ Message() [2/3]

Message ( const Message & r)
inlinenoexcept

Initializes the instance as the copy of the given one.

Definition at line 675 of file Message.h.

◆ Message() [3/3]

Message ( SbeMessage binary,
const MessageAccessor & accessor )
inlineprotectednoexcept

Initializes the instance from an SBE-encoded message.

Definition at line 810 of file Message.h.

◆ ~Message()

~Message ( )
protecteddefault

Member Function Documentation

◆ calculateBinarySize()

MessageSize calculateBinarySize ( ) const
inlinenoexcept
Returns
Message size.
Warning
Does not check whether the instance refers to a valid set of fields. Use operator bool() to check whether the instance is in a valid state.

Definition at line 755 of file Message.h.

◆ getVarData()

StrRef getVarData ( Tag tag) const
inline
Returns
a variable-length field value.
Exceptions
std::runtime_errorif conversion is impossible or the value does not exist.
Warning
Does not check whether the instance refers to a valid set of fields. Use operator bool() to check whether the instance is in a valid state.

Definition at line 728 of file Message.h.

◆ group() [1/2]

Group group ( Tag tag) const
inlinenoexcept
Returns
a repeating group by its tag.
Note
a null instance is returned if the requested group is not available in the message.

Definition at line 700 of file Message.h.

◆ group() [2/2]

Group group ( Tag tag,
MessageSize size )
inline

by its tag.

Returns
a null instance if the requested group is not available in the given message.

Definition at line 712 of file Message.h.

◆ operator=()

Message & operator= ( const Message & r)
inlinenoexcept

Re-initializes as the copy of the given instance.

Definition at line 682 of file Message.h.

◆ setVarData()

Message & setVarData ( Tag tag,
StrRef value )
inline

Sets a variable-length field value.

Exceptions
std::runtime_errorif conversion is impossible or the value does not exist.
Warning
Does not check whether the instance refers to a valid set of fields. Use operator bool() to check whether the instance is in a valid state.

Definition at line 742 of file Message.h.

◆ templateId()

MessageTemplateId templateId ( ) const
inline
Returns
Template Id.
Warning
Does not check whether the instance refers to a valid set of fields. Use operator bool() to check whether the instance is in a valid state.

Definition at line 800 of file Message.h.

◆ toFix() [1/2]

std::string toFix ( Char delimiter = '\x1') const
inline
Returns
a tag=value representation.

Definition at line 769 of file Message.h.

◆ toFix() [2/2]

void toFix ( std::string & str) const
inline

Builds a tag=value representation.

Definition at line 763 of file Message.h.

◆ toString()

std::string toString ( ) const
inline

Builds a human-readable tag=value representation.

Definition at line 775 of file Message.h.

◆ type()

StrRef type ( ) const
inlinenoexcept
Returns
Message type.

Definition at line 691 of file Message.h.

◆ version()

SchemaVersion version ( ) const
inline
Returns
SBE Schema version.
Warning
Does not check whether the instance refers to a valid set of fields. Use operator bool() to check whether the instance is in a valid state.

Definition at line 786 of file Message.h.