本文整理汇总了C++中FConfigFile::Combine方法的典型用法代码示例。如果您正苦于以下问题:C++ FConfigFile::Combine方法的具体用法?C++ FConfigFile::Combine怎么用?C++ FConfigFile::Combine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FConfigFile
的用法示例。
在下文中一共展示了FConfigFile::Combine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HotfixPakIniFile
bool UOnlineHotfixManager::HotfixPakIniFile(const FString& FileName)
{
FConfigFile* ConfigFile = GetConfigFile(FileName);
ConfigFile->Combine(FileName);
UE_LOG(LogHotfixManager, Log, TEXT("Hotfix merged INI (%s) found in a PAK file"), *FileName);
FName IniFileName(*FileName, FNAME_Find);
int32 NumObjectsReloaded = 0;
const double StartTime = FPlatformTime::Seconds();
// Now that we have a list of classes to update, we can iterate objects and
// reload if they match the INI file that was changed
for (FObjectIterator It; It; ++It)
{
UClass* Class = It->GetClass();
if (Class->HasAnyClassFlags(CLASS_Config) &&
Class->ClassConfigName == IniFileName)
{
// Force a reload of the config vars
It->ReloadConfig();
NumObjectsReloaded++;
}
}
UE_LOG(LogHotfixManager, Log, TEXT("Updating config from %s took %f seconds reloading %d objects"),
*FileName, FPlatformTime::Seconds() - StartTime, NumObjectsReloaded);
return true;
}
示例2: CombineConfig
/** Combine 2 config files together, putting the result in a third */
void CombineConfig(const TCHAR* Base, const TCHAR* Other, const TCHAR* Output)
{
FConfigFile Config;
Config.Read(Base);
Config.Combine(Other);
Config.Write(Output, false /*bDoRemoteWrite*/);
}