📄 liedoc.h
字号:
#if !defined(AFX_LIEDOC_H__BBDD79A1_17AE_11D5_BFEA_0040054EF889__INCLUDED_)
#define AFX_LIEDOC_H__BBDD79A1_17AE_11D5_BFEA_0040054EF889__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LieDoc.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CLieDoc document
#include "fstream.h"
class CWaitDlg;
class CLieDoc;
#define IDH_Cont0 0
#define IDH_Cont1 1
#define IDH_Cont2 2
#define IDH_Cont3 3
#define IDH_Cont4 4
#define IDH_Cont5 5
#define IDH_Cont6 6
#define IDH_Cont7 7
#define IDH_Cont8 8
#define IDH_Cont9 9
#define IDH_Cont10 10
//struct KYLIN_PARAM
/* 说明:
该结构由两个工作线程使用
pDoc 为文档指针
ppWaitDlg为 文档的成员m_pWaitDlg的地址,指向等待对话框,便于在线程中
发消息给该对话框:运算完成.
hThreadToWait 被等待的线程的句柄(即主运算线程句柄,便于等待线程等待其
结束.
inFile1 输入文件名
inFlag 指定算法代码
outFlag 指定运算之后的状态,由线程写入
outFile1 输出文件名
(参加 lieDOC.CPP中 对于两个线程关系及主要运算流程的说明)
*/
typedef struct _KYLIN_PARAM
{
// in
CLieDoc* pDoc;
CWaitDlg** ppWaitDlg;
HANDLE handle1; //[in]
HANDLE hThreadToWait; //[in] only used by the second thread
HANDLE handle3; //reserved
CString inFile1; //[in] input file name
CString inFile2; //reserved
int inFlag; //[in]nubmer of algorithm
CString outFile1,outFile2; //[out]output file name
int outFlag; //[out]postcondition
}KYLIN_PARAM,*P_KYLIN_PARAM;
class CLieDoc : public CDocument
{
protected:
CLieDoc(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CLieDoc)
// Attributes
public:
//处理算法的主要程序
static UINT PerformFunc( LPVOID pParam );
static UINT PerformAndWait( LPVOID pParam);
private:
P_KYLIN_PARAM m_pParam;
CWaitDlg *m_pWaitDlg;
public:
virtual const char* GetStyle()const {return m_strStyle;}
virtual int GetStage()const {return m_iStage;}
virtual int GetRecordNum()const{return m_iRecordNum;}
virtual BOOL HasBlock()const { return m_bHasBlock;}
virtual int GetBlockNum()const{ return m_bHasBlock?m_iBlockNum:0;}
virtual int GetAttrNum()const { return m_iAttrNum;}
virtual BOOL HasFloat()const { return m_bHasFloat;}
virtual BOOL HasString()const { return iString>0?TRUE:FALSE;}
virtual int GetStringAttNum()const {return iString;}
virtual int GetFloatAttNum()const {return iFloat;}
virtual int GetIntAttNum()const {return iInt;}
virtual char** GetAttrName()const{ return m_pstrAttrName;}
virtual BOOL IsComplete()const{ return m_bIsComplete;}
virtual const char* GetDocType()const{ return "";}
virtual BOOL SetComplete(bool value){return m_bIsComplete=value;}
virtual BOOL HasRule();
protected:
char* m_sRecNum;// 保存文件头中记录数前面的字符串
int m_iReductedNum;//?
int * m_ipReductedAttr;
char m_strStyle[20]; //style
int m_iStage; //stage,valid only if it's 1,2,3 or 0
int m_iRecordNum; //Record number
int m_iRuleNum; //Rule number
int m_iBlockNum; //valid noly when iStage==3
int m_iAttrNum; //condition attributes number
int m_iTestNum;
BOOL m_bHasFloat; //true when the data hea float-type date
BOOL m_bHasBlock;
BOOL m_bHasRule;
BOOL m_bIsComplete;
CString m_strTextOfInfo; //text-type of all information above
//prepare to show it in view
char** m_pstrAttrName; //condion attributes and decision attribute name
char** m_pstrAttrType; //data type
HWND hWndDlg;
public:
int iString,iInt,iFloat; //number of each datatype
// BOOL NotStringComplete;// 存在遗矢的非字符数据需要补齐
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLieDoc)
public:
virtual void Serialize(CArchive& ar); // overridden for document i/o
//}}AFX_VIRTUAL
// Implementation
public:
char* GetStrBeforeRecordNum()const;
void CloseWaitDlg();
BOOL ReadFileHeader(ifstream& in);
BOOL BatchRunAlgorithm(int flag,const CString& inputfile,
/*inout*/ CString& outputfile,BOOL bOpenOutputFile);
void OpenWithNotepad(const CString& target);
void RunAlgorithm(int);
virtual ~CLieDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CLieDoc)
afx_msg void OnRsAttrReduNormal();
afx_msg void OnRsAttrReduMatrix();
afx_msg void OnRsAttrReduSelect();
afx_msg void OnRsAttrReduInc();
afx_msg void OnRsValueReduNormal();
afx_msg void OnRsValueReduQif();
afx_msg void OnRsValueReduMatrix();
afx_msg void OnRsValueReduInc();
afx_msg void OnRsValueReduSkowron();
afx_msg void OnRsSpecIncmpl();
afx_msg void OnRsSpecIncmpl2();
afx_msg void OnFileShowdata();
afx_msg void OnUpdateRsAttrReduInc(CCmdUI* pCmdUI);//属性约简菜单有效无效
afx_msg void OnUpdateRsAttrReduMatrix(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsAttrReduNormal(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsAttrReduSelect(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsValueReduInc(CCmdUI* pCmdUI);//值约简
afx_msg void OnUpdateRsValueReduMatrix(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsValueReduNormal(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsValueReduQif(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsValueReduSkowron(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl(CCmdUI* pCmdUI);//?
afx_msg void OnUpdateRsSpecIncmpl2(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl3(CCmdUI* pCmdUI);
afx_msg void OnRsSpecIncmpl3();
afx_msg void OnRsDiscreteMini();
afx_msg void OnRsDiscreteMydis();
afx_msg void OnRsDiscreteNaive();
afx_msg void OnRsDiscreteOne();
afx_msg void OnRsDiscreteFour();
afx_msg void OnRsDiscreteFive();
afx_msg void OnRsDiscreteSeminaive();
afx_msg void OnRsDiscreteTwo();
afx_msg void OnRsDiscreteThree();
afx_msg void OnUpdateRsDiscreteTwo(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteSeminaive(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteOne(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteThree(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteFour(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteFive(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteNaive(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteMydis(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteMini(CCmdUI* pCmdUI);
afx_msg void OnRsCompleteDel();
afx_msg void OnRsCompleteMet();
afx_msg void OnUpdateRsCompleteDel(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsCompleteMet(CCmdUI* pCmdUI);
afx_msg void OnFileSaveAs();
afx_msg void OnNotpad();
afx_msg void OnRsBatch();
afx_msg void OnUpdateRsBatch(CCmdUI* pCmdUI);
afx_msg void OnRsRecognise();
afx_msg void OnRsTest();
afx_msg void OnUpdateRsTest(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsRecognise(CCmdUI* pCmdUI);
afx_msg void OnRsAttrReduEntropy1();
afx_msg void OnUpdateRsAttrReduEntropy1(CCmdUI* pCmdUI);
afx_msg void OnRsAttrReduEntropy2();
afx_msg void OnUpdateRsAttrReduEntropy2(CCmdUI* pCmdUI);
afx_msg void OnRsAttrReduMibark();
afx_msg void OnUpdateRsAttrReduMibark(CCmdUI* pCmdUI);
afx_msg void OnToolMissvalue();
afx_msg void OnUpdateToolMissvalue(CCmdUI* pCmdUI);
afx_msg void OnRsSpecIncmpl2Test();
afx_msg void OnRsSpecIncmpl3Test();
afx_msg void OnRsSpecIncmpl3Recognise();
afx_msg void OnRsSpecIncmpl2Recognise();
afx_msg void OnRsSpecIncmplRecognise();
afx_msg void OnRsSpecIncmplTest();
afx_msg void OnUpdateRsSpecIncmplRecognise(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmplTest(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl2Recognise(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl2Test(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl3Recognise(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsSpecIncmpl3Test(CCmdUI* pCmdUI);
afx_msg void OnRsCompleteCombination();
afx_msg void OnRsCompleteMean();
afx_msg void OnRsCompleteConditionMean();
afx_msg void OnRsCompleteConditionCombination();
afx_msg void OnRsDiscreteEqualWidth();
afx_msg void OnRsDiscreteBreakPoint();
afx_msg void OnRsDiscreteEntropy();
afx_msg void OnRsDiscreteEqualFrequency();
afx_msg void OnRsDiscreteManual();
afx_msg void OnRsAttrReduDynamic();
afx_msg void OnFileShowstat();
afx_msg void OnRsAttrReduManual();
afx_msg void OnToolFilter();
afx_msg void OnRsAttrReduGenetic1();//基因算法
afx_msg void OnRsAttrReduGenetic2();
afx_msg void OnRsAttrReduGenetic3();
afx_msg void OnFileCloseAll();
afx_msg void OnUpdateRsDiscreteEqualWidth(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteEqualFrequency(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteManual(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteEntropy(CCmdUI* pCmdUI);
afx_msg void OnUpdateRsDiscreteBreakPoint(CCmdUI* pCmdUI);
afx_msg void OnUpdateToolFilter(CCmdUI* pCmdUI);
afx_msg void OnAtHexiao();
afx_msg void OnUpdateAtHexiao(CCmdUI* pCmdUI);
afx_msg void OnOpenDatabase();
afx_msg void OnUpdateOpenDatabase(CCmdUI* pCmdUI);
afx_msg void OnUpdateOpenDb(CCmdUI* pCmdUI);
afx_msg void OnOpenDb();
//}}AFX_MSG
afx_msg void OnKylinDataHanleFinished();
afx_msg void OnKylinDataHanleError();
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LIEDOC_H__BBDD79A1_17AE_11D5_BFEA_0040054EF889__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -