logplus/Workflow/WFEngine/WorkflowEngine/include/WorkflowChecker.h
2026-01-16 17:18:41 +08:00

56 lines
1.2 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.

/**
* @file CWorkflowChecker.h
* @brief 工作流检查器
*
* @author 黄军
* @date 2011-10-20
*/
#ifndef PAI_FRAME_WORKFLOWENGINE_WORKFLOWCHECKER_H
#define PAI_FRAME_WORKFLOWENGINE_WORKFLOWCHECKER_H
#include <string>
#include <vector>
#include "WorkFlowFile.h"
#include "Turtle.h"
namespace pai {
namespace workflow {
class PAI_WORKFLOWENGINE_EXPORT CWorkflowChecker {
public:
CWorkflowChecker();
virtual ~CWorkflowChecker();
/**@brief 校验工作流文件
* @param[in] workflow 待检验的工作流对象
* @param[out] strErrorMsg 校验的错误信息其中调用具体子类的检验方法StepCheck
*/
bool Check(CWorkFlowFile* workflow,std::string& strErrorMsg);
/**
* @brief 清理添加了具体子检验器的容器
*/
void CleanChecker();
/**@brief 设置校验器集合
* @param[in] checkerlist 输入待检验的子类方法
*/
void SetCheckerList(const std::vector<CWorkflowChecker*>& checkerlist);
protected:
/**
* @brief 具体子类校验器检验方法实现
*/
virtual bool StepCheck(CWorkFlowFile* workflow,std::string& strErrorMsg);
private:
/**
* @brief 添加默认的子校验器
*/
void LoadDefaultCheckerList();
std::vector<CWorkflowChecker*> checkerlist;
};
}
}
#endif