#include "stdafx.h"
#include "2FoundDoc.h"		// For RegisterObject.
#include "2ObjBase.h"		// This header.

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

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLjDmHiCnNiNjOiCnNjHhAiDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_InStream_xZkqqHx_iCmFiPiJiKpKiJlLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	_xZkqqHx_jGlDiClF_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	98.11.16 Fukushiro M. _xZkqqHx_jFmPjAjEiCmMiPiJiKpKiJlLiCpAjCmHiJmB_xHqqkZx_.Tool_xZkqqHx_iCmFjAlGjAkMiClDiCoKiClNiOjOiCmMiInH_xHqqkZx_.
 *************************************************************************/
MC2ObjBase::MC2ObjBase ()
{
	m_dwObjID = static_cast<DWORD>(-1);
}

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	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 MC2ObjBase::IsKindOf (FTObjectType nType) const
{
	return nType == FDOJ_OBJECT;
}

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase::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 MC2ObjBase::OutStream (MC2ARCHIVE& ar)
{
	ar << m_dwObjID;
} // MC2ObjBase::OutStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase::InStream
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDgHiDiKiBfLiDiAiCkJiCoHjFjEjFgJiCmMjBkOjAkLiCpAjDmHiCnNiNjOiCnO_xHqqkZx_.
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	ar	: _xZkqqHx_jDmHiCnNiNjOiCnNjHhAiCmM_xHqqkZx_MC2ARCHIVE
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.01.16 Fukushiro M. _xZkqqHx_jFjEjFgJ_xHqqkZx_ID_xZkqqHx_iCmMjDgPjIfOiPiIjHjNiCpAiNoNiPjMiBeC_xHqqkZx_
 *			99.03.03 Fukushiro M. MC2ARCHIVE_xZkqqHx_iCpA_xHqqkZx_MC2ARCHIVE_xZkqqHx_iCmJiPeDjAlDiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjBase::InStream (MC2ARCHIVE& ar)
{
	ar >> m_dwObjID;
} // MC2ObjBase::InStream.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase::~MC2ObjBase
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfO_xHqqkZx_
 *************************************************************************/
MC2ObjBase::~MC2ObjBase () {}

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase::RegisterObjForceID
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiCgIiCgDiCpAjDgPjIfOiClHiCoJiBeCiClBiCmMjFjEjFgJiCmJjFhEiCkPiCoHiCoKiCmEiCkCiCoJiCgIiCgDiOkJjAgHiCpA_xHqqkZx_
 *			_xZkqqHx_iLkNjAkHjDgPjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGiCmGiDgAiDgCiDhGiCmMjDgPjIfOiKnGiMfHiCmFiClBiCmMiKnGjAjEiCpAjAfGjAnNiClFiClNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void MC2ObjBase::RegisterObjForceID ()
{
	g_pDoc->RegisterObject(this, m_dwObjID);
} // MC2ObjBase::RegisterObjForceID ().

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	MC2ObjBase::UnregisterObjID
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPeJjHlJiPiIjHjNiBeC_xHqqkZx_delete_xZkqqHx_jBePiCmJiOmAiNhDiClHiCoJiBeC_xHqqkZx_
 *************************************************************************/
void MC2ObjBase::UnregisterObjID ()
{
	g_pDoc->UnregisterObject(this);
}
