本文整理汇总了C++中FScope::AddArgInteger方法的典型用法代码示例。如果您正苦于以下问题:C++ FScope::AddArgInteger方法的具体用法?C++ FScope::AddArgInteger怎么用?C++ FScope::AddArgInteger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FScope
的用法示例。
在下文中一共展示了FScope::AddArgInteger方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Save
//
// Save from the Var Scope into the FScope
//
void Save(FScope *fScope, VarSys::VarScope *vScope)
{
// Add all of the items in this vScope to the fScope
BinTree<VarSys::VarItem>::Iterator i(&vScope->items);
for (!i; *i; i++)
{
switch ((*i)->type)
{
case VarSys::VI_SCOPE:
{
// Add this scope to the fScope
FScope *sScope = fScope->AddFunction("VarScope");
sScope->AddArgString((*i)->itemId.str);
Save(sScope, (*i)->scope.ptr);
break;
}
case VarSys::VI_INTEGER:
{
FScope *sScope = fScope->AddFunction("VarInteger");
sScope->AddArgString((*i)->itemId.str);
sScope->AddArgInteger((*i)->Integer());
break;
}
case VarSys::VI_FPOINT:
{
FScope *sScope = fScope->AddFunction("VarFloat");
sScope->AddArgString((*i)->itemId.str);
sScope->AddArgFPoint((*i)->Float());
break;
}
case VarSys::VI_STRING:
{
FScope *sScope = fScope->AddFunction("VarString");
sScope->AddArgString((*i)->itemId.str);
sScope->AddArgString((*i)->Str());
break;
}
case VarSys::VI_BINARY:
{
FScope *sScope = fScope->AddFunction("VarBinary");
sScope->AddArgString((*i)->itemId.str);
StdSave::TypeU32(sScope, "Size", (*i)->BinarySize());
StdSave::TypeBinary(sScope, (*i)->BinarySize(), (*i)->Binary());
break;
}
default:
// We don't save anything else
break;
}
}
}
示例2:
//
// SaveState
//
// Save state information
//
void Script::Manager::SaveState(FScope *scope)
{
// Save the recruit id
StdSave::TypeU32(scope, "RecruitId", recruitId);
// Save each script
for (NBinTree<Script>::Iterator s(&scripts); *s; s++)
{
// Get the script
Script *script = *s;
// Create the scope
FScope *sScope = scope->AddFunction("Script");
// Add construction data as arguments
sScope->AddArgString(script->GetName());
sScope->AddArgString(script->GetConfigName());
sScope->AddArgInteger(script->GetWeighting());
sScope->AddArgInteger(script->GetPriority());
// Save the script state data
script->SaveState(sScope);
}
}
示例3:
//
// SaveState
//
// Save state information
//
void Resource::Manager::SaveState(FScope *scope)
{
StdSave::TypeU32(scope, "ResourceId", resourceId);
StdSave::TypeReaperList(scope, "ResourceTransports", resourceTransports);
for (NBinTree<Resource, F32>::Iterator i(&resources); *i; i++)
{
// Create a new function
FScope *sScope = scope->AddFunction("Resource");
// Save the proximity key
sScope->AddArgFPoint(i.GetKey());
// Save the id
sScope->AddArgInteger((*i)->GetId());
// Save resource data
(*i)->SaveState(sScope);
}
}