2021-05-03 09:25:48 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Containers/StringFwd.h"
|
|
|
|
|
|
|
|
|
|
class FCbObject;
|
2021-05-13 15:36:50 -04:00
|
|
|
struct FGuid;
|
2021-05-03 09:25:48 -04:00
|
|
|
|
2021-05-13 15:36:50 -04:00
|
|
|
namespace UE::DerivedData { class FBuildActionBuilder; }
|
2021-05-03 09:25:48 -04:00
|
|
|
namespace UE::DerivedData { class FBuildDefinitionBuilder; }
|
2021-05-12 15:46:19 -04:00
|
|
|
namespace UE::DerivedData { class FBuildOutputBuilder; }
|
|
|
|
|
namespace UE::DerivedData { class FCacheRecord; }
|
2021-05-14 14:47:11 -04:00
|
|
|
namespace UE::DerivedData { class FOptionalBuildAction; }
|
|
|
|
|
namespace UE::DerivedData { class FOptionalBuildDefinition; }
|
|
|
|
|
namespace UE::DerivedData { class FOptionalBuildOutput; }
|
2021-05-03 09:25:48 -04:00
|
|
|
|
|
|
|
|
namespace UE::DerivedData
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface to the build system.
|
|
|
|
|
*
|
|
|
|
|
* This is only a preview of a portion of the interface and does not support build execution.
|
|
|
|
|
*/
|
|
|
|
|
class IBuild
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual ~IBuild() = default;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a build definition builder.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this definition for logging and profiling.
|
|
|
|
|
* @param Function The name of the build function with which to build this definition.
|
|
|
|
|
*/
|
|
|
|
|
virtual FBuildDefinitionBuilder CreateDefinition(FStringView Name, FStringView Function) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load a build definition from compact binary.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this definition for logging and profiling.
|
|
|
|
|
* @param Definition An object saved from a build definition. Holds a reference and is cloned if not owned.
|
2021-05-14 14:47:11 -04:00
|
|
|
* @return A valid build definition, or null on error.
|
2021-05-03 09:25:48 -04:00
|
|
|
*/
|
2021-05-14 14:47:11 -04:00
|
|
|
virtual FOptionalBuildDefinition LoadDefinition(FStringView Name, FCbObject&& Definition) = 0;
|
2021-05-12 15:46:19 -04:00
|
|
|
|
2021-05-13 15:36:50 -04:00
|
|
|
/**
|
|
|
|
|
* Create a build action builder.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this action for logging and profiling.
|
|
|
|
|
* @param Function The name of the build function that produced this action.
|
|
|
|
|
*/
|
|
|
|
|
virtual FBuildActionBuilder CreateAction(FStringView Name, FStringView Function) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load a build action from compact binary.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this action for logging and profiling.
|
|
|
|
|
* @param Action The saved action to load.
|
2021-05-14 14:47:11 -04:00
|
|
|
* @return A valid build action, or null on error.
|
2021-05-13 15:36:50 -04:00
|
|
|
*/
|
2021-05-14 14:47:11 -04:00
|
|
|
virtual FOptionalBuildAction LoadAction(FStringView Name, FCbObject&& Action) = 0;
|
2021-05-13 15:36:50 -04:00
|
|
|
|
2021-05-12 15:46:19 -04:00
|
|
|
/**
|
|
|
|
|
* Create a build output builder.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this output for logging and profiling.
|
|
|
|
|
* @param Function The name of the build function that produced this output.
|
|
|
|
|
*/
|
|
|
|
|
virtual FBuildOutputBuilder CreateOutput(FStringView Name, FStringView Function) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load a build output.
|
|
|
|
|
*
|
|
|
|
|
* @param Name The name by which to identify this output for logging and profiling.
|
|
|
|
|
* @param Function The name of the build function that produced this output.
|
|
|
|
|
* @param Output The saved output to load.
|
2021-05-14 14:47:11 -04:00
|
|
|
* @return A valid build output, or null on error.
|
2021-05-12 15:46:19 -04:00
|
|
|
*/
|
2021-05-14 14:47:11 -04:00
|
|
|
virtual FOptionalBuildOutput LoadOutput(FStringView Name, FStringView Function, const FCbObject& Output) = 0;
|
|
|
|
|
virtual FOptionalBuildOutput LoadOutput(FStringView Name, FStringView Function, const FCacheRecord& Output) = 0;
|
2021-05-13 15:36:50 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the version of the build system.
|
|
|
|
|
*
|
|
|
|
|
* This version is expected to change very infrequently, only when formats and protocols used by
|
|
|
|
|
* the build system are changed in a way that breaks compatibility. This version is incorporated
|
|
|
|
|
* into build actions to keep the build output separate for different build versions.
|
|
|
|
|
*/
|
|
|
|
|
virtual const FGuid& GetVersion() const = 0;
|
2021-05-03 09:25:48 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // UE::DerivedData
|