45 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
#include "IVrConfig.h" // 必须在 BaseConfigManager.h 之前包含
#include "BaseConfigManager.h"
/**
* @brief TunnelChannel 应用的配置管理器
*
* 继承自 BaseConfigManager提供 TunnelChannel 特定的配置处理逻辑
*/
class ConfigManager : public BaseConfigManager
{
public:
ConfigManager() = default;
~ConfigManager() = default;
// 重写 Initialize 以禁用共享内存监控TunnelChannelApp 不需要)
bool Initialize(const std::string& configFilePath = "") override;
// 实现 LoadConfigFromFile 以适配 TunnelChannel 的 IVrConfig API
bool LoadConfigFromFile(const std::string& filePath) override;
// 获取海康相机配置列表
std::vector<HikCameraConfig> GetHikCameraList() const;
// 获取当前配置(便捷方法,直接返回 ConfigResult
ConfigResult GetCurrentConfig() const {
return GetConfigResult();
}
// 设置配置变化通知回调
void SetConfigChangeNotify(IVrConfigChangeNotify* notify) {
if (m_pVrConfig) {
m_pVrConfig->SetConfigChangeNotify(notify);
}
}
protected:
// 重写默认配置初始化,提供 TunnelChannel 特定的默认配置
bool _InitializeDefaultConfig() override;
};
#endif // CONFIGMANAGER_H