#include "stdafx.h"
#include "3ObjChipMaster.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 MC3ObjGroup

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::MC3ObjChipMaster
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *************************************************************************/
MC3ObjChipMaster::MC3ObjChipMaster ()
{
	// memcmp_xZkqqHx_iCmFiDeJiDhFiDfHiDeGiDeOiDgHjEoEiKhCiCpAiClHiCoJiClNiCnPiBeBiNfMjBkCjBmMiDeNiDiDiDgCiDhGiCoAjBfDiCmEiCePiCmFjGiEiCnPiCoJiBeC_xHqqkZx_
	ASSERT(sizeof(SUPER_CLASS) == offsetof(MC3ObjChipMaster, m_nChipKind));
	memset(&m_nChipKind, 0, sizeof(MC3ObjChipMaster) - offsetof(MC3ObjChipMaster, m_nChipKind));

	//----- _xZkqqHx_iDiBiDjDiDgPjFmPjAjEiPiJiKpKiJlL_xHqqkZx_ -----
	m_nChipKind = FDCM_NONE;	// _xZkqqHx_iDgAiDgCiDhGiOoNjFmKiBeC_xHqqkZx_
	m_dwObjUserUlong = DWORD(-1);	// _xZkqqHx_jFjEjFgJiDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	m_lDutyLinkIndexSz = 0;		// _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
	m_pDutyLinkIndex = NULL;	// _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
	m_lDutyTextIndexSz = 0;		// _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
	m_pDutyTextIndex = NULL;	// _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
} // MC3ObjChipMaster::MC3ObjChipMaster.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::~MC3ObjChipMaster
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
MC3ObjChipMaster::~MC3ObjChipMaster ()
{
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	if (m_pDutyLinkIndex != NULL)
	{
		delete[] m_pDutyLinkIndex;
		m_pDutyLinkIndex = NULL;
	}
	m_lDutyLinkIndexSz = 0;
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	if (m_pDutyTextIndex != NULL)
	{
		delete[] m_pDutyTextIndex;
		m_pDutyTextIndex = NULL;
	}
	m_lDutyTextIndexSz = 0;
} // MC3ObjChipMaster::~MC3ObjChipMaster.

//----- 05.06.17 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::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_
// *************************************************************************/
//BOOL MC3ObjChipMaster::IsKindOf (FTObjectType nType) const
//{
//	if (nType == FDOJ_CHIP_MASTER) return TRUE;
//	return SUPER_CLASS::IsKindOf(nType);
//} // MC3ObjChipMaster::IsKindOf.
//----- 05.06.17 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::Type
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDeOiDiJiDfIiCmMiMfOiCpAjFnEiClH_xHqqkZx_.
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDeOiDiJiDfIiCmMiMfO_xHqqkZx_
 *************************************************************************/
FTObjectType MC3ObjChipMaster::Type () const
{
	return FDOJ_CHIP_MASTER;
} // MC3ObjChipMaster::Type.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::OutStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCmJiPjBiCkLiPgPiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_iPjBiCkLiPgPiClFjHhAiCmM_xHqqkZx_CArchive
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. CArchive_xZkqqHx_iCpA_xHqqkZx_CArchive_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC3ObjChipMaster::OutStream (CArchive& ar)
{
	SUPER_CLASS::OutStream(ar);
	// _xZkqqHx_iDgAiDgCiDhGiOoNjFmKiCpAiPgPjHmNiBeC_xHqqkZx_
	ar << m_nChipKind;
	// _xZkqqHx_jFjEjFgJiDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iCpAiPgPjHmNiBeC_xHqqkZx_
	ar << m_dwObjUserUlong;
	long lC;
	//----- _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAiPgPjHmN_xHqqkZx_ -----
	ar << (short)m_lDutyLinkIndexSz;
	for (lC = 0; lC < m_lDutyLinkIndexSz; lC++)
		ar << m_pDutyLinkIndex[lC];

	//----- _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAiPgPjHmN_xHqqkZx_ -----
	ar << (short)m_lDutyTextIndexSz;
	for (lC = 0; lC < m_lDutyTextIndexSz; lC++)
		ar << m_pDutyTextIndex[lC];
} // MC3ObjChipMaster::OutStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ObjChipMaster::InStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCkJiCoHjDmHiCnNiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_CArchive
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. CArchive_xZkqqHx_iCpA_xHqqkZx_CArchive_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC3ObjChipMaster::InStream (CArchive& ar)
{
	SUPER_CLASS::InStream(ar);

	// _xZkqqHx_iDgAiDgCiDhGiOoNjFmKiCpAjDpMjHmNiBeC_xHqqkZx_
	ar >> m_nChipKind;
	// _xZkqqHx_jFjEjFgJiDiGiBfLiDfF_xHqqkZx_ID_xZkqqHx_iCpAjDpMjHmNiBeC_xHqqkZx_
	ar >> m_dwObjUserUlong;

	short nSize;
	//----- _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAjDpMjHmN_xHqqkZx_ -----
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	if (m_pDutyLinkIndex != NULL)
	{
		delete[] m_pDutyLinkIndex;
		m_pDutyLinkIndex = NULL;
	}
	ar >> nSize;
	m_lDutyLinkIndexSz = nSize;
	if (0 < nSize)
	{
		m_pDutyLinkIndex = new short[nSize];
		for (short nC = 0; nC < nSize; nC++)
			ar >> m_pDutyLinkIndex[nC];
	}

	//----- _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAjDpMjHmN_xHqqkZx_ -----
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	if (m_pDutyTextIndex != NULL)
	{
		delete[] m_pDutyTextIndex;
		m_pDutyTextIndex = NULL;
	}
	ar >> nSize;
	m_lDutyTextIndexSz = nSize;
	if (0 < nSize)
	{
		m_pDutyTextIndex = new short[nSize];
		for (short nC = 0; nC < nSize; nC++)
			ar >> m_pDutyTextIndex[nC];
	}
} // MC3ObjChipMaster::InStream.

