本文整理汇总了C++中IArchive::GetMode方法的典型用法代码示例。如果您正苦于以下问题:C++ IArchive::GetMode方法的具体用法?C++ IArchive::GetMode怎么用?C++ IArchive::GetMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IArchive
的用法示例。
在下文中一共展示了IArchive::GetMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Serialize
void CSinglePlayerInfo::Serialize( IArchive& ar, const unsigned int version )
{
if( ar.GetMode() == IArchive::MODE_INPUT )
{
m_pCurrentPlayerBaseEntity = NULL;
// m_pWeaponSystem;
m_TaskID = -1;
m_vecpItem.resize( 0 );
size_t i, num_item_categories = CItemCategory::NUM_CATEGORIES;
for( i=0; i<num_item_categories; i++ )
m_vecpCategoryItem[i].resize(0);
m_vecpActiveItem.resize(0);
m_pCurrentAircraft.reset();
}
GameItemObjectFactory factory;
ar.Polymorphic( m_vecpItem, factory );
ar & m_Money;
ar & m_KeyBind;
// ar & m_PlayTime;
if( ar.GetMode() == IArchive::MODE_INPUT )
{
// register items to m_vecpCategoryItem
}
}
示例2: Serialize
void CGI_Aircraft::Serialize( IArchive& ar, const unsigned int version )
{
GameItem::Serialize( ar, version );
ar & m_CockpitLocalPose;
ar & m_vThirdPersonViewOffset;
ar & m_vecNozzleFlameParams;
ar & m_fAccel & m_fBoostAccel & m_fBrakeAccel;
// ar & m_PitchRange & m_RollRange;
ar & m_fMaxPitchAccel & m_fMaxRollAccel & m_fMaxYawAccel;
// ar & m_WeaponSystem;
ar & m_AmmoReleaseLocalPose;
ar & m_vGunMuzzleEndLocalPos;
ar & m_fGearUnitHeight;
ar & m_fCeiling;
ar & m_fArmor;
ar & m_fRCS;
ar & m_vecSupportedAmmo;
if( ar.GetMode() == IArchive::MODE_INPUT )
{
m_fCurrentBoost = 0.0f;
m_fCurrentBrake = 0.0f;
}
// serialization of mesh controllers
MeshBoneControllerFactory factory;
ar.Polymorphic( m_vecpMeshController, factory );
if( ar.GetMode() == IArchive::MODE_INPUT )
{
size_t i, num = m_vecpMeshController.size();
for( i=0; i<num; i++ )
{
// if( m_vecpMeshController[i]->GetArchiveObjectID() == MeshBoneControllerBase::ID_... )
// ((MeshBoneController_AircraftBase *)m_vecpMeshController[i])->SetPseudoAircraftSimulator( &m_PseudoSimulator );
m_vecpMeshController[i]->SetPseudoAircraftSimulator( &m_PseudoSimulator );
}
}
// ar & m_vecRotor;
ar & m_PrevUsedAmmo;
}
示例3: Serialize
void Serialize( IArchive& ar, const unsigned int version )
{
ar & m_ResourceName;
if( ar.GetMode() == IArchive::MODE_INPUT )
{
// initialize the handle
m_Handle = pooled_object_handle();
}
}
示例4: Serialize
virtual void Serialize( IArchive& ar, const unsigned int version )
{
ar & m_Buffer.buffer();
if( ar.GetMode() == IArchive::MODE_INPUT )
{
// set the new stream
// - reset the cursor position
m_Buffer.reset_pos();
}
}
示例5: Serialize
inline virtual void Serialize( IArchive& ar, const unsigned int version )
{
std::string name;
if( ar.GetMode() == IArchive::MODE_INPUT )
{
ar & name;
SetName( name );
}
else
{
name = GetName();
ar & name;
}
}
示例6: Serialize
void CRotatableTurret::Serialize( IArchive& ar, const unsigned int version )
{
GameItem::Serialize( ar, version );
ar & m_MountLocalPose;
ar & m_GunLocalPose;
ar & m_WeaponName;
ar & m_vecAmmunition;
if( ar.GetMode() == IArchive::MODE_INPUT )
{
// load ammo?
}
}