-
Notifications
You must be signed in to change notification settings - Fork 0
/
baseexchange.cpp
48 lines (40 loc) · 1.14 KB
/
baseexchange.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "baseexchange.h"
BaseExchange::BaseExchange()
: exchangeSpecification_(nullptr), pollingMarketDataService_(nullptr),
pollingTradeService_(nullptr), pollingAccountService_(nullptr)
{
}
BaseExchange::~BaseExchange()
{
delete exchangeSpecification_;
delete pollingMarketDataService_;
delete pollingTradeService_;
delete pollingAccountService_;
}
void BaseExchange::applySpecification(const ExchangeSpecification *exchangeSpecification)
{
if(exchangeSpecification == nullptr) {
exchangeSpecification_ = new ExchangeSpecification(*getDefaultExchangeSpecification());
}
else {
exchangeSpecification_ = new ExchangeSpecification(*exchangeSpecification);
}
}
ExchangeSpecification* BaseExchange::getExchangeSpecification() const
{
return exchangeSpecification_;
}
PollingMarketDataService *BaseExchange::getPollingMarketDataService() const
{
return pollingMarketDataService_;
}
/*
PollingTradeService *BaseExchange::getPollingTradeService() const
{
return pollingTradeService_;
}
PollingAccountService *BaseExchange::getPollingAccountService() const
{
return pollingAccountService_;
}
*/