本文整理汇总了C++中TSharedPtr::CanCheckout方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedPtr::CanCheckout方法的具体用法?C++ TSharedPtr::CanCheckout怎么用?C++ TSharedPtr::CanCheckout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedPtr
的用法示例。
在下文中一共展示了TSharedPtr::CanCheckout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
bool FCheckInLatentCommand::Update()
{
if(!AsyncHelper.IsDispatched())
{
TSharedRef<FCheckIn, ESPMode::ThreadSafe> CheckInOperation = ISourceControlOperation::Create<FCheckIn>();
CheckInOperation->SetDescription(TEXT("[AUTOMATED TEST] Automatic checkin, testing functionality."));
if(!ISourceControlModule::Get().GetProvider().Execute(
CheckInOperation,
SourceControlHelpers::PackageFilename(AsyncHelper.GetParameter()),
EConcurrency::Asynchronous,
FSourceControlOperationComplete::CreateRaw( &AsyncHelper, &FAsyncCommandHelper::SourceControlOperationComplete )
))
{
return true;
}
AsyncHelper.SetDispatched();
}
if(AsyncHelper.IsDone())
{
// check state now we are done
TSharedPtr<ISourceControlState, ESPMode::ThreadSafe> SourceControlState = ISourceControlModule::Get().GetProvider().GetState(SourceControlHelpers::PackageFilename(AsyncHelper.GetParameter()), EStateCacheUsage::Use);
if(!SourceControlState.IsValid())
{
UE_LOG(LogSourceControl, Error, TEXT("Could not retrieve state for file '%s'"), *AsyncHelper.GetParameter());
}
else
{
if(!SourceControlState->IsSourceControlled() || !SourceControlState->CanCheckout())
{
UE_LOG(LogSourceControl, Error, TEXT("Unexpected state following Check In operation for file '%s'"), *AsyncHelper.GetParameter());
}
}
}
return AsyncHelper.IsDone();
}