本文整理汇总了C++中creg::ISerializer::SerializeObjectInstance方法的典型用法代码示例。如果您正苦于以下问题:C++ ISerializer::SerializeObjectInstance方法的具体用法?C++ ISerializer::SerializeObjectInstance怎么用?C++ ISerializer::SerializeObjectInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类creg::ISerializer
的用法示例。
在下文中一共展示了ISerializer::SerializeObjectInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Serialize
void CQuadField::Serialize(creg::ISerializer& s)
{
// no need to alloc quad array, this has already been done in constructor
for (int z = 0; z < numQuadsZ; ++z)
for (int x = 0; x < numQuadsX; ++x)
s.SerializeObjectInstance(&baseQuads[z*numQuadsX+x], Quad::StaticClass());
}
示例2: Serialize
void CGameStateCollector::Serialize(creg::ISerializer& s)
{
// GetClass() works because readmap and uh both have to exist already
s.SerializeObjectInstance(gs, gs->GetClass());
s.SerializeObjectInstance(gu, gu->GetClass());
s.SerializeObjectInstance(game, game->GetClass());
s.SerializeObjectInstance(readmap, readmap->GetClass());
s.SerializeObjectInstance(qf, qf->GetClass());
s.SerializeObjectInstance(featureHandler, featureHandler->GetClass());
s.SerializeObjectInstance(loshandler, loshandler->GetClass());
s.SerializeObjectInstance(radarhandler, radarhandler->GetClass());
s.SerializeObjectInstance(airBaseHandler, airBaseHandler->GetClass());
s.SerializeObjectInstance(&interceptHandler, interceptHandler.GetClass());
s.SerializeObjectInstance(CCategoryHandler::Instance(), CCategoryHandler::Instance()->GetClass());
s.SerializeObjectInstance(uh, uh->GetClass());
s.SerializeObjectInstance(ph, ph->GetClass());
// std::map<std::string, int> unitRestrictions;
s.SerializeObjectInstance(&waitCommandsAI, waitCommandsAI.GetClass());
s.SerializeObjectInstance(&wind, wind.GetClass());
s.SerializeObjectInstance(inMapDrawer,inMapDrawer->GetClass());
for (int a=0;a<MAX_TEAMS;a++)
s.SerializeObjectInstance(grouphandlers[a], grouphandlers[a]->GetClass());
s.SerializeObjectInstance(globalAI, globalAI->GetClass());
s.SerializeObjectInstance(&CBuilderCAI::reclaimers,CBuilderCAI::reclaimers.GetClass());
// s.Serialize()
}
示例3: Serialize
void CGameStateCollector::Serialize(creg::ISerializer& s)
{
// GetClass() works because readmap and uh both have to exist already
s.SerializeObjectInstance(gs, gs->GetClass());
s.SerializeObjectInstance(gu, gu->GetClass());
s.SerializeObjectInstance(game, game->GetClass());
s.SerializeObjectInstance(readmap, readmap->GetClass());
s.SerializeObjectInstance(qf, qf->GetClass());
s.SerializeObjectInstance(featureHandler, featureHandler->GetClass());
s.SerializeObjectInstance(loshandler, loshandler->GetClass());
s.SerializeObjectInstance(radarhandler, radarhandler->GetClass());
s.SerializeObjectInstance(airBaseHandler, airBaseHandler->GetClass());
s.SerializeObjectInstance(&interceptHandler, interceptHandler.GetClass());
s.SerializeObjectInstance(CCategoryHandler::Instance(), CCategoryHandler::Instance()->GetClass());
s.SerializeObjectInstance(uh, uh->GetClass());
s.SerializeObjectInstance(ph, ph->GetClass());
// std::map<std::string, int> unitRestrictions;
s.SerializeObjectInstance(&waitCommandsAI, waitCommandsAI.GetClass());
s.SerializeObjectInstance(&wind, wind.GetClass());
s.SerializeObjectInstance(inMapDrawerModel, inMapDrawerModel->GetClass());
for (int a=0; a < teamHandler->ActiveTeams(); a++) {
s.SerializeObjectInstance(grouphandlers[a], grouphandlers[a]->GetClass());
}
s.SerializeObjectInstance(eoh, eoh->GetClass());
// s.Serialize()
}