55 explicit operator bool() const noexcept
57 return (
nullptr != accessor_);
68 accessor_->
reset(binary_);
83 return accessor_->field(binary_, tag);
95 accessor_->setField(binary_, tag,
field);
113 accessor_->resetField(binary_, tag);
130 return this->
field(tag);
294 template <
typename Enumeration>
297 return field(tag).cast<Enumeration>();
309 template <
typename BitSet>
312 return BitSet(
field(tag).cast<typename BitSet::Bits>());
328 template <
typename BitSet>
534 this->binary_ = r.binary_;
573 explicit operator bool() const noexcept
575 return (
nullptr != accessor_);
582 return binary_.size();
590 assert(binary_.valid());
592 return GroupEntry(binary_[index], *accessor_);
599 , accessor_(&accessor)
658 this->binary_ = r.binary_;
666 return accessor()->type();
675 assert(binary_.valid());
677 return accessor()->group(binary_, tag);
687 assert(binary_.valid());
689 return accessor()->group(binary_, tag, size);
730 assert(binary_.valid());
732 return accessor()->calculateBinarySize(binary_);
738 accessor()->toFix(str, binary_);
744 return accessor()->toFix(binary_, delimiter);
750 return accessor()->toFix(binary_,
'|');
762 assert(binary_.valid());
764 return binary_.version();
776 assert(binary_.valid());
778 return binary_.templateId();
796 assert(parentAccessor);
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_MESSAGING_TAGBASED_NAMESPACE_END
#define ONIXS_CMEMDH_EXPORTED
#define ONIXS_CMEMDH_NODISCARD
A field in a tag-based message.
GroupEntry(const GroupEntry &r) noexcept
GroupEntry(const GroupEntrySource &binary, const GroupEntryAccessor &accessor) noexcept
GroupEntry & operator=(const GroupEntry &r) noexcept
Group(const GroupEntriesSource &binary, const GroupEntryAccessor &accessor) noexcept
Initializes the instance over the binary data.
Size size() const noexcept
GroupEntry operator[](Size index) const
GroupEntriesSource::Size Size
Number of repeating group entries.
std::string toFix(Char delimiter='\x1') const
Message & operator=(const Message &r) noexcept
Re-initializes as the copy of the given instance.
SchemaVersion version() const
std::string toString() const
Builds a human-readable tag=value representation.
Message(SbeMessage binary, const MessageAccessor &accessor) noexcept
Initializes the instance from an SBE-encoded message.
Group group(Tag tag, MessageSize size)
Message & setVarData(Tag tag, StrRef value)
StrRef type() const noexcept
MessageTemplateId templateId() const
StrRef getVarData(Tag tag) const
MessageSize calculateBinarySize() const noexcept
void toFix(std::string &str) const
Builds a tag=value representation.
Group group(Tag tag) const noexcept
Message(const Message &r) noexcept
Initializes the instance as the copy of the given one.
Operations over SBE-encoded repeating group entries.
Operations over a repeating group instance.
The time point without the time-zone information.
std::ostream & operator<<(std::ostream &stream, const Field &field)
Serializes into the given stream.
void toStr(std::string &str, const Message &message)
Serializes into a tag=value format.
SbeGroupEntry< MessageSize > GroupEntrySource
SbeGroupEntries< GroupEntrySource, MessageSize, MessageSize, MessageSize > GroupEntriesSource
bool value(Number &number, const MultiContainer &container, Tag tag)
std::uint32_t UInt32
uInt32.
MessageHeader::Version SchemaVersion
Aliases SBE-encoded data version type.
char Char
Character type alias.
std::uint16_t UInt16
uInt16.
UInt16 MessageSize
Message length type.
std::basic_string_view< Char > StrRef
FloatingPointDecimal< DecimalMantissa, DecimalExponent > Decimal
Universal decimal type.
std::uint64_t UInt64
uInt64.
MessageHeader::TemplateId MessageTemplateId
Message type (template) identification.
virtual Field field(const BinaryBlockBase &, Tag) const noexcept=0
virtual void setField(BinaryBlockBase &, Tag, const Field &) const =0
Sets a field value by its tag.
virtual void resetField(BinaryBlockBase &, Tag) const =0
Resets a field value by its tag.
virtual void reset(BinaryBlockBase &) const noexcept=0
Resets all variable-length and optional fields.
UInt32 getUInt32(Tag tag) const
UInt8 getUInt8(Tag tag) const
Timestamp getTimestamp(Tag tag) const
FieldSet & set(Tag tag, Int16 value)
FieldSet & set(Tag tag, const Field &field)
UInt16 getUInt16(Tag tag) const
Enumeration::Enum getEnumeration(Tag tag) const
Int32 getInt32(Tag tag) const
FieldSet & setField(Tag tag, const Field &field)
FieldSet & set(Tag tag, const MaturityMonthYear &value)
MaturityMonthYear getMaturityMonthYear(Tag tag) const
FieldSet(BinaryBlockBase &binary, const FieldAccessor *accessor) noexcept
Initializes the instance over the binary data.
FieldSet & set(Tag tag, UInt64 value)
Field operator[](Tag tag) const noexcept
FieldSet & resetField(Tag tag)
FieldSet & set(Tag tag, UInt32 value)
FieldSet & reset() noexcept
FieldSet & set(Tag tag, Int32 value)
FieldSet & set(Tag tag, Char value)
FieldSet & set(Tag tag, Int64 value)
const FieldAccessor * accessor() const noexcept
FieldSet & set(Tag tag, Int8 value)
FieldSet & set(Tag tag, BitSet value, typename BitSet::Bits *=nullptr)
void setAccessor(const FieldAccessor *obj) noexcept
Sets the FieldAccessor.
Decimal getDecimal(Tag tag) const
UInt64 getUInt64(Tag tag) const
Int16 getInt16(Tag tag) const
FieldSet & set(Tag tag, Timestamp value)
FieldSet & set(Tag tag, StrRef value)
bool contain(Tag tag) const noexcept
FieldSet & set(Tag tag, UInt16 value)
StrRef getStringRef(Tag tag) const
BitSet getBitSet(Tag tag) const
FieldSet & set(Tag tag, UInt8 value)
Int64 getInt64(Tag tag) const
Int8 getInt8(Tag tag) const
Field field(Tag tag) const noexcept
Char getChar(Tag tag) const
FieldSet & set(Tag tag, const Decimal &value)
~GroupEntryAccessor()=default
virtual StrRef type() const noexcept=0
virtual MessageSize calculateBinarySize(const SbeMessage &) const noexcept=0
virtual void toFix(std::string &, const SbeMessage &) const =0
virtual Group group(const SbeMessage &, Tag) const noexcept=0