// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" /** * Abstraction of a source control label/tag. */ class ISourceControlLabel : public TSharedFromThis { 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 >& OutRevisions ) const { TArray 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& InFiles, TArray< TSharedRef >& 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 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& InFilenames ) const = 0; };