本文整理汇总了C++中FP4RecordSet::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ FP4RecordSet::Reset方法的具体用法?C++ FP4RecordSet::Reset怎么用?C++ FP4RecordSet::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FP4RecordSet
的用法示例。
在下文中一共展示了FP4RecordSet::Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunCommand
bool FPerforceConnection::RunCommand(const FString& InCommand, const TArray<FString>& InParameters, FP4RecordSet& OutRecordSet, TArray<FText>& OutErrorMessage, FOnIsCancelled InIsCancelled, bool& OutConnectionDropped, const bool bInStandardDebugOutput, const bool bInAllowRetry)
{
#if USE_P4_API
if (!bEstablishedConnection)
{
return false;
}
FString FullCommand = InCommand;
// Prepare arguments
int32 ArgC = InParameters.Num();
UTF8CHAR** ArgV = new UTF8CHAR*[ArgC];
for (int32 Index = 0; Index < ArgC; Index++)
{
if(bIsUnicode)
{
FTCHARToUTF8 UTF8String(*InParameters[Index]);
ArgV[Index] = new UTF8CHAR[UTF8String.Length() + 1];
FMemory::Memcpy(ArgV[Index], UTF8String.Get(), UTF8String.Length() + 1);
}
else
{
ArgV[Index] = new UTF8CHAR[InParameters[Index].Len() + 1];
FMemory::Memcpy(ArgV[Index], TCHAR_TO_ANSI(*InParameters[Index]), InParameters[Index].Len() + 1);
}
if (bInStandardDebugOutput)
{
FullCommand += TEXT(" ");
FullCommand += InParameters[Index];
}
}
if (bInStandardDebugOutput)
{
UE_LOG( LogSourceControl, Log, TEXT("Attempting 'p4 %s'"), *FullCommand );
}
double SCCStartTime = FPlatformTime::Seconds();
P4Client.SetArgv(ArgC, (char**)ArgV);
FP4KeepAlive KeepAlive(InIsCancelled);
P4Client.SetBreak(&KeepAlive);
OutRecordSet.Reset();
FP4ClientUser User(OutRecordSet, bIsUnicode, OutErrorMessage);
P4Client.Run(FROM_TCHAR(*InCommand, bIsUnicode), &User);
if ( P4Client.Dropped() )
{
OutConnectionDropped = true;
}
P4Client.SetBreak(NULL);
// Free arguments
for (int32 Index = 0; Index < ArgC; Index++)
{
delete [] ArgV[Index];
}
delete [] ArgV;
if (bInStandardDebugOutput)
{
UE_LOG( LogSourceControl, VeryVerbose, TEXT("P4 execution time: %0.4f seconds. Command: %s"), FPlatformTime::Seconds() - SCCStartTime, *FullCommand );
}
#endif
return OutRecordSet.Num() > 0;
}