43 virtual bool can_handle(
const uint8_t* data,
size_t length)
const = 0;
68 template<
typename ParserType>
70 static_assert(std::is_base_of_v<MessageParser, ParserType>,
"ParserType must inherit from MessageParser");
static std::unique_ptr< MessageParser > create_parser(ProtocolType type)
static std::unique_ptr< MessageParser > create_parser_from_data(const uint8_t *data, size_t length)
static void register_parser()
virtual ProtocolType get_protocol_type() const =0
static std::string side_to_string(Side side)
static TimeInForce parse_time_in_force(const std::string &tif_str)
virtual ~MessageParser()=default
static std::string order_status_to_string(OrderStatus status)
virtual bool can_handle(const uint8_t *data, size_t length) const =0
static Side parse_side(const std::string &side_str)
static OrderType parse_order_type(const std::string &type_str)
virtual std::vector< uint8_t > serialize_response(const OrderResponse &response)=0
static std::string order_type_to_string(OrderType type)
virtual ParseResult parse_message(const uint8_t *data, size_t length, int client_id)=0
bool has_response() const
std::optional< Order > order
std::optional< OrderResponse > response
std::string error_message