2025-05-30 14:16:16 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "XNMonitorServer_global.h"
|
|
|
|
|
#include "DataMonitor.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief DataMonitor工厂类,用于创建不同类型的DataMonitor实例
|
|
|
|
|
*/
|
|
|
|
|
class XNMONITORSERVER_EXPORT DataMonitorFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
2025-06-24 16:07:07 +08:00
|
|
|
|
static DataMonitorBasePtr GetInstance(const std::string &interfaceName);
|
2025-05-30 14:16:16 +08:00
|
|
|
|
|
2025-06-24 16:07:07 +08:00
|
|
|
|
static void ReleaseInstance(const std::string &interfaceName);
|
2025-05-30 14:16:16 +08:00
|
|
|
|
|
2025-06-24 16:07:07 +08:00
|
|
|
|
// 检查接口是否存在
|
|
|
|
|
static bool HasInterface(const std::string &interfaceName);
|
2025-05-30 14:16:16 +08:00
|
|
|
|
|
2025-06-24 16:07:07 +08:00
|
|
|
|
// 获取所有已注册的接口名称
|
|
|
|
|
static std::vector<std::string> GetRegisteredInterfaces();
|
2025-05-30 14:16:16 +08:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
DataMonitorFactory() = delete;
|
|
|
|
|
~DataMonitorFactory() = delete;
|
|
|
|
|
};
|