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

📄 path.cpp

📁 这是书上的代码
💻 CPP
字号:
// Path.cpp: implementation of the CPath class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "const.h"
#include "paintobj.h"
#include "Path.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CPath::CPath()
{
	m_uExtType=120; // Extended type
}

CPath::~CPath()
{

}
BOOL CPath::Create(CArchive& ar,USHORT ver)
{
	// Read the path data
		ar >> m_uId
		>> m_uStartNode
		>> m_uEndNode
		>> m_fVeloLimit
		>> m_uGuideType;
		if(ver==2)
			ar >> m_uExtType;
	// Success, return TRUE
	return TRUE;	
}

BOOL CPath::Save(CArchive& ar,USHORT ver)
{
	// Save the path data
	ar << m_uId
	   << m_uStartNode
		<< m_uEndNode
		<< m_fVeloLimit
		<< m_uGuideType;
		if(ver==2)
			ar << m_uExtType;
	// Success, return TRUE
	return TRUE;	
}

⌨️ 快捷键说明

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