You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
65 lines
1.4 KiB
/* Copyright 2020 Siemens Digital Industries Software
|
|
==================================================
|
|
Copyright 2012.
|
|
Siemens Product Lifecycle Management Software Inc.
|
|
All Rights Reserved.
|
|
==================================================
|
|
Copyright 2020 Siemens Digital Industries Software */
|
|
|
|
/**
|
|
mfg_validation_check_interface.h
|
|
|
|
example for a validation check registered as a callback function
|
|
|
|
*/
|
|
#ifndef MFG_VALIDATION_CHECK_INTERFACE_H
|
|
#define MFG_VALIDATION_CHECK_INTERFACE_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <unidefs.h>
|
|
|
|
#include <mfg/libmfg_exports.h>
|
|
|
|
struct ValidationErrorType
|
|
{
|
|
enum
|
|
{
|
|
Error=0,
|
|
Warning=1,
|
|
Notice=2
|
|
};
|
|
};
|
|
|
|
|
|
struct ValidationNotice
|
|
{
|
|
tag_t nonValidObject; /**< The tag of the object and its attachments which the validation failed */
|
|
int msgId;
|
|
std::string msg;
|
|
int errType;
|
|
};
|
|
|
|
|
|
|
|
struct validationCheckParam
|
|
{
|
|
std::string type;
|
|
std::string name;
|
|
std::string library;
|
|
tag_t function_tag;
|
|
};
|
|
|
|
struct ValidationCheckResponse
|
|
{
|
|
tag_t targetObject; /**< The line which was sent in the input vector. */
|
|
validationCheckParam validationParam;
|
|
std::vector< ValidationNotice > validationNotices;
|
|
};
|
|
|
|
typedef int (*validation_check_callback_fn_t)(const std::vector<tag_t> & targetObjects,const std::string& closureRuleName,std::vector<ValidationCheckResponse> & response);
|
|
|
|
|
|
#include <mfg/libmfg_undef.h>
|
|
#endif
|