-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTestClient.h
More file actions
33 lines (26 loc) · 766 Bytes
/
TestClient.h
File metadata and controls
33 lines (26 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "EngineInterfaces.h"
class TestClient : public IExchangeEvents
{
public:
TestClient() = default;
virtual ~TestClient() = default;
//
// IExchangeEvents implementation
//
virtual void OnNewOrder(OrderID oid, const Order& o) override final
{
m_orderBookUpdateEvents.push_back(std::make_pair(oid, o));
}
virtual void OnCancelledOrder(OrderID oid) override final
{
m_cancelEvents.push_back(oid);
}
virtual void OnOrderMatched(const MatchedOrder& mo) override final
{
m_matchingEvents.push_back(mo);
}
std::vector<std::pair<OrderID, Order>> m_orderBookUpdateEvents;
std::vector<MatchedOrder> m_matchingEvents;
std::vector<OrderID> m_cancelEvents;
};