#include "ConfigManager.h" #include "VrLog.h" // LapWeld 应用的 ConfigManager 实现 // 所有通用功能都在 BaseConfigManager 中实现 // 这里只实现 LapWeld 特定的功能 // 重写 LoadConfigFromFile 以适配 LapWeld 的 IVrConfig API // LapWeld 使用返回值方式:ConfigResult LoadConfig(const std::string& filePath) bool ConfigManager::LoadConfigFromFile(const std::string& filePath) { if (!m_pVrConfig) { LOG_ERROR("VrConfig instance not available\n"); return false; } try { // LapWeld 使用返回值方式 ConfigResult configResult = m_pVrConfig->LoadConfig(filePath); // 使用基类的公共逻辑应用配置 return _ApplyLoadedConfig(configResult, filePath); } catch (const std::exception& e) { LOG_ERROR("Failed to load configuration from file %s: %s\n", filePath.c_str(), e.what()); return false; } } // 示例:如果需要自定义标定参数处理 /* bool ConfigManager::OnCalibParamCommand(const CalibConfigParam& param) { LOG_INFO("LapWeld specific calibration handling for camera %d\n", param.cameraIndex); // 实现 LapWeld 特定的标定逻辑 return true; } */