Files
UnrealEngine/Engine/Plugins/Developer/SubversionSourceControl/Source/SubversionSourceControl/Private/SubversionSourceControlCommand.h
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

78 lines
2.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ISourceControlProvider.h"
#include "Misc/IQueuedWork.h"
/**
* Used to execute Subversion commands multi-threaded.
*/
class FSubversionSourceControlCommand : public IQueuedWork
{
public:
FSubversionSourceControlCommand(const TSharedRef<class ISourceControlOperation, ESPMode::ThreadSafe>& InOperation, const TSharedRef<class ISubversionSourceControlWorker, ESPMode::ThreadSafe>& InWorker, const FSourceControlOperationComplete& InOperationCompleteDelegate = FSourceControlOperationComplete() );
/**
* This is where the real thread work is done. All work that is done for
* this queued object should be done from within the call to this function.
*/
bool DoWork();
/**
* Tells the queued work that it is being abandoned so that it can do
* per object clean up as needed. This will only be called if it is being
* abandoned before completion. NOTE: This requires the object to delete
* itself using whatever heap it was allocated in.
*/
virtual void Abandon() override;
/**
* This method is also used to tell the object to cleanup but not before
* the object has finished it's work.
*/
virtual void DoThreadedWork() override;
/** Save any results and call any registered callbacks. */
ECommandResult::Type ReturnResults();
public:
/** Connection parameters, reproduced here because if is not safe to access the provider's settings from another thread */
FString RepositoryName;
FString UserName;
FString Password;
FString WorkingCopyRoot;
FString RepositoryRoot;
/** Operation we want to perform - contains outward-facing parameters & results */
TSharedRef<class ISourceControlOperation, ESPMode::ThreadSafe> Operation;
/** The object that will actually do the work */
TSharedRef<class ISubversionSourceControlWorker, ESPMode::ThreadSafe> Worker;
/** Delegate to notify when this operation completes */
FSourceControlOperationComplete OperationCompleteDelegate;
/**If true, this command has been processed by the source control thread*/
volatile int32 bExecuteProcessed;
/**If true, the source control command succeeded*/
bool bCommandSuccessful;
/** If true, this command will be automatically cleaned up in Tick() */
bool bAutoDelete;
/** Whether we are running multi-treaded or not*/
EConcurrency::Type Concurrency;
/** Files to perform this operation on */
TArray< FString > Files;
/**Info and/or warning message message storage*/
TArray< FString > InfoMessages;
/**Potential error message storage*/
TArray< FString > ErrorMessages;
};