command.h

来自「故障诊断工作涉及的领域相当广泛」· C头文件 代码 · 共 104 行

H
104
字号
// commanf.h: interface for the commanf class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMMAND_H__ECC81653_F677_46B1_B1CC_5E2B800BA01C__INCLUDED_)
#define AFX_COMMAND_H__ECC81653_F677_46B1_B1CC_5E2B800BA01C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "AFX.H"
#include "clscid.h"
#include "myinterface.h"
enum conect_type{com_std=0,com_disp=1,function=2,emptyfunc=3};
enum language{chinese=0,english=1}; 
enum grade{base=0,prepare=1,proccess=2,special=3,stage4=4,stage5=5,stage6=6};
class mydata;
#define MAX_CONECTOR_COUNT 32
#include "func_template.h"
enum mytype{type_char=0,type_short=1,type_int=2,type_dou=3,type_mw=4,\
type_var=5,type_com=6,type_info=7};
class _declspec(dllexport) tagconector{
public:
	void Serialize(CArchive& ar);
	BOOL xxx;
	tagconector();
	~tagconector();
	char* function_name;//接口名称
	int function_length;//接口名称长度
	char* description;//接口描述
	int description_length;//接口描述长度
	mytype type_in;//参数类型
	int in_param_cnt;//输入参数数量
	int out_param_cnt;//输出参数数量
	friend _declspec(dllexport)	void operator <<(CArchive& ar,tagconector& it);
	friend	 _declspec(dllexport) void operator >>(CArchive& ar,tagconector& it);
union{
	pdaoai doufunc;
	pdvovi varfunc;
	pdmwomwi mwfunc;
	pdmxomxi mxfunc;
	}pfunc;
//	LRESULT daoai(double* out,unsigned int* out_cnt,\
//						  const double* in,unsigned int in_cnt);
//	LRESULT dvovi(VARIANT* out,unsigned int* out_cnt,\
//						  const VARIANT* in,unsigned int in_cnt);
//	LRESULT dmwomwi(mwArray* out,unsigned int* out_cnt,\
//						  const mwArray* in,unsigned int in_cnt);
//	LRESULT dmxomxi(mxArray* out,unsigned int* out_cnt,\
//						  const mxArray* in,unsigned int in_cnt);
	};
//用于注视的命令解释,注视负责发出通知并填充所需要的数据,应用程序负责算法,得到结果后通知
//显示试图输出速需要的信息
class  _declspec(dllexport) command : public CObject,myinterface  
{
CString tinfo;
int	icount_in;
mydata*	data_in;
char *run_info;
public:		
	CLSID clsid;
	IID iid;
	IID libid;
	grade level;// 模块级别
	language cmd_lan;//模块语言
	conect_type cmd_type;//接口类型
	int cmd_id;//模块标志
	char* cmd_name;//模块名称 
	int name_length;//模块名称长度 
	HMODULE hdll;//模块句柄
	char* cmd_info;//模块详细信息
	int info_length;//模块信息长度
	char* cmd_where;//模块磁盘路径及相关信息
	int where_length;//模块磁盘路径及相关信息长度
	unsigned conector_cnt;//接口数量
	tagconector conector[MAX_CONECTOR_COUNT];//接口
	//int icount_in;//输入参数数量
	//mydata* data_in;//输入参数的指针拷贝
  //	int icount_out;//输出参数数量
  //	mydata* data_out;//输出参数的指针拷贝
public:	void key();
	friend class readmoudleinfo;
	friend class CRichtestView;
	void attach(int count,char* name,int name_length,char* info,int info_length,char* where,int size);
//	virtual BOOL check()=0;
//	virtual BOOL go()=0;
//	virtual void out_create()=0;	
public:
	int go(int funcnumber,const mydata* in, mydata* out);
	char* get_run_info() const;
	LRESULT go(mydata* data_in,int* pcid,int cnt);
	command(mydata *p_in,int n);
	command();
void operator = (command& op);
	virtual ~command();
friend	 _declspec(dllexport)  void assign(command* op0,command& op,int);
friend	 _declspec(dllexport) void operator <<(CArchive& ar,command& it);
friend	 _declspec(dllexport) void operator >>(CArchive& ar,command& it);
		void Serialize(CArchive&  ar);
protected:
	DECLARE_SERIAL(command);
};
#endif // !defined(AFX_COMMANF_H__ECC81653_F677_46B1_B1CC_5E2B800BA01C__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?