You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.9 KiB
C++

/*******************************************************************
*文件说明: 流程类接口文件
*作者: logos
*日期: 2020/08/11
*修改日志: 2020/05/11 RS0030 创建
***********************************************************************/
#pragma once
#ifndef _DLL_INCLUDE_IFLOW_H
#define _DLL_INCLUDE_IFLOW_H
#ifndef EXPORT_C
#define EXPORT_C extern "C"
#endif
#ifndef WINAPI
#define WINAPI __stdcall
#endif
class IFlow
{//流程类借口
public:
virtual int Start(int sid = 0) = 0; //启动流程
virtual int Debug(int id) = 0; //调试 可传入步骤ID、节点ID
virtual int Pause() = 0; //暂停
virtual int Continue() = 0; //暂停恢复
virtual int Stop() = 0; //手动停止
virtual int Reset() = 0; //手动停止并重置
virtual int GetStatus() = 0; //获取流程状态
virtual int GetRunCT() = 0; //获取运行CT
virtual int GetRunStep() = 0; //获取当前运行步骤ID
};
//导出接口
EXPORT_C int WINAPI IFlow_Start(IFlow* p, int sid = 0);
EXPORT_C int WINAPI IFlow_Debug(IFlow* p, int id);
EXPORT_C int WINAPI IFlow_Pause(IFlow* p);
EXPORT_C int WINAPI IFlow_Continue(IFlow* p);
EXPORT_C int WINAPI IFlow_Stop(IFlow* p);
EXPORT_C int WINAPI IFlow_Reset(IFlow* p);
EXPORT_C int WINAPI IFlow_GetStatus(IFlow* p);
EXPORT_C int WINAPI IFlow_GetRunCT(IFlow* p);
EXPORT_C int WINAPI IFlow_GetRunStep(IFlow* p);
/*********************************************
*Function: 获取流程对象操作接口
*Intput: pid 流程ID
*Output: NULL
*Return: 成功返回流程对象接口类,失败返回NULL
*********************************************/
EXPORT_C IFlow* WINAPI get_iflow(int pid);
/*********************************************
*Function: 获取流程对象操作接口
*Intput: pszname 流程名称
*Output: NULL
*Return: 成功返回流程对象接口类,失败返回NULL
*********************************************/
EXPORT_C IFlow* WINAPI get_iflows(const char* pszname);
#endif //防止重复包含