#include <OnixS/FIXEngine/FIX/FlatMessage.h>
Classes | |
class | ConstIterator |
Friends | |
class | MessageOperator |
class | FlatMessageWrapper |
Fields can be accessed using temporary field references and using special keys which remain constant during lifetime of the single instance.
To access a field, a reference must be obtained using the 'find' member. 'find' member search for a field using a regular Tag identifier. If 'find' succeeds, a temporary reference is returned. That reference can be either used to modify the field or to allocate a key for that field using 'allocateKey' member. Once the key is allocated it can be used like a tag to quick access the field.
There are pre-allocated keys to access service fields like MsgType, MsgSeqNum, SendingTime, etc.
Definition at line 75 of file FlatMessage.h.
FlatMessage | ( | ) |
Constructs blank instance.
FlatMessage | ( | OnixS::FIX::ProtocolVersion::Enum | protocolVersion, |
const char * | msgType | ||
) |
Constructs an instance with empty required message header fields.
FlatMessage | ( | const char * | rawMessage, |
size_t | rawMessageSize, | ||
bool | useZeroCopyBuffer = true |
||
) |
Constructs an instance from the tag=value form.
FlatMessage | ( | OnixS::FIX::ProtocolVersion::Enum | protocolVersion, |
const char * | msgType, | ||
const char * | senderCompId, | ||
const char * | targetCompId, | ||
const char * | rawMessageWithoutHeaderTrailer, | ||
size_t | rawMessageWithoutHeaderTrailerSize, | ||
bool | useZeroCopyBuffer = true |
||
) |
Constructs an instance from the tag=value form without session-level fields.
Required fields will be added during the construction.
FlatMessage | ( | const OnixS::FIX::Message & | message, |
bool | useZeroCopyBuffer = true |
||
) |
Constructs an instance from the given Message object.
FlatMessage | ( | const FlatMessage & | other | ) |
Initializes as a copy of the given instance.
~FlatMessage | ( | ) |
Utilizes internal resources.
FlatMessage& add | ( | Tag | , |
const StringRef & | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
Char | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
Int32 | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
UInt32 | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
Int64 | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
UInt64 | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
const Decimal & | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
const Timestamp & | , | ||
TimestampFormat::Enum | |||
) |
Adds the field value to the end of the message.
FlatMessage& add | ( | Tag | , |
const TimeSpan & | , | ||
TimeSpanFormat::Enum | |||
) |
Adds the field value to the end of the message.
void adjust | ( | ) |
Updates BodyLength and CheckSum fields.
FlatFieldKey allocateKey | ( | const FlatFieldRef & | ) |
Allocates a key to the requested field for further access.
FlatFieldKey allocateKey | ( | Tag | ) |
Finds and allocates a key to the requested field for further access.
ConstIterator begin | ( | ) | const |
Returns the constant iterator to the first field in the FlatMessage instance.
const char* chars | ( | ) | const |
Returns the content of the flat message.
ConstIterator end | ( | ) | const |
Returns the constant iterator to the field after the last one in the FlatMessage instance.
|
inline |
Looks for a field using the given tag number.
Definition at line 394 of file FlatMessage.h.
FlatFieldRef find | ( | Tag | , |
const FlatFieldRef & | |||
) | const |
Looks for a field with assumption field is located after given another field using its tag number.
Member is suitable to access same fields but from different repeating group instances.
FlatFieldRef getFlatFieldRef | ( | const StringRef & | value | ) | const |
Converts the StringRef value of the given FlatMessage to the FlatFieldRef object.
FlatGroup getGroup | ( | const FlatFieldRef & | numberOfInstancesRef | ) | const |
Returns the reference to a repeating group - if exists.
numberOfInstancesRef | reference of the field that defines the number of instances in this repeating group (the NoXXX field). |
std::exception | if the given field does not contain the number of instances. |
FlatMessage& operator= | ( | const FlatMessage & | ) |
Re-initializes as a copy of the given instance.
StringRef operator[] | ( | const FlatFieldRef & | ) | const |
Provides access to a field value by the given temporary reference.
StringRef operator[] | ( | FlatFieldKey | ) | const |
Provides access to a field value by the given field key.
FlatMessage& remove | ( | Tag | ) |
Removes the field value.
Once value is removed, all references to other fields become invalid.
void reset | ( | const char * | rawMessage, |
size_t | rawMessageSize | ||
) |
Resets the instance to the new tag=value form.
void reset | ( | ) |
Resets the instance to the blank state.
FlatMessage& set | ( | FlatFieldRef & | , |
const StringRef & | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
const StringRef & | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
Char | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
Char | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
Int32 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
Int32 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
UInt32 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
UInt32 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
Int64 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
Int64 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
UInt64 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
UInt64 | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
const Decimal & | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
const Decimal & | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
const Timestamp & | , | ||
TimestampFormat::Enum | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
const Timestamp & | , | ||
TimestampFormat::Enum | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
const TimeSpan & | , | ||
TimeSpanFormat::Enum | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
const TimeSpan & | , | ||
TimeSpanFormat::Enum | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldRef & | , |
const FieldValueRef & | |||
) |
Updates the field value.
FlatMessage& set | ( | FlatFieldKey | , |
const FieldValueRef & | |||
) |
Updates the field value.
size_t size | ( | ) | const |
Size of the flat content.
std::string toString | ( | ) | const |
Returns a string that represents the flat message.
void* userData | ( | ) | const |
User data associated with the message.
void userData | ( | void * | data | ) |
Attaches user data to the message.
ProtocolVersion::Enum version | ( | ) | const |
|
friend |
Definition at line 382 of file FlatMessage.h.
|
friend |
Definition at line 381 of file FlatMessage.h.