本文整理汇总了C++中TSharedPtr::CheckinFiles方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedPtr::CheckinFiles方法的具体用法?C++ TSharedPtr::CheckinFiles怎么用?C++ TSharedPtr::CheckinFiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedPtr
的用法示例。
在下文中一共展示了TSharedPtr::CheckinFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Main
//.........这里部分代码省略.........
{
UE_LOG( LogGatherTextCommandlet, Error, TEXT("Source Control error: %s"), *SCCErrorStr.ToString() );
return -1;
}
}
// Basic helper that can be used only to gather a new manifest for writing
TSharedRef<FLocTextHelper> CommandletGatherManifestHelper = MakeShareable(new FLocTextHelper(MakeShareable(new FLocFileSCCNotifies(CommandletSourceControlInfo))));
CommandletGatherManifestHelper->LoadManifest(ELocTextHelperLoadFlags::Create);
int32 NumSteps = (ConfigFile->Find("CommonSettings") != NULL) ? ConfigFile->Num() - 1 : ConfigFile->Num();
//Execute each step defined in the config file.
for( int32 i=0; i<NumSteps ; ++i )
{
FString SectionName = FString::Printf(TEXT("GatherTextStep%d"),i);
FConfigSection* CurrCommandletSection = ConfigFile->Find(SectionName);
if( NULL == CurrCommandletSection )
{
UE_LOG(LogGatherTextCommandlet, Error, TEXT("Could not find %s"),*SectionName);
continue;
}
FString CommandletClassName = GConfig->GetStr( *SectionName, TEXT("CommandletClass"), GatherTextConfigPath ) + TEXT("Commandlet");
UClass* CommandletClass = FindObject<UClass>(ANY_PACKAGE,*CommandletClassName,false);
if (!CommandletClass)
{
UE_LOG(LogGatherTextCommandlet, Error,TEXT("The commandlet name %s in section %s is invalid."), *CommandletClassName, *SectionName);
continue;
}
UGatherTextCommandletBase* Commandlet = NewObject<UGatherTextCommandletBase>(GetTransientPackage(), CommandletClass);
check(Commandlet);
Commandlet->AddToRoot();
Commandlet->Initialize( CommandletGatherManifestHelper, CommandletSourceControlInfo );
// Execute the commandlet.
double CommandletExecutionStartTime = FPlatformTime::Seconds();
UE_LOG(LogGatherTextCommandlet, Log,TEXT("Executing %s: %s"), *SectionName, *CommandletClassName);
FString GeneratedCmdLine = FString::Printf(TEXT("-Config=\"%s\" -Section=%s"), *GatherTextConfigPath , *SectionName);
// Add all the command params with the exception of config
for(auto ParamIter = ParamVals.CreateConstIterator(); ParamIter; ++ParamIter)
{
const FString& Key = ParamIter.Key();
const FString& Val = ParamIter.Value();
if(Key != TEXT("config"))
{
GeneratedCmdLine += FString::Printf(TEXT(" -%s=%s"), *Key , *Val);
}
}
// Add all the command switches
for(auto SwitchIter = Switches.CreateConstIterator(); SwitchIter; ++SwitchIter)
{
const FString& Switch = *SwitchIter;
GeneratedCmdLine += FString::Printf(TEXT(" -%s"), *Switch);
}
if( 0 != Commandlet->Main( GeneratedCmdLine ) )
{
UE_LOG(LogGatherTextCommandlet, Error,TEXT("%s-%s reported an error."),*SectionName, *CommandletClassName);
if( CommandletSourceControlInfo.IsValid() )
{
FText SCCErrorStr;
if( !CommandletSourceControlInfo->CleanUp( SCCErrorStr ) )
{
UE_LOG(LogGatherTextCommandlet, Error, TEXT("%s"), *SCCErrorStr.ToString());
}
}
return -1;
}
UE_LOG(LogGatherTextCommandlet, Log,TEXT("Completed %s: %s"), *SectionName, *CommandletClassName);
}
if( CommandletSourceControlInfo.IsValid() && !bDisableSubmit )
{
FText SCCErrorStr;
if( CommandletSourceControlInfo->CheckinFiles( GetChangelistDescription(GatherTextConfigPath), SCCErrorStr ) )
{
UE_LOG(LogGatherTextCommandlet, Log,TEXT("Submitted Localization files."));
}
else
{
UE_LOG(LogGatherTextCommandlet, Error, TEXT("%s"), *SCCErrorStr.ToString());
if( !CommandletSourceControlInfo->CleanUp( SCCErrorStr ) )
{
UE_LOG(LogGatherTextCommandlet, Error, TEXT("%s"), *SCCErrorStr.ToString());
}
return -1;
}
}
return 0;
}