67 : tag_(0), value_(nullptr), size_(0) {}
73 : tag_(fieldTag), value_(fieldValue.data()), size_(fieldValue.size()) {}
127 FlatMessage(
const char * rawMessage,
size_t rawMessageSize,
bool useZeroCopyBuffer =
true);
133 const char * msgType,
134 const char * senderCompId,
135 const char * targetCompId,
136 const char * rawMessageWithoutHeaderTrailer,
137 size_t rawMessageWithoutHeaderTrailerSize,
138 bool useZeroCopyBuffer =
true);
425 void reset(
const char * rawMessage,
size_t rawMessageSize);
470 return currentField_;
474 return ¤tField_;
502 FlatMessage(
const OnixS::FIX::Core::Messaging::Extras::FlatMessage & other);
504 OnixS::FIX::Core::Messaging::Extras::FlatMessage * impl_;
#define ONIXS_FIXENGINE_API
The Decimal type for a better precision.
FlatFieldRef()
Initializes as a references to nothing.
Field primary attributes (a tag and a reference to a value).
Tag tag() const
Gets the field tag.
FlatField()
Initializes the field which refers to nothing.
FlatField(Tag fieldTag, const StringRef &fieldValue)
Initializes all members.
StringRef value() const
Gets the field value reference.
The constant iterator to iterate over all fields in the given FlatMessage instance.
std::forward_iterator_tag iterator_category
const FlatField & reference
reference operator*() const
const FlatField * pointer
std::ptrdiff_t difference_type
ConstIterator(const FlatMessage *, Tag)
Initializes an iterator by a first field from which you need to iterate.
pointer operator->() const
FlatMessage & insert(Tag, Int64, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & insert(Tag, const Timestamp &, TimestampFormat::Enum, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & insert(Tag, Int32, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & set(FlatFieldRef &, UInt64)
StringRef operator[](FlatFieldKey) const
Provides an access to a field value by the given field key.
FlatMessage(OnixS::FIX::ProtocolVersion::Enum protocolVersion, const char *msgType, const char *senderCompId, const char *targetCompId, const char *rawMessageWithoutHeaderTrailer, size_t rawMessageWithoutHeaderTrailerSize, bool useZeroCopyBuffer=true)
FlatFieldRef find(Tag, const FlatFieldRef &) const
FlatMessage & insert(Tag, UInt64, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & remove(Tag)
FlatMessage & add(Tag, Char)
FlatMessage & add(Tag, UInt64)
FlatMessage & add(Tag, const Decimal &)
size_t size() const
The size of the flat content.
FlatFieldRef find(Tag) const
FlatMessage(const char *rawMessage, size_t rawMessageSize, bool useZeroCopyBuffer=true)
Constructs an instance from the tag=value form.
FlatMessage & add(Tag, Int64)
FlatMessage & add(Tag, const TimeSpan &, TimeSpanFormat::Enum)
FlatMessage & set(FlatFieldKey, UInt64)
void reset(const char *rawMessage, size_t rawMessageSize)
FlatMessage & insert(Tag, const TimeSpan &, TimeSpanFormat::Enum, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & set(FlatFieldRef &, const Decimal &)
FlatMessage & set(FlatFieldKey, UInt32)
FlatFieldKey allocateKey(const FlatFieldRef &)
Allocates a key to the requested field for the further access.
FlatMessage(OnixS::FIX::ProtocolVersion::Enum protocolVersion, const char *msgType)
FlatMessage & add(Tag, const StringRef &)
FlatMessage & set(FlatFieldKey, const Decimal &)
FlatMessage & add(Tag, UInt32)
ConstIterator const_iterator
FlatMessage & set(FlatFieldRef &, const FieldValueRef &)
StringRef operator[](const FlatFieldRef &) const
Provides an access to a field value by the given temporary reference.
FlatMessage & insert(Tag, const Decimal &, Tag, InsertMode::Enum=InsertMode::Before)
ConstIterator end() const
Returns the constant iterator to the field after the last one in the FlatMessage instance.
void adjust()
Updates BodyLength and CheckSum fields.
void userData(void *data)
Attaches a user data to the message.
FlatMessage & set(FlatFieldKey, const StringRef &)
FlatMessage & insert(Tag, UInt32, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & set(FlatFieldKey, const TimeSpan &, TimeSpanFormat::Enum)
friend class MessageOperator
FlatMessage & set(FlatFieldKey, const FieldValueRef &)
~FlatMessage()
Utilizes internal resources.
FlatMessage & set(FlatFieldKey, Int64)
FlatMessage & set(FlatFieldRef &, Char)
FlatMessage & set(FlatFieldKey, const Timestamp &, TimestampFormat::Enum)
FlatMessage & set(FlatFieldKey, Char)
FlatFieldKey allocateKey(Tag)
Finds and allocates a key to the requested field for the further access.
FlatMessage & insert(Tag, Char, Tag, InsertMode::Enum=InsertMode::Before)
FlatFieldRef getFlatFieldRef(const StringRef &value) const
Converts the StringRef value of the given FlatMessage to the FlatFieldRef object.
FlatGroup getGroup(const FlatFieldRef &numberOfInstancesRef) const
FlatMessage(const FlatMessage &other)
Initializes as a copy of the given instance.
FlatMessage & set(FlatFieldRef &, Int64)
FlatMessage(FlatMessage &&moved) noexcept
FlatMessage & add(Tag, Int32)
FlatMessage & set(FlatFieldRef &, const TimeSpan &, TimeSpanFormat::Enum)
FlatMessage & add(Tag, const Timestamp &, TimestampFormat::Enum)
FlatMessage & set(FlatFieldRef &, const StringRef &)
friend class FlatMessageWrapper
FlatMessage(const OnixS::FIX::Message &message, bool useZeroCopyBuffer=true)
Constructs an instance from the given Message object.
ConstIterator begin() const
Returns the constant iterator to the first field in the FlatMessage instance.
FlatMessage & set(FlatFieldRef &, Int32)
std::string toString(char delimiter=0x1) const
FlatMessage & set(FlatFieldKey, Int32)
void swap(FlatMessage &other) noexcept
Swaps the content with another instance.
FlatMessage & insert(Tag, const StringRef &, Tag, InsertMode::Enum=InsertMode::Before)
FlatMessage & set(FlatFieldRef &, const Timestamp &, TimestampFormat::Enum)
const char * chars() const
Returns the content of the flat message.
FlatMessage & set(FlatFieldRef &, UInt32)
ProtocolVersion::Enum version() const
The time span related functionality.
The timestamps related functionality.
ONIXS_FIXENGINE_API std::ostream & operator<<(std::ostream &os, const FlatMessage &message)
The stream output.
ONIXS_FIXENGINE_API_DECL(class, IEngineListener)
FlatMessage SerializedMessage
unsigned long long UInt64
unsigned Tag
Alias for tag numbers.
The insert mode of FlatMessage::insert() methods.
@ After
The new field will be inserted after the position tag.
@ Before
The new field will be inserted before the position tag.