Update 更新文档
This commit is contained in:
101
Sqbase/Sqbase.h
Normal file
101
Sqbase/Sqbase.h
Normal file
@@ -0,0 +1,101 @@
|
||||
#ifndef SQBASE_H
|
||||
#define SQBASE_H
|
||||
|
||||
// Core System Components
|
||||
#include "core/qtradecore.h"
|
||||
|
||||
// Data Processing Components
|
||||
#include "data/qdatabuffer.h"
|
||||
#include "data/qdataquality.h"
|
||||
#include "data/qorderprocessor.h"
|
||||
#include "data/qbigordermanager.h"
|
||||
#include "data/OrderBookParser.h"
|
||||
|
||||
// Network and Communication Components
|
||||
#include "network/qfaulttolerance.h"
|
||||
#include "network/qsubscriptionmanager.h"
|
||||
|
||||
// Configuration and Management Components
|
||||
#include "config/qconfigmanager.h"
|
||||
#include "config/qlogmanager.h"
|
||||
|
||||
// Utility Components
|
||||
#include "utils/qeventbus.h"
|
||||
#include "utils/ObjectPool.h"
|
||||
#include "utils/ordertypedelegate.h"
|
||||
|
||||
// Common Structures
|
||||
#include "BZStruct.h"
|
||||
|
||||
// System-wide constants and definitions
|
||||
namespace Sqbase {
|
||||
|
||||
// System initialization flags
|
||||
enum SystemInitFlags {
|
||||
InitDataBuffer = 0x01,
|
||||
InitDataQuality = 0x02,
|
||||
InitFaultTolerance = 0x04,
|
||||
InitConfigManager = 0x08,
|
||||
InitAll = 0x0F
|
||||
};
|
||||
|
||||
// System status enumeration
|
||||
enum class SystemStatus {
|
||||
Uninitialized,
|
||||
Initializing,
|
||||
Running,
|
||||
Degraded,
|
||||
Stopping,
|
||||
Stopped,
|
||||
Error
|
||||
};
|
||||
|
||||
// System configuration
|
||||
struct SystemConfig {
|
||||
int bufferSize = 10000;
|
||||
int maxPacketsPerSecond = 1000;
|
||||
int heartbeatInterval = 30000;
|
||||
int reconnectAttempts = 10;
|
||||
bool enableDataValidation = true;
|
||||
bool enableFaultTolerance = true;
|
||||
bool enablePerformanceMonitoring = true;
|
||||
};
|
||||
|
||||
// Quick access to core components (singleton pattern)
|
||||
class System {
|
||||
public:
|
||||
// Core system access
|
||||
static QTradeCore* core();
|
||||
|
||||
// Data layer access
|
||||
static QDataBuffer* dataBuffer();
|
||||
static QDataQuality* dataQuality();
|
||||
static QOrderProcessor* orderProcessor();
|
||||
static QBigOrderManager* bigOrderManager();
|
||||
|
||||
// Network layer access
|
||||
static QFaultTolerance* faultTolerance();
|
||||
static QSubscriptionManager* subscriptionManager();
|
||||
|
||||
// Configuration layer access
|
||||
static QConfigManager* configManager();
|
||||
static QLogManager* logManager();
|
||||
|
||||
// Utility layer access
|
||||
static QEventBus* eventBus();
|
||||
|
||||
// System control
|
||||
static bool initialize(const SystemConfig& config = SystemConfig(), int flags = InitAll);
|
||||
static void shutdown();
|
||||
static SystemStatus status();
|
||||
static QString statusString();
|
||||
|
||||
// System information
|
||||
static QString version();
|
||||
static QDateTime buildTime();
|
||||
static QString systemInfo();
|
||||
};
|
||||
|
||||
} // namespace Sqbase
|
||||
|
||||
#endif // SQBASE_H
|
||||
Reference in New Issue
Block a user