BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
admin::ExchangeManager Class Reference

Manages the lifecycle of a local Exchange instance (TradingCore + FixServer). More...

#include <ExchangeManager.h>

Collaboration diagram for admin::ExchangeManager:
Collaboration graph

Public Member Functions

 ExchangeManager (asio::io_context &ioCtx)
 
 ~ExchangeManager ()
 
trading_core::TradingCoregetCore ()
 
fix::FixServergetServer ()
 
bool isRunning () const
 
bool start (short port=8088)
 Starts the exchange services.
 
void stop ()
 Stops all exchange services.
 

Private Attributes

std::unique_ptr< fix::FixServermFixServer
 
asio::io_context & mIoCtx
 
std::atomic< bool > mIsRunning {false}
 
std::unique_ptr< data::SequenceRepositorymSeqRepo
 
std::unique_ptr< trading_core::TradingCoremTradingCore
 

Detailed Description

Manages the lifecycle of a local Exchange instance (TradingCore + FixServer).

Constructor & Destructor Documentation

◆ ExchangeManager()

admin::ExchangeManager::ExchangeManager ( asio::io_context &  ioCtx)
explicit

◆ ~ExchangeManager()

admin::ExchangeManager::~ExchangeManager ( )
Here is the call graph for this function:

Member Function Documentation

◆ getCore()

trading_core::TradingCore * admin::ExchangeManager::getCore ( )
inline
Here is the caller graph for this function:

◆ getServer()

fix::FixServer * admin::ExchangeManager::getServer ( )
inline
Here is the caller graph for this function:

◆ isRunning()

bool admin::ExchangeManager::isRunning ( ) const
inline
Here is the caller graph for this function:

◆ start()

bool admin::ExchangeManager::start ( short  port = 8088)

Starts the exchange services.

Parameters
portTCP port for the FIX server.
Returns
true if successfully started.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void admin::ExchangeManager::stop ( )

Stops all exchange services.

Here is the caller graph for this function:

Member Data Documentation

◆ mFixServer

std::unique_ptr<fix::FixServer> admin::ExchangeManager::mFixServer
private

◆ mIoCtx

asio::io_context& admin::ExchangeManager::mIoCtx
private

◆ mIsRunning

std::atomic<bool> admin::ExchangeManager::mIsRunning {false}
private

◆ mSeqRepo

std::unique_ptr<data::SequenceRepository> admin::ExchangeManager::mSeqRepo
private

◆ mTradingCore

std::unique_ptr<trading_core::TradingCore> admin::ExchangeManager::mTradingCore
private

The documentation for this class was generated from the following files: