2021-05-25 11:02:50 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Containers/StringFwd.h"
|
2021-07-19 16:47:17 -04:00
|
|
|
#include "Templates/Function.h"
|
2021-05-25 11:02:50 -04:00
|
|
|
|
|
|
|
|
struct FGuid;
|
|
|
|
|
|
|
|
|
|
namespace UE::DerivedData { class IBuildFunction; }
|
|
|
|
|
|
|
|
|
|
namespace UE::DerivedData
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A build function registry maintains a collection of build functions.
|
|
|
|
|
*/
|
|
|
|
|
class IBuildFunctionRegistry
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual ~IBuildFunctionRegistry() = default;
|
|
|
|
|
|
|
|
|
|
/** Find a function by name. Returns null if not found. Safe to call from a scheduled job or the main thread. */
|
2022-01-19 00:27:48 -05:00
|
|
|
virtual const IBuildFunction* FindFunction(FUtf8StringView Function) const = 0;
|
2021-05-25 11:02:50 -04:00
|
|
|
/** Find a function version by name. Returns zero if not found. Safe to call from any thread. */
|
2022-01-19 00:27:48 -05:00
|
|
|
virtual FGuid FindFunctionVersion(FUtf8StringView Function) const = 0;
|
2021-07-19 16:47:17 -04:00
|
|
|
/** Iterate the complete list of build function versions. Safe to call from any thread. */
|
2022-01-19 00:27:48 -05:00
|
|
|
virtual void IterateFunctionVersions(TFunctionRef<void(FUtf8StringView Name, const FGuid& Version)> Visitor) const = 0;
|
2021-05-25 11:02:50 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // UE::DerivedData
|