www.pudn.com > OSDemo.rar > Tab3.h


#if !defined(AFX_TAB3_H__2C7DF905_795A_429D_8555_FF45C2B14FB3__INCLUDED_) 
#define AFX_TAB3_H__2C7DF905_795A_429D_8555_FF45C2B14FB3__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
// Tab3.h : header file 
// 
 
///////////////////////////////////////////////////////////////////////////// 
// CTab3 dialog 
#include "TabSheet.h" 
#include "MemPage1.h" 
#include "MemPage2.h" 
#include "Math.h" 
#include "MatrixStatic.h" 
#include "BalloonTip.h" 
struct SERIAL 
{ 
    int PageID; 
    bool bFIFO; 
	bool bOPT; 
	bool bLRU; 
	int NextSame; 
}; 
struct MEMITEM 
{ 
	int PageSize; 
	float FIFORate; 
	float OPTRate; 
	float LRURate; 
	HTREEITEM hti; 
	SERIAL Serial[20];  //20个随机生成的页面号测试序列 
}; 
 
 
 
struct PAGEITEM 
{ 
	int vPageSize; 
	float AveFIFORate; 
	float AveOPTRate; 
	float AveLRURate; 
    HTREEITEM hti; 
	CArray VMemItem; 
}; 
 
 
 
 
 
struct MEMSTACK 
{ 
	int PageID; 
	int BlockID; 
	int UseTime;  //表示该页何时被使用 
	int NextSame; 
}; 
 
class CTab3 : public CDialog 
{ 
// Construction 
public: 
	void ShowGraph2(int nPage); 
	void ShowGraph1(); 
	void InitMem(); 
 
	CTab3(CWnd* pParent = NULL);   // standard constructor 
    CArrayFIFOStack; 
	CArrayOPTStack; 
	CArrayLRUStack; 
	//CArrayMemBlock; 
	//CArrayMemPage; 
	PAGEITEM VPageItem[4]; 
	HTREEITEM hti[4]; 
	CMemPage1 TabPage1; 
    CMemPage2 TabPage2; 
// Dialog Data 
	//{{AFX_DATA(CTab3) 
	enum { IDD = IDD_TAB3 }; 
	CMatrixStatic	m_lcd; 
	CTabSheet	m_TabView; 
	CTreeCtrl	m_wndTree; 
	CListCtrl	m_List; 
	//}}AFX_DATA 
     
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CTab3) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
    CBalloonTip* m_pBalloonTip; 
	// Generated message map functions 
	//{{AFX_MSG(CTab3) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnBtnBegin(); 
	afx_msg void OnPaint(); 
	afx_msg void OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 
	afx_msg void OnMnuRedo2(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
private: 
	void ShowBallTip(CPoint pt, CString msg); 
	void InitMemStack(); 
	void ShowMemList(int nPage,int nMem); 
	void AddPageItem(CString PageID,CString FIFO,CString OPT,CString	LRU); 
	float rnd(); 
	UINT PageCount; 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_TAB3_H__2C7DF905_795A_429D_8555_FF45C2B14FB3__INCLUDED_)