From da46afae4bc4544ccdb1f6943996aea85dd97b22 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 4 May 2025 19:55:15 +0200 Subject: feat(fix.hpp): fix_metadata structure. Signed-off-by: Amlal --- lib/astdx/fix.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib') diff --git a/lib/astdx/fix.hpp b/lib/astdx/fix.hpp index 2609785..5d5b30d 100644 --- a/lib/astdx/fix.hpp +++ b/lib/astdx/fix.hpp @@ -20,6 +20,7 @@ namespace astdx::fix struct fix_writer; struct fix_visitor; struct fix_range; + struct fix_metadata; /// @brief Buffer+Length structure typedef fix_range* fix_range_ptr_t; @@ -29,6 +30,30 @@ namespace astdx::fix char* ascii_bytes_; uint16_t length_; }; + + inline std::string to_string(fix_range& range) + { + return std::string(range.ascii_bytes_, range.length_); + } + + struct fix_metadata final { + std::string begin_string_; + size_t body_len_; + uint16_t msg_type_; + uint32_t msg_seq_num_; + uint32_t sender_comp_id_; + uint32_t target_comp_id_; + std::string send_time_; + std::string ci_ord_id_; + uint16_t side_; + uint16_t security_type_; + std::string symbol_; + uint32_t order_qty_; + uint16_t order_type_; + uint64_t price_; + uint64_t time_in_force_; + uint32_t checksum_; + }; } // namespace astdx::fix #endif // ifndef _STDX_FIX_HPP -- cgit v1.2.3