📄 lietestdlg.h
字号:
//{{AFX_INCLUDES()
#include "msflexgrid.h"
#include "editgrid.h"
//}}AFX_INCLUDES
#if !defined(AFX_LIETESTDLG_H__908329E1_D08B_11ED_8595_5254AB1C47F6__INCLUDED_)
#define AFX_LIETESTDLG_H__908329E1_D08B_11ED_8595_5254AB1C47F6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LieTestDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CLieTestDlg dialog
#include <afxdb.h>
#include <fstream.h>
class CLieTestDlg : public CDialog
{
// Construction
public:
~CLieTestDlg();
private:
int *pReductedAttr;
char cStyle[10];
int iStage;
int iBlockNum;
BOOL bBlock;
char*** pBlockTable;
int iRuleNum;
char*** pRuleTable;
int iAttNum;
int iAttNumDeleted;
int *pAttDeleted;
char** pAttName;
char** pTestData; //单样本测试样本
char ** pDataType;
int iStringCol;
BOOL bTest;
void SampleRecogniseFew();
void SampleRecogniseMany();
BOOL LoadRule(LPCTSTR lpszRuleFile);
BOOL SetDataType(FILE* fp,int count); //将数据类型读入pDataType中
BOOL SetAttName(FILE* fp,int count); //将属性名称读入pAttName中
BOOL SetBlockTable(FILE* fp,int column,int row); //从文件中读入block到pBlockTable中
BOOL SetRuleTable(FILE* fp,int column,int row); //从文件中读入规则到pRuleTable中
int CLieTestDlg::Match(int rule );
bool CLieTestDlg::IsRuleAttAllNull(int row);
bool CLieTestDlg::IsTestAttAllNull();
public:
BOOL CheckInputFile(LPCTSTR);
CLieTestDlg(CWnd* pParent = NULL); // standard constructor
void SetBeTest(bool newValue) {m_bTest=newValue;}
void SetAttrNum(int newValue){m_iAttrNum=newValue;}
void SetReductedAttr(int *newValue){pReductedAttr=newValue;}
int GetAttrNum() {return m_iAttrNum;}
bool GetFew(){ return m_iFew==0?true:false;}
CString GetInputFilePath(){ return m_strFilePath;}
void SetAttrname(char ** newValue){ m_pstrAttrName=newValue;}
void SetRuleFile(const CString& newValue){ m_strRuleFile=newValue;}
void SetPerformType(int type){ m_nPerformType=type; }
CString m_strFilePath;
CDatabase *pDb;
int iAttNumber;
int iConNum;
int iRecNum;
int recCount;
char OutPath[200];
ofstream fout;
CString m_sql;
CString str;
private:
unsigned m_nPerformType;
CString m_strRuleFile;
bool m_bTest;
int m_iAttrNum;
char **m_pstrAttrName;
bool m_bRuleLoaded; //规则集是否已经装载
// Dialog Data
//{{AFX_DATA(CLieTestDlg)
enum { IDD = IDD_TEST };
CEditGrid m_grid;
CString m_strResult;
CString m_strInputFilePath;
int m_iInputByHand;
int m_iFew;
CString m_strRule;
CString m_table;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLieTestDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CLieTestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnInputbyfile();
afx_msg void OnInputDBfile();
afx_msg void OnInputbyhand();
afx_msg void OnBrowse();
virtual void OnOK();
afx_msg void OnConnectDb();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LIETESTDLG_H__908329E1_D08B_11ED_8595_5254AB1C47F6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -