Classes | |
| struct | MakeShallowCopy |
Public Member Functions | |
| Message (size_t expectedMessageSize=DefaultExpectedMessageSize) | |
| Message (const char *type, const Dictionary &dictionary, size_t expectedMessageSize=DefaultExpectedMessageSize) | |
| Message (const Message &other) | |
| virtual | ~Message () |
| Dictionary | dictionary () const |
| FieldValueRef | type () const |
| SequenceNumber | seqNum () const |
| void | seqNum (SequenceNumber value) |
| FieldValueRef | senderCompId () const |
| void | senderCompId (const std::string &) |
| FieldValueRef | targetCompId () const |
| void | targetCompId (const std::string &) |
| void * | userData () const |
| void | userData (void *data) |
| bool | operator== (const Message &) const |
| bool | operator!= (const Message &) const |
| void | validate () const |
| void | validate (MessageValidationFlags validationFlags) const |
| bool | tryValidate (MessageValidationFlags validationFlags, std::string &errorDescription) const |
| void | clear () |
| void | toRaw (RawMessage &) const |
| std::string | toString (char delimiter=0x1, MessageStringingFlags flags=MessageStringingFlag::IncludeFieldTagNumber) const |
| void | toString (std::string &str, char delimiter=0x1, MessageStringingFlags flags=MessageStringingFlag::IncludeFieldTagNumber) const |
| std::string | toXml (const std::string &indent=" ", const std::string &endOfLineDelimiter="\n") const |
| void | toXml (std::string &str, const std::string &indent=" ", const std::string &endOfLineDelimiter="\n") const |
| std::string | toJson (const std::string &indent=" ", const std::string &endOfLineDelimiter="\n") const |
| void | toJson (std::string &str, const std::string &indent=" ", const std::string &endOfLineDelimiter="\n") const |
| void | updateBodyLengthAndCheckSum () |
| void | swap (Message &other) ONIXS_FIXENGINE_NOTHROW |
| Message & | operator= (const Message &) |
| void | copyFields (const Message &) |
| Public Member Functions inherited from FieldSet | |
| bool | valid () const |
| bool | contain (Tag tag) const |
| FieldValueRef | get (Tag tag) const |
| Char | getChar (Tag tag) const |
| Int32 | getInt32 (Tag tag) const |
| UInt32 | getUInt32 (Tag tag) const |
| Int64 | getInt64 (Tag tag) const |
| UInt64 | getUInt64 (Tag tag) const |
| Double | getDouble (Tag tag) const |
| Decimal | getDecimal (Tag tag) const |
| Decimal | getDecimal (Tag tag, Int32 exponent) const |
| StringRef | getStringRef (Tag tag) const |
| Timestamp | getTimestamp (Tag tag) const |
| Timestamp | getTimestamp (Tag tag, TimestampFormat::Enum) const |
| TimeSpan | getTimeSpan (Tag tag) const |
| Group | getGroup (Tag numberOfInstancesTag) const |
| bool | hasFlag (Tag tag) const |
| FieldSet & | set (Tag tag, Int32 value) |
| FieldSet & | setV (Tag tag, Int32 value) |
| FieldSet & | set (Tag tag, UInt32 value) |
| FieldSet & | setV (Tag tag, UInt32 value) |
| FieldSet & | set (Tag tag, Int64 value) |
| FieldSet & | setV (Tag tag, Int64 value) |
| FieldSet & | set (Tag tag, UInt64 value) |
| FieldSet & | setV (Tag tag, UInt64 value) |
| FieldSet & | set (Tag tag, Double value, size_t precision=17) |
| FieldSet & | set (Tag tag, Double value, size_t precision, size_t length) |
| FieldSet & | setV (Tag tag, Double value, size_t precision=17) |
| FieldSet & | setV (Tag tag, Double value, size_t precision, size_t length) |
| FieldSet & | set (Tag tag, const Decimal &value) |
| FieldSet & | set (Tag tag, const Decimal &value, size_t length) |
| FieldSet & | setV (Tag tag, const Decimal &value) |
| FieldSet & | setV (Tag tag, const Decimal &value, size_t length) |
| FieldSet & | set (Tag tag, char value) |
| FieldSet & | set (Tag tag, const std::string &value) |
| FieldSet & | set (Tag tag, const char *value) |
| FieldSet & | set (Tag tag, const StringRef &value) |
| FieldSet & | set (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec) |
| FieldSet & | setV (Tag tag, const Timestamp &value, TimestampFormat::Enum valueFormat=TimestampFormat::YYYYMMDDHHMMSSNsec) |
| FieldSet & | set (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec) |
| FieldSet & | setV (Tag tag, const TimeSpan &value, TimeSpanFormat::Enum valueFormat=TimeSpanFormat::HHMMSSNsec) |
| Group | setGroup (Tag tag, size_t value) |
| FieldSet & | setFlag (Tag tag, bool value) |
| FieldSet & | set (Tag tag, const FieldValueRef &value) |
| bool | erase (Tag tag) |
| size_t | fields (Fields &fields) const |
| ConstIterator | begin () const |
| ConstIterator | end () const |
Static Public Member Functions | |
| static void | parse (const char *rawMessage, size_t rawMessageSize, Message &message) |
| static void | parse (const char *rawMessage, size_t rawMessageSize, MessageParsingFlags parsingFlags, Message &message) |
| static void | parse (const char *rawMessage, size_t rawMessageSize, const Dictionary &dictionary, MessageParsingFlags parsingFlags, Message &message) |
| static bool | parsePartial (const char *rawMessage, size_t rawMessageSize, Message &message) |
| static bool | parsePartial (const char *rawMessage, size_t rawMessageSize, const Dictionary &dictionary, Message &message) |
Protected Member Functions | |
| Message (const Message &other, MakeShallowCopy) | |
| Protected Member Functions inherited from FieldSet | |
| FieldSet () | |
| FieldSet (const Message *, void *, AccessPolicies) | |
| FieldSet (const FieldSet &) | |
| ~FieldSet () ONIXS_FIXENGINE_DEFAULT | |
| FieldSet & | operator= (const FieldSet &) |
| void | swap (FieldSet &) |
Friends | |
| class | MessageWrapper |
| class | MessageOperator |
Additional Inherited Members | |
| Protected Types inherited from FieldSet | |
| typedef size_t | AccessPolicies |
| Protected Attributes inherited from FieldSet | |
| void * | impl_ |
| const Message * | container_ |
| AccessPolicies | policies_ |
Message supports the 'unconstructed' state which can be treated as a pointer in the null state. However, in contrast to OnixS::FIX::Group and OnixS::FIX::GroupInstance classes it does NOT represent a light-weight wrapper over internal structures. In fact, it holds all the data which is fully copied on an assignment or a copy construction and disposed at the instance destruction.
FIX field related operations now available via the OnixS::FIX::FieldSet class from which the OnixS::FIX::Message class is now derived.
|
explicit |
Initializes a message in the unconstructed state.
| expectedMessageSize | An expected size of the FIX message. The 'expectedMessageSize' parameter is used as a hint for the optimization of the manipulation (parsing, setting, etc.) of large FIX messages with a lot of repeating groups. |
| Message | ( | const char * | type, |
| const Dictionary & | dictionary, | ||
| size_t | expectedMessageSize = DefaultExpectedMessageSize ) |
Constructs a FIX message of the given type which belongs to the given dictionary of the FIX protocol (messaging specification).
| type | Defines the type of the message (MsgType field value). |
| dictionary | The FIX protocol dictionary to which the message belongs to. |
| expectedMessageSize | An expected size of the FIX message. The 'expectedMessageSize' parameter is used as a hint for the optimization of the manipulation (parsing, setting, etc.) of large FIX messages with a lot of repeating groups. |
Initializes an instance as a deep copy of other one.
| other | The message to be copied from. |
|
virtual |
Disposes all internal data structures.
|
protected |
Initializes an instance as a shallow copy of other one.
| other | The message to be copied from. |
| void clear | ( | ) |
Brings the message to the 'blank' state as it was just constructed.
| void copyFields | ( | const Message & | ) |
| Dictionary dictionary | ( | ) | const |
| bool operator!= | ( | const Message & | ) | const |
Compares two messages.
The comparison is performed using 'tag=value' message presentations.
| bool operator== | ( | const Message & | ) | const |
Compares two messages.
The comparison is performed using 'tag=value' message presentations.
|
static |
De-serializes the FIX message from its raw (tag=value) presentation.
| rawMessage | The buffer in which the raw FIX message is stored. |
| rawMessageSize | The Size of the buffer in which the raw FIX message is stored. |
| dictionary | The FIX dictionary to which the message supposed to belong. |
| parsingFlags | Flags which affect the parsing behavior. |
| message | The parsed FIX message if the parsing succeeds. |
| The | std::exception if the parsing fails. |
|
static |
De-serializes the FIX message from its raw (tag=value) presentation.
| rawMessage | The buffer in which the raw FIX message is stored. |
| rawMessageSize | The size of the buffer in which the raw FIX message is stored. |
| message | The parsed FIX message if the parsing succeeds. |
| The | std::exception if the parsing fails. |
|
static |
De-serializes the FIX message from its raw (tag=value) presentation.
| rawMessage | The buffer in which the raw FIX message is stored. |
| rawMessageSize | The Size of the buffer in which the raw FIX message is stored. |
| parsingFlags | Flags which affect the parsing behavior. |
| message | The parsed FIX message if the parsing succeeds. |
| The | std::exception if the parsing fails. |
|
static |
De-serializes the FIX message from its raw (tag=value) presentation which may be truncated.
| rawMessage | The buffer in which the raw FIX message is stored. |
| rawMessageSize | The Size of the buffer in which the raw FIX message is stored. |
| dictionary | The FIX dictionary to which the message supposed to belong. |
| message | The parsed FIX message if the parsing succeeds. |
|
static |
De-serializes the FIX message from its raw (tag=value) presentation which may be truncated.
| rawMessage | The buffer in which the raw FIX message is stored. |
| rawMessageSize | The Size of the buffer in which the raw FIX message is stored. |
| message | The parsed FIX message if the parsing succeeds. |
| FieldValueRef senderCompId | ( | ) | const |
Returns the assigned value used to identify the firm sending message (SenderCompID (49) field value).
| void senderCompId | ( | const std::string & | ) |
Sets the assigned value used to identify the firm sending message (SenderCompID (49) field value).
| SequenceNumber seqNum | ( | ) | const |
Returns the message sequence number (the MsgSeqNum (tag=34) field value).
| void seqNum | ( | SequenceNumber | value | ) |
Sets the message sequence number (the MsgSeqNum (tag=34) field value).
| void swap | ( | Message & | other | ) |
Swaps the content with another instance.
| FieldValueRef targetCompId | ( | ) | const |
Returns the assigned value used to identify the receiving firm (TargetCompID(56) field value).
| void targetCompId | ( | const std::string & | ) |
Sets the assigned value used to identify the receiving firm (TargetCompID(56) field value).
| std::string toJson | ( | const std::string & | indent = " ", |
| const std::string & | endOfLineDelimiter = "\n" ) const |
Returns the JSON representation of the message.
| indent | The indent of each nested JSON object. |
| endOfLineDelimiter | Defines the end of line delimiter to be used. |
| void toJson | ( | std::string & | str, |
| const std::string & | indent = " ", | ||
| const std::string & | endOfLineDelimiter = "\n" ) const |
Appends the JSON representation of the message.
| str | The string to which the presentation is appended. |
| indent | The indent of each nested JSON object. |
| endOfLineDelimiter | Defines the end of line delimiter to be used. |
| void toRaw | ( | RawMessage & | ) | const |
Builds the FIX-compliant 'tag=value' presentation of the message.
|
inline |
| void toString | ( | std::string & | str, |
| char | delimiter = 0x1, | ||
| MessageStringingFlags | flags = MessageStringingFlag::IncludeFieldTagNumber ) const |
Appends the string representation of the message using the given delimiter and additional control flags.
| str | The string to which the presentation is appended. |
| delimiter | Defines the field delimiter to be used. |
| flags | Affects how the message presentation looks like. |
| std::string toXml | ( | const std::string & | indent = " ", |
| const std::string & | endOfLineDelimiter = "\n" ) const |
Returns the XML representation of the message.
| indent | The indent of each nested XML node. |
| endOfLineDelimiter | Defines the end of line delimiter to be used. |
| void toXml | ( | std::string & | str, |
| const std::string & | indent = " ", | ||
| const std::string & | endOfLineDelimiter = "\n" ) const |
Appends the XML representation of the message.
| str | The string to which the presentation is appended. |
| indent | The indent of each nested XML node. |
| endOfLineDelimiter | Defines the end of line delimiter to be used. |
| bool tryValidate | ( | MessageValidationFlags | validationFlags, |
| std::string & | errorDescription ) const |
Tries to validate the message according to specified criteria.
Returns 'true' if the validation is successful, otherwise - 'false'.
| validationFlags | Validation criteria. |
| errorDescription | Contains the error description in case the validation fails. |
| FieldValueRef type | ( | ) | const |
Returns the message type (MsgType(35) field value).
| void updateBodyLengthAndCheckSum | ( | ) |
Calculates the message body length and checkSum and updates corresponding fields.
| void * userData | ( | ) | const |
A user data associated with the message.
| void userData | ( | void * | data | ) |
Attaches a user data to the message.
| void validate | ( | ) | const |
Ensures the message satisfies basic FIX Specification requirements.
| The | std::exception if the validation fails. |
| void validate | ( | MessageValidationFlags | validationFlags | ) | const |
Validates the message according to specified criteria.
| validationFlags | Specifies validation criteria. |
| The | std::exception if the validation fails. |