#include "stdafx.h"
#include "3UtilMath.h"		// For mmroundoff.
#include "3ObjWidePoly.h"	// This header.

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

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif

#define SUPER_CLASS MC3ObjPoly

////////////////////////////////////////////////////////////////////////////
// MC3ObjWidePoly_xZkqqHx_iDiBiDjDiDgPiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjWidePoly::MC3ObjWidePoly
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfO_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.08 Fukushiro M. _xZkqqHx_iNoMjAkMiBeC_xHqqkZx_
 *************************************************************************/
MC3ObjWidePoly::MC3ObjWidePoly ()
{
	// memcmp_xZkqqHx_iCmFiDeJiDhFiDfHiDeGiDeOiDgHjEoEiKhCiCpAiClHiCoJiClNiCnPiBeBiNfMjBkCjBmMiDeNiDiDiDgCiDhGiCoAjBfDiCmEiCePiCmFjGiEiCnPiCoJiBeC_xHqqkZx_
	ASSERT(ALIGNMENT8(sizeof(SUPER_CLASS)) == offsetof(MC3ObjWidePoly, m_mmWidthF));
	memset(&m_mmWidthF, 0, sizeof(MC3ObjWidePoly) - offsetof(MC3ObjWidePoly, m_mmWidthF));

	m_mmWidthF = mmroundoff(4.0);	// _xZkqqHx_iKeKiOgOjDfPiCmMjBnBiCmMjFjNiBeC_xHqqkZx_
	m_mmWidthB = mmroundoff(4.0);	// _xZkqqHx_iPeJjHlJjDfPiCmMjBnBiCmMjFjNiBeC_xHqqkZx_
	m_nWidthSlopeF = 0;		// _xZkqqHx_iKeKiOgOjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_
	m_nWidthSlopeB = 0;		// _xZkqqHx_iPeJjHlJjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_
} // MC3ObjWidePoly::MC3ObjWidePoly.

//----- 05.06.13 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjWidePoly::IsKindOf
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCkKiClBiCmMiMfOiBeBiIlNiCkCiCmNiClBiCmMiMfOiCmMiDfEiDhFiDeOiDiJiDfIiCmMiMfOiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nType	: _xZkqqHx_jClCiCnHiCoJiMfOiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	TRUE	: nType_xZkqqHx_iMfOiBeBiIlNiCkCiCmNiClLiCmMiDfEiDhFiDeOiDiJiDfIiCmMiPoKiNiH_xHqqkZx_
// *			FALSE	: _xZkqqHx_iClLiCkEiCmFiCmIiCkCiPoKiNiH_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.08 Fukushiro M. _xZkqqHx_iNoMjAkMiBeC_xHqqkZx_
// *************************************************************************/
//BOOL MC3ObjWidePoly::IsKindOf (FTObjectType nType) const
//{
//	if (nType == FDOJ_WIDE_POLY) return TRUE;
//	return SUPER_CLASS::IsKindOf(nType);
//} // MC3ObjWidePoly::IsKindOf.
//----- 05.06.13 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjWidePoly::Type
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMjFjEjFgJiCmMiMfOiCpAjFnEiClH_xHqqkZx_.
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiMfO_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.08 Fukushiro M. _xZkqqHx_iNoMjAkMiBeC_xHqqkZx_
 *************************************************************************/
FTObjectType MC3ObjWidePoly::Type () const
{
	return FDOJ_WIDE_POLY;
} // MC3ObjWidePoly::Type.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjWidePoly::OutStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCmJiPjBiCkLiPgPiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_iPjBiCkLiPgPiClFjHhAiCmM_xHqqkZx_MCARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.08 Fukushiro M. _xZkqqHx_iNoMjAkMiBeC_xHqqkZx_
 *************************************************************************/
void MC3ObjWidePoly::OutStream (MCARCHIVE& ar)
{
	SUPER_CLASS::OutStream(ar);
	ar << m_mmWidthF;		// _xZkqqHx_jGoOiIpDiCmMjFjNiBeC_xHqqkZx_
	ar << m_mmWidthB;		// _xZkqqHx_jGoOiIpDiCmMjFjNiBeC_xHqqkZx_
	ar << m_nWidthSlopeF;	// _xZkqqHx_iKeKiOgOjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_
	ar << m_nWidthSlopeB;	// _xZkqqHx_iPeJjHlJjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_

	if (g_nVersion == 4)
	//----- Version4.x_xZkqqHx_iCmMiPoKiNiH_xHqqkZx_ -----
	{
		ar << long(0);			// _xZkqqHx_iDhIiDfHiDeGiLnPiOjHiLmIjApMjEhKjHpBiDfEiDeDiDfJiBeC_xHqqkZx_
		ar << long(0);			// _xZkqqHx_iDhIiDfHiDeGiLnPiOjHiLmIjApMjEhKjHpBiDfEiDeDiDfJiBeC_xHqqkZx_
		ar << mmetol(0.0);		// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiCgPiBeC_xHqqkZx_
		ar << mmetol(0.0);		// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiChAiBeC_xHqqkZx_
		ar << angle(0.0);		// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiMpMiCkLiBeC_xHqqkZx_
		ar << mmetol(0.0);		// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiCgPiBeC_xHqqkZx_
		ar << mmetol(0.0);		// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiChAiBeC_xHqqkZx_
		ar << angle(0.0);		// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiMpMiCkL_xHqqkZx_
	}
} // MC3ObjWidePoly::OutStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjWidePoly::InStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCkJiCoHjDmHiCnNiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_MCARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.08 Fukushiro M. _xZkqqHx_iNoMjAkMiBeC_xHqqkZx_
 *************************************************************************/
void MC3ObjWidePoly::InStream (MCARCHIVE& ar)
{
	SUPER_CLASS::InStream(ar);
	ar >> m_mmWidthF;		// _xZkqqHx_jGoOiIpDiCmMjFjNiBeC_xHqqkZx_
	ar >> m_mmWidthB;		// _xZkqqHx_jGoOiIpDiCmMjFjNiBeC_xHqqkZx_
	ar >> m_nWidthSlopeF;	// _xZkqqHx_iKeKiOgOjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_
	ar >> m_nWidthSlopeB;	// _xZkqqHx_iPeJjHlJjDfPiCmMiMfIiOmOiBeC_xHqqkZx_[0, 10000]_xZkqqHx_iBeC_xHqqkZx_

	if (g_nVersion == 4)
	//----- Version4.x_xZkqqHx_iCmMiPoKiNiH_xHqqkZx_ -----
	{
		long lWork;
		mmetol mmWork;
		angle dWork;
		DBLPoint mmptWork;
		ar >> lWork;	// _xZkqqHx_iDhIiDfHiDeGiLnPiOjHiLmIjApMjEhKjHpBiDfEiDeDiDfJiBeC_xHqqkZx_
		while (lWork-- != 0)
			ar >> mmptWork;
		ar >> lWork;	// _xZkqqHx_iDhIiDfHiDeGiLnPiOjHiLmIjApMjEhKjHpBiDfEiDeDiDfJiBeC_xHqqkZx_
		while (lWork-- != 0)
			ar >> mmptWork;
		ar >> mmWork;	// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiCgPiBeC_xHqqkZx_
		ar >> mmWork;	// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiChAiBeC_xHqqkZx_
		ar >> dWork;	// _xZkqqHx_jBePjFpLjGoOiIpDiCmMiMpMiCkLiBeC_xHqqkZx_
		ar >> mmWork;	// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiCgPiBeC_xHqqkZx_
		ar >> mmWork;	// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiChAiBeC_xHqqkZx_
		ar >> dWork;	// _xZkqqHx_iMoDjFpLjGoOiIpDiCmMiMpMiCkL_xHqqkZx_
	}
} // MC3ObjWidePoly::InStream.

