#include "stdafx.h"
#include "2ObjChipMaster.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 MC2ObjGroup

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjChipMaster::MC2ObjChipMaster
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_FDFoundDoc_xZkqqHx_iCmM_xHqqkZx_InStream_xZkqqHx_iCmFjFeLjHhGiBeC_xHqqkZx_
 *			_xZkqqHx_iDiBiDjDiDgPjFmPjAjEiCpAjFmPiNfIiClFiCmEiCkCiCoJiCkKiBeB_xHqqkZx_Doc::AppendToZOrder_xZkqqHx_iCkKiMmEiCnBiPgPiClFiMlD_xHqqkZx_
 *			_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJiCmNiClIiCmIiCmMiCmFiBeB_xHqqkZx_JustDid()_xZkqqHx_iCmNiOmAiNhDiClFiCmIiCkCiBeC_xHqqkZx_
 *************************************************************************/
MC2ObjChipMaster::MC2ObjChipMaster ()
{
	m_nvDutyLinkIndex.clear();
	m_nvDutyTextIndex.clear();
} // MC2ObjChipMaster::MC2ObjChipMaster.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjChipMaster::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 MC2ObjChipMaster::IsKindOf (FTObjectType nType) const
{
	if (nType == FDOJ_CHIP_MASTER) return TRUE;
	return SUPER_CLASS::IsKindOf(nType);
} // MC2ObjChipMaster::IsKindOf.

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

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjChipMaster::OutStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCmJiPjBiCkLiPgPiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_iPjBiCkLiPgPiClFjHhAiCmM_xHqqkZx_MC2ARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. MC2ARCHIVE_xZkqqHx_iCpA_xHqqkZx_MC2ARCHIVE_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjChipMaster::OutStream (MC2ARCHIVE& ar)
{
	SUPER_CLASS::OutStream(ar);

	shortVector::iterator i;
	/*----- _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAiPgPjHmN_xHqqkZx_ -----*/
	ar << (short)m_nvDutyLinkIndex.size();
	for (i = m_nvDutyLinkIndex.begin(); i != m_nvDutyLinkIndex.end(); i++)
		ar << *i;
	/*----- _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAiPgPjHmN_xHqqkZx_ -----*/
	ar << (short)m_nvDutyTextIndex.size();
	for (i = m_nvDutyTextIndex.begin(); i != m_nvDutyTextIndex.end(); i++)
		ar << *i;
} // MC2ObjChipMaster::OutStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjChipMaster::InStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCkJiCoHjDmHiCnNiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_MC2ARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.03.03 Fukushiro M. MC2ARCHIVE_xZkqqHx_iCpA_xHqqkZx_MC2ARCHIVE_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjChipMaster::InStream (MC2ARCHIVE& ar)
{
	SUPER_CLASS::InStream(ar);

	short	nSize;
	short	nIndex;
	/*----- _xZkqqHx_iDiKiDjDiDeOjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAjDpMjHmN_xHqqkZx_ -----*/
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	m_nvDutyLinkIndex.clear();
	ar >> nSize;
	while (0 < nSize--)
	{
		ar >> nIndex;
		m_nvDutyLinkIndex.push_back(nIndex);
	}
	/*----- _xZkqqHx_iDgFiDeMiDfIiDgHjGpAiKiEjFjEjFgJiDiKiDfIiDgHiCpAjDpMjHmN_xHqqkZx_ -----*/
	// _xZkqqHx_iKpJjBlGiCmMiDiKiDfIiDgHiCpAiPmBiLiOiBeC_xHqqkZx_
	m_nvDutyTextIndex.clear();
	ar >> nSize;
	while (0 < nSize--)
	{
		ar >> nIndex;
		m_nvDutyTextIndex.push_back(nIndex);
	}
} // MC2ObjChipMaster::InStream.

