45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "lib/domain_model/Security.pb.h"
|
|
#include "lib/md/MDClient.h"
|
|
#include "lib/md/MDProducer.h"
|
|
#include "lib/orderman/gateways/IExecutionGateway.h"
|
|
|
|
namespace bts::md {
|
|
class MDClient;
|
|
class MDProducer;
|
|
} // namespace bts::md
|
|
|
|
namespace bts {
|
|
namespace orderman {
|
|
|
|
class SimExecutionGateway : public IExecutionGateway {
|
|
public:
|
|
SimExecutionGateway(md::SecurityOracle, bts::md::MDClient &md_client);
|
|
virtual ~SimExecutionGateway();
|
|
|
|
void start() override;
|
|
void dispatch_incoming_fix_messages() override;
|
|
void on_securities(const mercury::Update<NewSecuritiesEvent> &) override;
|
|
void on_admin_data(const mercury::Update<NewAdminDataEvent> &) override;
|
|
void send_fix(const jetfix::OutFIXPtr &fix, trace::CorID trace) override;
|
|
void send_msgs(std::vector<OrderMsg> const &, trace::CorID) override;
|
|
|
|
OnExeReport &on_exe_report() override;
|
|
OnGwStatusChange &on_gw_status_change() override;
|
|
OnCancelReject &on_cancel_reject() override;
|
|
OnExchangePositionState &on_exchange_position_state() override;
|
|
OnExchangeOpenOrdersState &on_exchange_open_orders() override;
|
|
|
|
void set_producer(bts::api::Venue venue, bts::md::MDProducer &md_producer);
|
|
void do_work();
|
|
|
|
|
|
private:
|
|
struct PImpl;
|
|
PImpl *me;
|
|
};
|
|
|
|
} // namespace orderman
|
|
} // namespace bts
|