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

📄 amazedoc.h

📁 C++Example实用的算法:包括枚举
💻 H
字号:
// AmazeDoc.h : interface of the CAmazeDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_)
#define AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_

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

#define AMAZEDATA(x, y) (*(m_pData + (2*m_nHeight+2) * (x) + y))

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

// Attributes
private:
	long* m_pData;
	long  m_nWidth, m_nHeight;

public:
	long* m_pDisData;
	long m_nDisNum;

// Operations
public:
	void CreateAmaze();
	void DisAmaze();
	void DeleteAmaze(){
		if(m_pData){delete [] m_pData; m_pData = NULL;	}
		if(m_pDisData){delete [] m_pDisData; m_pDisData = NULL;} 
	}

	long AmazeData(int x, int y)
	{ return *(m_pData + (2*m_nHeight+2) * (x) + y); }

	void SetWidth(int w)
	{ m_nWidth = w; }
	long GetWidth()
	{ return m_nWidth; }

	void SetHeight(int h)
	{ m_nHeight = h; }
	long GetHeight()
	{ return m_nHeight; }

	bool HaveAmaze()
	{ return m_pData != NULL; }

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

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

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CAmazeDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_AMAZEDOC_H__EEA2E9BF_90C8_11D4_A154_89D8A9A95671__INCLUDED_)

⌨️ 快捷键说明

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