56 lines
1.2 KiB
C
56 lines
1.2 KiB
C
|
|
/**
|
|||
|
|
* @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
|