⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 磁盘管理doc.h

📁 用C++实现的模拟操作系统中磁盘管理的实现,代码通俗易懂!适合于初学者!
💻 H
字号:
// 磁盘管理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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -