// VirtualRealTable.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "UtilErr.h"			// For FFThrowMiscUnknown.
#include "VirtualRealTable.h"	// This header.

/////////////////////////////////////////////////////////////////////////////
// FCVirtualRealTable
//
// REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmNiBeBjFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAiDeMiDiDiDgCiDfGiDiFiClFiCmEjFnLiOjNiClHiCoJiBeC_xHqqkZx_
// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCpAjFnLiOjNiClHiCoJiClBiCmGiCmFiBeBiDfEiBfLiDgPiBfLiCkKjChIiCkCiPoKiNiHiCmFiCoAjBgGjBiBiCkNiDiMiDfCiBfLiDgIiCmJ_xHqqkZx_
// _xZkqqHx_iDeBiDeOiDfKiDfIiCmFiCkLiCoJiBeC_xHqqkZx_
// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDeDiDjDiDgGiDgCiDeOiDfIiDgFiBfLiDhFiDiLiCmNiBeBjBfDiCmEjFkBiOmKiClFiCmEjFnLiOjNiClDiCoKiCoJiCkKiBeB_xHqqkZx_
// _xZkqqHx_iDgGiBfLiDfOiDgFiBfLiDhFiDiLiCmNjDmHiCnNiPgPiClDiCoKiClNjFjEjFkKiCmGiClLiCmMjBePiMoDiClFiCkJjFnLiOjNiClDiCoKiCmIiCkCiBeC_xHqqkZx_
// _xZkqqHx_iDiNiDgCiDeOiCpAiJpAiPjMiClFiCmEiCkCiCoJiKnEiCmJjFkIjHjNiDgFiBfLiDhFiDiLiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeBiNmEiDiNiDgCiDeOiClFiClN_xHqqkZx_
// _xZkqqHx_iDfOiDeDiDhOiDjDiDePiCmFjFhDiIoKjChGiCmMjFjEjFkKiCpAjClCiCnHiCoJiBeCiDeDiDjDiDgGiDgCiDeOiDfIiDgFiBfLiDhFiDiLiCmNjFhDiIoKjChGjFjEjFkKiCpA_xHqqkZx_
// _xZkqqHx_jBfDiCmEjFkBiOmKiClFiCmIiCkIiClHiCkKiBeBiDgGiBfLiDfOiDgFiBfLiDhFiDiLiCmFiCmNjFhDiIoKjChGjFjEjFkKiCmNjEhAiKpMiClDiCoKiCoJiBeC_xHqqkZx_
//
// -- _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiL_xHqqkZx_ --
//                     _xZkqqHx_iEkBiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkC_xHqqkZx_
// _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDgFiBfLiDhFiDiLiEkA_xHqqkZx_i0_xZkqqHx_iEkA_xHqqkZx_i1_xZkqqHx_iEkA_xHqqkZx_i2_xZkqqHx_iEkA_xHqqkZx_i3_xZkqqHx_iEkA_xHqqkZx_i4_xZkqqHx_iEkA_xHqqkZx_i5_xZkqqHx_iEkA_xHqqkZx_i6_xZkqqHx_iEkA_xHqqkZx_
//                     _xZkqqHx_iEkEiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkD_xHqqkZx_
//                     _xZkqqHx_iEkBiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkC_xHqqkZx_
//       _xZkqqHx_iDgGiBfLiDfOiDgFiBfLiDhFiDiLiEkA_xHqqkZx_d0_xZkqqHx_iEkA_xHqqkZx_d1_xZkqqHx_iEkA_xHqqkZx_d2_xZkqqHx_iEkA_xHqqkZx_d3_xZkqqHx_iEkA_xHqqkZx_d4_xZkqqHx_iEkA_xHqqkZx_d5_xZkqqHx_iEkA_xHqqkZx_d6_xZkqqHx_iEkA_xHqqkZx_
//                     _xZkqqHx_iEkEiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkD_xHqqkZx_
//
// -- _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiL_xHqqkZx_ --
//                     _xZkqqHx_iEkBiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkC_xHqqkZx_
// _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDgFiBfLiDhFiDiLiEkA_xHqqkZx_i0_xZkqqHx_iEkA_xHqqkZx_i1_xZkqqHx_iEkA_xHqqkZx_i2_xZkqqHx_iEkA_xHqqkZx_i3_xZkqqHx_iEkA_xHqqkZx_i4_xZkqqHx_iEkA_xHqqkZx_i5_xZkqqHx_iEkA_xHqqkZx_i6_xZkqqHx_iEkA_xHqqkZx_
//                     _xZkqqHx_iEkEiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkD_xHqqkZx_
//                     _xZkqqHx_iEkBiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkGiEjPiEkC_xHqqkZx_
//       _xZkqqHx_iDgGiBfLiDfOiDgFiBfLiDhFiDiLiEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_d1_xZkqqHx_iEkA_xHqqkZx_d2_xZkqqHx_iEkA_xHqqkZx_d3_xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_d6_xZkqqHx_iEkA_xHqqkZx_
//                     _xZkqqHx_iEkEiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkIiEjPiEkD_xHqqkZx_
//
// WRITE_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iBeBjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCkKiBeBjCmHiJmBiBeFiNoNiPjMiCmMjDhIiCmJ_xHqqkZx_
// _xZkqqHx_iJmBiOfKiClDiCoKiClNiCmMiCmJjBmOiClFiCmEiBeB_xHqqkZx_FCVirtualRealTable_xZkqqHx_iCmM_xHqqkZx_Identifier_xZkqqHx_iCmNiBeBiDiNiDgCiDeOiCpAiJpAiPjM_xHqqkZx_
// _xZkqqHx_iClFiCmEiCkCiClNiKnEiCmJjFkIjHjNiDgFiBfLiDhFiDiLiCmGjAeIiCkCiIoBiCkCiCkKjAlGiClGiCmEiCkCiCmIiCkCiCkJjClCiCnHiCoJiClNiCnPiCmMjCgMiCmFiCkAiCoIiBeB_xHqqkZx_
// _xZkqqHx_iDiNiDgCiDeOiCkKiDeMiBfLiDhGiClDiCoKiCmEiCkCiCoJiKnEiCmNiDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmM_xHqqkZx_Identifier_xZkqqHx_iCmGjCgMiCkK_xHqqkZx_
// _xZkqqHx_iIoKjChGiClFiCmEiCkCiCoJiBeC_xHqqkZx_
//

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::FCVirtualRealTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCVirtualRealTable::FCVirtualRealTable ()
			:	BASE_CLASS(),
				m_dwRealDeleteIdentifier(DWORD(0)),
				m_dwRealAppendIdentifier(DWORD(0))
{
} // FCVirtualRealTable::FCVirtualRealTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::~FCVirtualRealTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCVirtualRealTable::~FCVirtualRealTable ()
{
//----- 06.02.13 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_jDmHiCnNiPgPiClFiDiMiDfCiBfLiDgIiCpAjBfDiCmEiNoNiPjMiBeCiDhBiBfLiDhGiCkJiCoHiDgGiBfLiDfOiCpAiNoNiPjMiClHiCoJiBeC_xHqqkZx_
	ClearAllRealRecords();
//----- 06.02.13 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
} // FCVirtualRealTable::~FCVirtualRealTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetRealRecordEnd
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPeJjCfLiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPeJjCfLiImKjChFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	WRITE_xZkqqHx_iDeMiDiDiDgCiDfGiDiFiCmMiDiMiDfCiBfLiDgIiCkKiCkAiCmBiCmEiCoAiBeBiClLiClPiCoHiCpAiOfBiPmGiClFiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::GetRealRecordEnd () const
{
	return m_vVirtualRealTable.size();
} // FCVirtualRealTable::GetRealRecordEnd.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetRealRecordPrimaryId
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCmMiDhGiDiJiDeDiDhNiDiKiBfL_xHqqkZx_ID_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwIndex	:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiMiDfCiBfLiDgIiCmMiDhGiDiJiDeDiDhNiDiKiBfL_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCVirtualRealTable::GetRealRecordPrimaryId (DWORD dwIndex) const
{
	return GetTableRealRecord(dwIndex).m_fliPrimaryId;
} // FCVirtualRealTable::GetRealRecordPrimaryId.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetRealRecordAppendIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiOhHjCoIiClDiCoKiClNiDiMiDfCiBfLiDgIiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwIndex	:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiOhHjCoIiClDiCoKiClNiDiMiDfCiBfLiDgIiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::GetRealRecordAppendIdentifier (DWORD dwIndex) const
{
	return GetTableRealRecord(dwIndex).m_dwAppendIdentifier;
} // FCVirtualRealTable::GetRealRecordAppendIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetRealDeleteIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::GetRealDeleteIdentifier () const
{
	return m_dwRealDeleteIdentifier;
} // FCVirtualRealTable::GetRealDeleteIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetRealAppendIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::GetRealAppendIdentifier () const
{
	return m_dwRealAppendIdentifier;
} // FCVirtualRealTable::GetRealAppendIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::SetRealDeleteIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwDeleteIdentifier	:_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCVirtualRealTable::SetRealDeleteIdentifier (DWORD dwDeleteIdentifier)
{
	m_dwRealDeleteIdentifier = dwDeleteIdentifier;
} // FCVirtualRealTable::SetRealDeleteIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::SetRealAppendIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwDeleteIdentifier	:_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCVirtualRealTable::SetRealAppendIdentifier (DWORD dwAppendIdentifier)
{
	m_dwRealAppendIdentifier = dwAppendIdentifier;
} // FCVirtualRealTable::SetRealAppendIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::SetDataToEmptyRealRecord
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiCmMiCnNjAnNjCoIiClDiCoKiBeBiDiMiDfCiBfLiDgIiDgGiBfLiDfOiCkKjGkCjAnNjCoIiCmMiDiMiDfCiBfLiDgIiCmJ_xHqqkZx_
 *			_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pRecordData	:_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwIndex		:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiMiDfCiBfLiDgIiCmMiDgGiBfLiDfOiDfEiDeDiDfJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iPoDiCmMiJpAjAoAiCmJiCkAiCoJiCoGiCkEiCmJiBeB_xHqqkZx_REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmNjFkIjHjNiDgFiBfLiDhFiDiLiCmM_xHqqkZx_
 *			_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCpAjFeLiClIjFkBiOmKjFnLiOjNiClFiCmEiCkCiCoJiCoNiCkPiCmFiCmNiCmIiCkNiBeB_xHqqkZx_
 *			_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCkKjGkCjAnNjCoIiCmMiCnMiCnMiCmJiClDiCoKiCmEiCkCiCoJiDiMiDfCiBfLiDgIiCoAiCkAiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iClLiCmMiCoGiCkEiCmIiDiMiDfCiBfLiDgIiCmJiDgGiBfLiDfOiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDgGiBfLiDfOiDfEiDeDiDfJiCmNiDeDiDjDiDgGiDgCiDeOiDfIjFjEiCmJiKpJiCmJiLeMjIfOiClDiCoKiCmEiCkCiCoJiCmMiCmFjFeLjHhGiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::SetDataToEmptyRealRecord (const void* pRecordData, DWORD dwIndex)
{
	if (GetTableRealRecord(dwIndex).m_dwDataId != DWORD(-1))
		FFThrowMiscUnknown();
	GetTableRealRecord(dwIndex).m_dwDataId =
		m_heap.AllocateData(pRecordData, GetTableRealRecord(dwIndex).m_dwSize);
	return GetTableRealRecord(dwIndex).m_dwSize;
} // FCVirtualRealTable::SetDataToEmptyRealRecord.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::ResizeRealRecordCount
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIjAjEiCpAjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwRecordSize	:_xZkqqHx_jFmPiNfIiClHiCoJjAjEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iMlLiNnNiCmMiDiMiDfCiBfLiDgIjAjEiCoGiCoIiPkNiCmIiCkNiClHiCoJiPoKiNiHiCmNiDiMiDfCiBfLiDgIiCpAiNoNiPjMiClFiBeB_xHqqkZx_
 *			_xZkqqHx_jBoFiCkLiCkNiClHiCoJiPoKiNiHiCmNjGlDiMpIiCmIjCgMiCmMiDiMiDfCiBfLiDgIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iNmEiDiNiDgCiDeOiClFiClNiNnLiCmJjFkIjHjNiDgFiBfLiDhFiDiLiCmJjFmPiNfIiCkKiCkAiCmBiClNiPoKiNiHiBeBiClBiCmMiKnGjAjEiCmF_xHqqkZx_
 *			REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCpAjFoCjAlDiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.12.16 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCVirtualRealTable::ResizeRealRecordCount (DWORD dwRecordSize)
{
	if (dwRecordSize < m_vVirtualRealTable.size())
	//----- _xZkqqHx_iKpJjBlGiDiMiDfCiBfLiDgIiDfEiDeDiDfJiCoGiCoIiPkMiClDiCkNiClHiCoJiPoKiNiH_xHqqkZx_ -----
	{
		while (m_vVirtualRealTable.size() != dwRecordSize)
		{
			if (m_vVirtualRealTable.back().m_dwDataId != DWORD(-1))
				m_heap.FreeData(m_vVirtualRealTable.back().m_dwDataId);
			m_vVirtualRealTable.pop_back();
		}
	} else
	//----- _xZkqqHx_iKpJjBlGiDiMiDfCiBfLiDgIiDfEiDeDiDfJiCoGiCoIjBoFiCkLiCkNiClHiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jGlDiMpIiCmIjCgMiCmMiDiMiDfCiBfLiDgIiCpAiNoMjAkMiBeC_xHqqkZx_
		FCVirtualRecord tableRecord;
		tableRecord.m_fliPrimaryId = -1;
		tableRecord.m_dwAppendIdentifier = DWORD(-1);
		tableRecord.m_dwSize = size_t(-1);
		tableRecord.m_dwDataId = DWORD(-1);
		// _xZkqqHx_jGlDiMpIiCmIjCgMiCmMiDiMiDfCiBfLiDgIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
		while (m_vVirtualRealTable.size() != dwRecordSize)
			m_vVirtualRealTable.push_back(tableRecord);
	}
} // FCVirtualRealTable::ResizeRealRecordCount.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::ClearAllRealRecords
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjBfDiCmEiDeOiDiKiDeBiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIjFjEiCoAiDgGiBfLiDfOjFjEiCoAjBfDiCmEiDeOiDiKiDeBiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iNmEiDiNiDgCiDeOiClFiClNiNnLiCmJjFkIjHjNiDgFiBfLiDhFiDiLiCkKjDpMiCoKjBnGiCoNiCmBiCmEiCkCiClNiPoKiNiHiBeBiClBiCmMiKnGjAjEiCmF_xHqqkZx_
 *			REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCpAiDeOiDiKiDeBiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCVirtualRealTable::ClearAllRealRecords ()
{
	vector<FCVirtualRecord>::iterator i;
	for (i = m_vVirtualRealTable.begin(); i != m_vVirtualRealTable.end(); i++)
	{
		if (i->m_dwDataId != DWORD(-1))
			m_heap.FreeData(i->m_dwDataId);
	}
	m_vVirtualRealTable.clear();
} // FCVirtualRealTable::ClearAllRealRecords.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::AppendEmptyRealRecord
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiBfLiDfOiCkKjGkCjAnNjCoIiCmMiDiMiDfCiBfLiDgIiCpA_xHqqkZx_REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmJjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fliPrimaryId		:_xZkqqHx_iDhGiDiJiDeDiDhNiDiKiBfL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwAppendIdentifier	:_xZkqqHx_iDiMiDfCiBfLiDgIiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwRecordDataSize	:_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCmMiDfEiDeDiDfJiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jCmHiJmBiClDiCoKiClNiDiMiDfCiBfLiDgIiCmMiDeDiDjDiDgGiDgCiDeOiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iPoDiCmMiJpAjAoAiCmJiCkAiCoJiCoGiCkEiCmJiBeB_xHqqkZx_REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmNjFkIjHjNiDgFiBfLiDhFiDiLiCmM_xHqqkZx_
 *			_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCpAjFeLiClIjFkBiOmKjFnLiOjNiClFiCmEiCkCiCoJiCoNiCkPiCmFiCmNiCmIiCkCiBeC_xHqqkZx_
 *			_xZkqqHx_iClBiCmMiKnGjAjEiCmNiDiMiDfCiBfLiDgIiDgGiBfLiDfOiCkKjGkCjAnNjCoIiCmMiCnMiCnMiCmMiDiMiDfCiBfLiDgIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualRealTable::AppendEmptyRealRecord (	flint fliPrimaryId,
													DWORD dwAppendIdentifier,
													DWORD dwRecordDataSize)
{
	FCVirtualRecord tableRecord;
	tableRecord.m_fliPrimaryId = fliPrimaryId;
	tableRecord.m_dwAppendIdentifier = dwAppendIdentifier;
	tableRecord.m_dwSize = dwRecordDataSize;
	tableRecord.m_dwDataId = DWORD(-1);
	m_vVirtualRealTable.push_back(tableRecord);
	return GetRealRecordEnd() - 1;
} // FCVirtualRealTable::AppendEmptyRealRecord.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::SetRealRecord
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDiMiDfCiBfLiDgIiCmJiBeBiOhHjCoIiClDiCoKiClNjCgMiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwIndex				:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			fliPrimaryId		:_xZkqqHx_iDhGiDiJiDeDiDhNiDiKiBfL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwAppendIdentifier	:_xZkqqHx_iDiMiDfCiBfLiDgIiCmMjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwRecordDataSize	:_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCmMiDfEiDeDiDfJiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwRecordDataId		:_xZkqqHx_iDiMiDfCiBfLiDgIiDgGiBfLiDfOiCmMiDhBiBfLiDhG_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iKpJiCmJjBlGiNnNiClHiCoJiDiMiDfCiBfLiDgIiCmJjCgMiCpAiPoDiPjBiCkLiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iNmEiDiNiDgCiDeOiClFiClNiNnLiCmJjFkIjHjNiDgFiBfLiDhFiDiLiCkKjFmPiNfIiClDiCoKiCmEiCkCiClNiPoKiNiHiBeBiClBiCmMiKnGjAjEiCmF_xHqqkZx_
 *			_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iCnMiClNiBeB_xHqqkZx_WRITE_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpA_xHqqkZx_REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCmJ_xHqqkZx_
 *			_xZkqqHx_iInKjDkOiClHiCoJiNnLiCmJiCoAjHhAiCkCiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCVirtualRealTable::SetRealRecord (DWORD dwIndex,
										flint fliPrimaryId,
										DWORD dwAppendIdentifier,
										DWORD dwRecordDataSize,
										DWORD dwRecordDataId)
{
	FCVirtualRecord& tableRecord = GetTableRealRecord(dwIndex);
	// _xZkqqHx_iKpJjBlGiDiMiDfCiBfLiDgIiDgGiBfLiDfOiCkKjBlGiNnNiClHiCoJiPoKiNiHiCmNiLpDiCmJiClHiCoJiBeC_xHqqkZx_
	if (tableRecord.m_dwDataId != DWORD(-1))
		m_heap.FreeData(tableRecord.m_dwDataId);

	tableRecord.m_fliPrimaryId = fliPrimaryId;
	tableRecord.m_dwAppendIdentifier = dwAppendIdentifier;
	tableRecord.m_dwSize = dwRecordDataSize;
	tableRecord.m_dwDataId = dwRecordDataId;
} // FCVirtualRealTable::SetRealRecord.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetTableRealRecord
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwIndex	:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCVirtualRecord& FCVirtualRealTable::GetTableRealRecord (DWORD dwIndex)
{
	return m_vVirtualRealTable[dwIndex];
} // FCVirtualRealTable::GetTableRealRecord.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualRealTable::GetTableRealRecord
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwIndex	:_xZkqqHx_iDiMiDfCiBfLiDgIiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	REAL_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const FCVirtualRecord& FCVirtualRealTable::GetTableRealRecord (DWORD dwIndex) const
{
	return m_vVirtualRealTable[dwIndex];
} // FCVirtualRealTable::GetTableRealRecord.

