Files
spark/src/lib/orderman/actors/IExecutionGateway.cpp
T

29 lines
956 B
C++

#include "IExecutionGateway.h"
#include "GLBXExecutionGateway.h"
#include "ICEExecutionGateway.h"
#include "lib/utils/ValueWrapper.h"
#include "lib/orderman/actors/GLBXiLink3ExecutionGateway.h"
#include <variant>
namespace bts {
namespace orderman {
std::unique_ptr<IExecutionGateway>
ExecutionGatewayFactory::create_gateway(const config::JetFIX::Connection &conn,
trace::PerfLog &pl,
md::SecurityOracle o) {
if (conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_ICE ||
conn.platform() == bts::config::JetFIX_Connection_JetFIXPlatform_SIMICE)
return std::make_unique<ICEExecutionGateway>(conn, pl, o);
else if (conn.use_ilink3())
return std::make_unique<ilink3::GLBXiLink3ExecutionGateway>(conn, pl, o);
else
return std::make_unique<GLBXExecutionGateway>(conn, pl, o);
}
} // namespace orderman
} // namespace bts