exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
response_displayer.hpp
Go to the documentation of this file.
1#pragma once
3
4#include <functional>
5#include <iostream>
6
7namespace exchange::client
8{
9
11{
12 const std::reference_wrapper<std::ostream> out;
13
14 static std::string toString(const google::protobuf::Timestamp &timestamp);
15 static std::string toString(proto::Side side);
16 static std::string toString(proto::OrderStatus status);
17 static std::string priceToString(uint64_t price);
18
19 public:
21 explicit ResponseDisplayer(std::ostream &outputStream);
22 [[nodiscard]] std::ostream &getOutputStream() const;
23
24 void printResponse(const proto::OrderAck &ack) const;
25 void printResponse(const proto::CandleDataResponse &candles) const;
26 void printResponse(const proto::L1DataResponse &l1Data) const;
27 void printResponse(const proto::L2DataResponse &l2Data) const;
28 void printResponse(const proto::OrderBookUpdate &update) const;
29 void printResponse(const proto::OrderDataResponse &order) const;
30 void printResponse(const proto::ExecutionDataResponse &executionData) const;
31 void printResponse(const proto::ListSecuritiesResponse &securities) const;
32 void printResponse(const proto::Security &security) const;
33};
34
35} // namespace exchange::client
void printResponse(const proto::OrderAck &ack) const
Definition response_displayer.cpp:60
std::ostream & getOutputStream() const
Definition response_displayer.cpp:55
ResponseDisplayer()
Definition response_displayer.cpp:47
Definition cli_parsing.hpp:10