Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Public/Tests/SourceControlAutomationCommon.h
ben marsh 2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00

69 lines
1.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "ISourceControlProvider.h"
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;
};
}