#include "stdafx.h"
#include "3ToolBaseCreate.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 MC3ToolBaseFDA

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ToolBaseCreate::OutStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiCmMiPpDjBnEiCpAiDfIiDgHiDiKiBfLiDiAiCmJiPjBiCkLiPgPiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	:_xZkqqHx_iPjBiCkLiPgPiClFjHhAiCmM_xHqqkZx_MCARCHIVE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void MC3ToolBaseCreate::OutStream (MCARCHIVE& ar)
{
	SUPER_CLASS::OutStream(ar);
	// _xZkqqHx_iDiKiDhEiDeAiDiMiDjDiDfIjFjEjFgJiMjPiNpFiCmMiPiHiPjIiBeC_xHqqkZx_
	ar << short(m_vReferenceOrder.size());
	shortVector::const_iterator iT;
	for (iT = m_vReferenceOrder.begin(); iT != m_vReferenceOrder.end(); iT++)
		ar << *iT;
	//----- _xZkqqHx_iNmFiMoDiCmJiNoMiCoHiCoKiClNjFjEjFgJiCmMiLeMjIfO_xHqqkZx_ -----
	ar << long(m_vLastObj.size());
	MC3ObjMemRecVector::const_iterator iRec;
	for (iRec = m_vLastObj.begin(); iRec != m_vLastObj.end(); iRec++)
		ar.Write(&(*iRec), sizeof(*iRec));
} // MC3ToolBaseCreate::OutStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ToolBaseCreate::InStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDgHiDiKiBfLiDiAiCkJiCoHiDgDiBfLiDiLiCmMjBkOjAkLiCpAjDmHiCnNiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	:_xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_MCARCHIVE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void MC3ToolBaseCreate::InStream (MCARCHIVE& ar)
{
	SUPER_CLASS::InStream(ar);
	// _xZkqqHx_iDiKiDhEiDeAiDiMiDjDiDfIjFjEjFgJiMjPiNpFiCmMiPiHiPjIiBeC_xHqqkZx_
	short nSz;
	ar >> nSz;
	m_vReferenceOrder.assign(nSz, 0);
	for (short nC = 0; nC < nSz; nC++)
		ar >> m_vReferenceOrder[nC];
	//----- _xZkqqHx_iNmFiMoDiCmJiNoMiCoHiCoKiClNjFjEjFgJiCmMiLeMjIfO_xHqqkZx_ -----
	long lSz;
	ar >> lSz;
	m_vLastObj.assign(lSz, MC3ObjMemRec());
	for (long lC = 0; lC < lSz; lC++)
		ar.Read(&m_vLastObj[lC], sizeof(m_vLastObj[lC]));
} // MC3ToolBaseCreate::InStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC3ToolBaseCreate::InitContents
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHiCmM_xHqqkZx_InitContents_xZkqqHx_iOjOiCmJiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	MC3ToolBaseCreate_xZkqqHx_iCmM_xHqqkZx_GetLastCreateObj()_xZkqqHx_jHhAiCmJiNoMjAkMiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void MC3ToolBaseCreate::InitContents ()
{
	// _xZkqqHx_iNoMjAkMiMlDiDiKiDhEiDeAiDiMiDjDiDfIjFjEjFgJiCmMiMjPiNpFiPiHiBeC_xHqqkZx_
	m_vReferenceOrder.clear();
	m_vReferenceOrder.push_back(FDBC_REFO_SELECT_OBJ);	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCpAiMlDiCmJiClHiCoJiBeC_xHqqkZx_
	m_vReferenceOrder.push_back(FDBC_REFO_CHIP_OBJ);	// _xZkqqHx_iDgAiDgCiDhGjFjEjFgJiCpAiMlDiCmJiClHiCoJiBeC_xHqqkZx_
	m_vReferenceOrder.push_back(FDBC_REFO_LAST_OBJ);	// _xZkqqHx_iNmFiMoDiCmJiNoMjAkMiClDiCoKiClNjFjEjFgJiCpAiMlDiCmJiClHiCoJiBeC_xHqqkZx_
	m_vReferenceOrder.push_back(FDBC_REFO_INSIDE_OBJ);	// _xZkqqHx_jDoAjFjEjFjEjFgJiCpAiMlDiCmJiClHiCoJiBeC_xHqqkZx_
	// _xZkqqHx_iNmFiMoDiCmJiNoMiCoHiCoKiClNjFjEjFgJiCmMiLeMjIfOiBeC_xHqqkZx_
	m_vLastObj.clear();
} // MC3ToolBaseCreate::InitContents.

