Skip to content

Add custom separator overload to Message::toString - #757

Open
rblazhko wants to merge 1 commit into
quickfix:masterfrom
rblazhko:codex/issue-752-message-separator
Open

rblazhko wants to merge 1 commit into
quickfix:masterfrom
rblazhko:codex/issue-752-message-separator

Conversation

@rblazhko

Copy link
Copy Markdown

Closes #752.

Summary

  • Add ABI-preserving Message::toString(char separator) overloads for both return-by-value and caller-provided-buffer usage.
  • Preserve the existing overloads and byte-for-byte SOH output.
  • Keep BodyLength and CheckSum calculated from the standard SOH wire format, so alternate separators are explicitly display/logging output rather than transmissible FIX messages.
  • Replace only field boundaries, preserving embedded SOH bytes in DATA fields and handling nested repeating groups.

Compatibility

No existing signature or symbol is changed. Existing calls to toString() and the custom field-tag overloads retain their current behavior.

Testing

  • cmake --build build --parallel 4
  • ./lib/ut 'MessageTests' --quickfix-spec-path spec — 221 assertions passed
  • ./lib/ut --quickfix-spec-path spec — 1,997 assertions across 53 test cases passed
  • Generated and compiled the SWIG 4.2.1 Python wrapper, then runtime smoke-tested Message.toString("|")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the separator in Message::toString an argument

1 participant