OnixS C++ CME MDP Premium Market Data Handler 5.10.2
Users' manual and API documentation
Loading...
Searching...
No Matches
FieldSet Struct Reference

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

Public Member Functions

 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)
 ~FieldSet ()=default

Protected Member Functions

 FieldSet (BinaryBlockBase &binary, const FieldAccessor *accessor) noexcept
const FieldAccessoraccessor () const noexcept
void setAccessor (const FieldAccessor *obj) noexcept

Detailed Description

Definition at line 52 of file Message.h.

Constructor & Destructor Documentation

◆ ~FieldSet()

~FieldSet ( )
default

◆ FieldSet()

FieldSet ( BinaryBlockBase & binary,
const FieldAccessor * accessor )
inlineprotectednoexcept

Initializes the instance over the binary data.

Definition at line 476 of file Message.h.

Member Function Documentation

◆ accessor()

const FieldAccessor * accessor ( ) const
inlineprotectednoexcept
Returns
FieldAccessor.

Definition at line 483 of file Message.h.

◆ contain()

bool contain ( Tag tag) const
noexcept
Returns
true if the field-set contains the field with the given tag, otherwise - false.
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.

◆ field()

Field field ( Tag tag) const
inlinenoexcept
Returns
Field by its tag.
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 79 of file Message.h.

◆ getBitSet()

template<typename BitSet>
BitSet getBitSet ( Tag tag) const
inline
Returns
the field value as a set.
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 310 of file Message.h.

◆ getChar()

Char getChar ( Tag tag) const
Returns
field value as an Char 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.

◆ getDecimal()

Decimal getDecimal ( Tag tag) const
Returns
the field value as a Decimal number.
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.

◆ getEnumeration()

template<typename Enumeration>
Enumeration::Enum getEnumeration ( Tag tag) const
inline
Returns
the field value as an enumeration.
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 295 of file Message.h.

◆ getInt16()

Int16 getInt16 ( Tag tag) const
Returns
field value as an Int16 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.

◆ getInt32()

Int32 getInt32 ( Tag tag) const
Returns
field value as an Int32 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.

◆ getInt64()

Int64 getInt64 ( Tag tag) const
Returns
field value as an Int64 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.

◆ getInt8()

Int8 getInt8 ( Tag tag) const
Returns
field value as an Int8 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.

◆ getMaturityMonthYear()

MaturityMonthYear getMaturityMonthYear ( Tag tag) const
Returns
the field value as a MaturityMonthYear.
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.

◆ getStringRef()

StrRef getStringRef ( Tag tag) const
Returns
reference to a read-only text chain.
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.

◆ getTimestamp()

Timestamp getTimestamp ( Tag tag) const
Returns
the field value as a timestamp
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.

◆ getUInt16()

UInt16 getUInt16 ( Tag tag) const
Returns
field value as an UInt16 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.

◆ getUInt32()

UInt32 getUInt32 ( Tag tag) const
Returns
field value as an UInt32 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.

◆ getUInt64()

UInt64 getUInt64 ( Tag tag) const
Returns
field value as an UInt64 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.

◆ getUInt8()

UInt8 getUInt8 ( Tag tag) const
Returns
field value as an UInt8 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.

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept
Returns
true if the instance refers to a valid repeating group entry, otherwise - false.

Definition at line 55 of file Message.h.

◆ operator[]()

Field operator[] ( Tag tag) const
inlinenoexcept
Returns
field by its tag.

If the source does not contain any field with the given tag, the returned instance represents a null field.

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 128 of file Message.h.

◆ reset()

FieldSet & reset ( )
inlinenoexcept

Resets all variable-length and optional fields.

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 66 of file Message.h.

◆ resetField()

FieldSet & resetField ( Tag tag)
inline

Resets the field by its tag.

Exceptions
std::runtime_errorif or the value is not optional or the value is not allowed.
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 109 of file Message.h.

◆ set() [1/15]

template<typename BitSet>
FieldSet & set ( Tag tag,
BitSet value,
typename BitSet::Bits * = nullptr )
inline

Assigns a given value as a set.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.

Definition at line 329 of file Message.h.

◆ set() [2/15]

FieldSet & set ( Tag tag,
Char value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.

◆ set() [3/15]

FieldSet & set ( Tag tag,
const Decimal & value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [4/15]

FieldSet & set ( Tag tag,
const Field & field )
inline

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.

Definition at line 319 of file Message.h.

◆ set() [5/15]

FieldSet & set ( Tag tag,
const MaturityMonthYear & value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [6/15]

FieldSet & set ( Tag tag,
Int16 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [7/15]

FieldSet & set ( Tag tag,
Int32 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [8/15]

FieldSet & set ( Tag tag,
Int64 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [9/15]

FieldSet & set ( Tag tag,
Int8 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [10/15]

FieldSet & set ( Tag tag,
StrRef value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [11/15]

FieldSet & set ( Tag tag,
Timestamp value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [12/15]

FieldSet & set ( Tag tag,
UInt16 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [13/15]

FieldSet & set ( Tag tag,
UInt32 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [14/15]

FieldSet & set ( Tag tag,
UInt64 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ set() [15/15]

FieldSet & set ( Tag tag,
UInt8 value )

Assigns a given value.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.
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.

◆ setAccessor()

void setAccessor ( const FieldAccessor * obj)
inlineprotectednoexcept

Sets the FieldAccessor.

Definition at line 489 of file Message.h.

◆ setField()

FieldSet & setField ( Tag tag,
const Field & field )
inline

Assigns the field by its tag.

Exceptions
std::runtime_errorif conversion is impossible or the value is not allowed.

Definition at line 90 of file Message.h.