67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
|
|
#ifndef QTRADECORE_H
|
||
|
|
#define QTRADECORE_H
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
#include "qsubscriptionmanager.h"
|
||
|
|
#include "qorderprocessor.h"
|
||
|
|
#include "qbigordermanager.h"
|
||
|
|
#include "qlogmanager.h"
|
||
|
|
#include "qeventbus.h"
|
||
|
|
#include "qdatabuffer.h"
|
||
|
|
#include "qdataquality.h"
|
||
|
|
#include "qfaulttolerance.h"
|
||
|
|
#include "qconfigmanager.h"
|
||
|
|
|
||
|
|
class QTradeCore : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
static QTradeCore* instance();
|
||
|
|
|
||
|
|
// 核心服务访问
|
||
|
|
QSubscriptionManager* subscriptionManager();
|
||
|
|
QOrderProcessor* orderProcessor();
|
||
|
|
QBigOrderManager* bigOrderManager();
|
||
|
|
QLogManager* logManager();
|
||
|
|
QEventBus* eventBus();
|
||
|
|
|
||
|
|
// 新增系统组件访问
|
||
|
|
QDataBuffer* dataBuffer();
|
||
|
|
QDataQuality* dataQuality();
|
||
|
|
QFaultTolerance* faultTolerance();
|
||
|
|
QConfigManager* configManager();
|
||
|
|
|
||
|
|
// 系统控制
|
||
|
|
void initialize();
|
||
|
|
void shutdown();
|
||
|
|
|
||
|
|
// 系统状态
|
||
|
|
bool isInitialized() const { return m_initialized; }
|
||
|
|
QString getSystemStatus() const;
|
||
|
|
|
||
|
|
signals:
|
||
|
|
void systemInitialized();
|
||
|
|
void systemShutdown();
|
||
|
|
void errorOccurred(const QString& error);
|
||
|
|
|
||
|
|
private:
|
||
|
|
explicit QTradeCore(QObject *parent = nullptr);
|
||
|
|
~QTradeCore();
|
||
|
|
|
||
|
|
bool m_initialized = false;
|
||
|
|
|
||
|
|
QSubscriptionManager* m_subscriptionManager = nullptr;
|
||
|
|
QOrderProcessor* m_orderProcessor = nullptr;
|
||
|
|
QBigOrderManager* m_bigOrderManager = nullptr;
|
||
|
|
QLogManager* m_logManager = nullptr;
|
||
|
|
QEventBus* m_eventBus = nullptr;
|
||
|
|
|
||
|
|
// 新增系统组件
|
||
|
|
QDataBuffer* m_dataBuffer = nullptr;
|
||
|
|
QDataQuality* m_dataQuality = nullptr;
|
||
|
|
QFaultTolerance* m_faultTolerance = nullptr;
|
||
|
|
QConfigManager* m_configManager = nullptr;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // QTRADECORE_H
|