arcpath.cpp

来自「这是书上的代码」· C++ 代码 · 共 57 行

CPP
57
字号
// ArcPath.cpp: implementation of the CArcPath class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "const.h"
#include "paintobj.h"
#include "ArcPath.h"
#include "Path.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

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

CArcPath::CArcPath()
{

}

CArcPath::~CArcPath()
{

}
BOOL CArcPath::Create(CArchive& ar,USHORT ver)
{	// Load the fields in the base class
	if (!CPath::Create(ar,ver))
		return FALSE;
	// Load the fields specific to this class
	ar >> m_uObstacle
	   >> m_uHeading
		>> m_fCenterx
		>> m_fCentery
		>> m_uDirection;
	return TRUE;
}

//
//   Save the characteristic part of the arc-type path's data to a binary file.
//
BOOL CArcPath::Save(CArchive& ar,USHORT ver)
{
	// Load the fields in the base class
	if (!CPath::Save(ar,ver))
		return FALSE;
	// Load the fields specific to this class
	ar << m_uObstacle
		<< m_uHeading
		<< m_fCenterx
		<< m_fCentery
		<< m_uDirection;
	return TRUE;
}

⌨️ 快捷键说明

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