Files
UnrealEngineUWP/Engine/Source/Developer/SourceControl/Public/ISourceControlLabel.h
Thomas Sarkanen 8ba3c4c087 Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
#rb none
#jira none

[CL 4665410 by Thomas Sarkanen in Dev-Anim branch]
2018-12-17 06:31:16 -05:00

60 lines
1.5 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
/**
* Abstraction of a source control label/tag.
*/
class ISourceControlLabel : public TSharedFromThis<ISourceControlLabel>
{
public:
/**
* Virtual destructor
*/
virtual ~ISourceControlLabel() {}
/**
* Get the name of this label
*/
virtual const FString& GetName() const = 0;
/**
* Get a list of file revisions at this label.
* @param InFile The file/directory to get
* @param OutRevisions The revisions retrieved by the operation
*/
virtual bool GetFileRevisions( const FString& InFile, TArray< TSharedRef<class ISourceControlRevision, ESPMode::ThreadSafe> >& OutRevisions ) const
{
TArray<FString> Files;
Files.Add(InFile);
return GetFileRevisions( Files, OutRevisions );
}
/**
* Get a list of file revisions at this label.
* @param InFiles The files/directories to get
* @param OutRevisions The revisions retrieved by the operation
*/
virtual bool GetFileRevisions( const TArray<FString>& InFiles, TArray< TSharedRef<class ISourceControlRevision, ESPMode::ThreadSafe> >& OutRevisions ) const = 0;
/**
* Sync a path/filename to this label
* @param InFilename The path or filename to sync
*/
virtual bool Sync( const FString& InFilename ) const
{
TArray<FString> Files;
Files.Add(InFilename);
return Sync( Files );
}
/**
* Sync a list of paths/filenames to this label
* @param InFilenames The paths or filenames to sync
*/
virtual bool Sync( const TArray<FString>& InFilenames ) const = 0;
};