本文整理汇总了C++中FScope::AddFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ FScope::AddFunction方法的具体用法?C++ FScope::AddFunction怎么用?C++ FScope::AddFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FScope
的用法示例。
在下文中一共展示了FScope::AddFunction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveState
//
// SaveState
//
// Save object state information
//
void Object::SaveState(FScope *scope)
{
// Save the managers (order is significant)
scriptManager.SaveState(scope->AddFunction("ScriptManager"));
transportManager.SaveState(scope->AddFunction("TransportManager"));
assetManager.SaveState(scope->AddFunction("AssetManager"));
bombardierManager.SaveState(scope->AddFunction("BombardierManager"));
intelManager.SaveState(scope->AddFunction("IntelManager"));
placementManager.SaveState(scope->AddFunction("PlacementManager"));
ruleManager.SaveState(scope->AddFunction("RuleManager"));
resourceManager.SaveState(scope->AddFunction("ResourceManager"));
waterManager.SaveState(scope->AddFunction("WaterManager"));
baseManager.SaveState(scope->AddFunction("BaseManager"));
// Create scope for notifications
FScope *sScope = scope->AddFunction("Notifications");
// Save each current notification
for (NList<Notification>::Iterator i(¬ifications); *i; ++i)
{
// Get this notification
Notification &n = **i;
// Save it out
FScope *ssScope = sScope->AddFunction("Add");
StdSave::TypeReaper(ssScope, "From", n.from);
StdSave::TypeU32(ssScope, "Message", n.message);
StdSave::TypeU32(ssScope, "Param1", n.param1);
StdSave::TypeU32(ssScope, "Param2", n.param2);
}
}