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

📄 path.h

📁 这是我写的数据结构的课设
💻 H
字号:
// Path.h: interface for the CPath class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PATH_H__E6B222C4_D3F5_4874_A8AC_2AFCA884D083__INCLUDED_)
#define AFX_PATH_H__E6B222C4_D3F5_4874_A8AC_2AFCA884D083__INCLUDED_

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

//如果想要串行化还要再加入宏
class CPath : public CObject  
{
private:	
	BOOL m_bIsVisited;		//是否已经被访问过
	char m_name[40];			//道路名称
	double m_length;			//道路长
	CPoint m_location1;	//本路径景点或建筑的位置
	CPath * m_path1;		//以m_location1为顶点的另一条道路
	CPoint m_location2;	//本路径景点或建筑的位置
	CPath * m_path2;		//以m_location2为顶点的另一条道路
public:
	//道路的长度自行计算??????目前还没有实现!!!!!!!!!!!!!
	void SetPath2(CPath * path2);
	CPath * GetPath2();
	void SetLocation2(CPoint location2);
	CPoint GetLocation2();
	void SetPath1(CPath * path1);
	CPath * GetPath1();
	void SetLocation1(CPoint location1);
	CPoint GetLocation1();
	void SetLength();
	double GetLength();
	void SetName(CString name);
	CString GetName();
	void SetIsVisited();
	BOOL GetIsVisited();
public:	
	void Update();
	void ShowInformation();
	void Draw(CDC* pDC);
	CPath* IsLocatedIn(CPoint point);
	CPath();
	//道路的长度自行计算
	CPath(CString name,			//道路名称	
		  class CPoint location1,	//本路径景点或建筑的位置
		  class CPoint location2,	//本路径景点或建筑的位置
	      CPath * path1 =NULL,	//以m_location1为顶点的另一条道路		  
		  CPath * path2 = NULL);//以m_location2为顶点的另一条道路	
	virtual ~CPath();
friend class CVertex;		//友元类
friend class CCollegeMap;	//友元类
};

#endif // !defined(AFX_PATH_H__E6B222C4_D3F5_4874_A8AC_2AFCA884D083__INCLUDED_)

⌨️ 快捷键说明

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