123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef __I_ERRORCODE_H__
- #define __I_ERRORCODE_H__
- // *****************************************************************************
- // 版权所有(C)2023~2099 上海骄成超声波技术有限公司
- // 保留所有权利
- // *****************************************************************************
- // 作者 : 陆蕴凡
- // 版本 : 1.0
- // 代码创建日期:2025/01/09
- // 版本更新日期:2025/01/09
- // 功能说明:查找错误码信息接口
- // *****************************************************************************
- #include <vector>
- #include <string>
- #include "TypeDef.h"
- namespace JVision
- {
- /**
- * @brief 查找错误码信息的接口基类
- *
- */
- class JVision_API IErrorCode
- {
- public:
- virtual ~IErrorCode() = 0 {}
- /**
- * @brief 获取错误码对应的错误原因
- * @param[in] code 错误码
- *
- * @return std::string 错误原因,中文字符
- */
- virtual std::string ResultStr(JVision::ResultCode code) = 0;
- /**
- * @brief 获取错误码接口的实现类指针
- */
- static IErrorCode* GetErrorCode();
- /**
- * 使用案例:
- *
- * JVision::ExecuteErrorCode* errorPtr = JVision::IErrorCode::GetErrorCode();
- *std::string errorMsg = errorPtr->ResultStr(result);
- */
- };
- }
- #endif
|