磁盘管理doc.h

来自「用C++实现的模拟操作系统中磁盘管理的实现,代码通俗易懂!适合于初学者!」· C头文件 代码 · 共 97 行

H
97
字号
// 磁盘管理Doc.h : interface of the CMyDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DOC_H__31BA6656_01C3_44A8_8C53_1577B3786A96__INCLUDED_)
#define AFX_DOC_H__31BA6656_01C3_44A8_8C53_1577B3786A96__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class DiskDate
{
public:
    int m_CylNum;
	int m_DiskNum;
	int m_PhyNum;
	int m_phys;
	//DiskDate *next;
};


class DistrictTable
{
public:
	int OrderNum ;//页号
	int StarBlock ;//起始块号
	int FreeBlocks ;//空闲可用块数
	int status  ;//该页状态号 1 表示全部分配,0 表示还有空闲块可用
};



class CMyDoc : public CDocument
{
protected: // create from serialization only
	CMyDoc();
	DECLARE_DYNCREATE(CMyDoc)

// Attributes
public:
	DiskDate disk;
	//DiskDate *head;
	//DiskDate *newp;
	//DiskDate *hp;
	//DiskDate *p;
	//DiskDate *bp;
	int NeedBlock;
	DistrictTable DT[10];
	int Red;
	int bitred;
	int showfree;
	int showbit;
	int BitAry[200];
// Operations

public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMyDoc)
	afx_msg void OnCreatefile();
	afx_msg void OnDelfile();
	afx_msg void OnBitcreatefile();
	afx_msg void OnBitdelfile();
	afx_msg void OnFreeinit();
	afx_msg void OnBitinit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DOC_H__31BA6656_01C3_44A8_8C53_1577B3786A96__INCLUDED_)

⌨️ 快捷键说明

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