Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Public/Tests/SourceControlAutomationCommon.h
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

66 lines
1.2 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
namespace SourceControlAutomationCommon
{
/**
* Helper class for receiving the results of async source control operations
*/
class FAsyncCommandHelper
{
public:
FAsyncCommandHelper(const FString& InParameter = FString())
: Parameter(InParameter)
, bDispatched(false)
, bDone(false)
, bSuccessful(false)
{
}
void SourceControlOperationComplete(const FSourceControlOperationRef& Operation, ECommandResult::Type InResult)
{
bDone = true;
bSuccessful = InResult == ECommandResult::Succeeded;
}
const FString& GetParameter() const
{
return Parameter;
}
bool IsDispatched() const
{
return bDispatched;
}
void SetDispatched()
{
bDispatched = true;
}
bool IsDone() const
{
return bDone;
}
bool IsSuccessful() const
{
return bSuccessful;
}
private:
/** Parameter we perform this operation with, if any */
FString Parameter;
/** Whether the async operation been issued */
bool bDispatched;
/** Whether the async operation has completed */
bool bDone;
/** Whether the operation was successful */
bool bSuccessful;
};
}