2021-05-13 11:11:54 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "IRemoteExecutionModule.h"
|
|
|
|
|
#include "DefaultRemoteExecutor.h"
|
|
|
|
|
|
|
|
|
|
REMOTEEXECUTION_API DECLARE_LOG_CATEGORY_EXTERN(LogRemoteExecution, Display, All);
|
|
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
|
|
|
|
|
namespace UE::RemoteExecution
|
2021-05-13 11:11:54 -04:00
|
|
|
{
|
2021-09-17 11:17:27 -04:00
|
|
|
class FRemoteExecutionModule : public IRemoteExecutionModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/** Default constructor. */
|
|
|
|
|
FRemoteExecutionModule();
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
// IModuleInterface interface
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
virtual void StartupModule() override;
|
|
|
|
|
virtual void ShutdownModule() override;
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
// IRemoteExecutionModule interface
|
|
|
|
|
virtual bool CanRemoteExecute() const override;
|
|
|
|
|
virtual IRemoteExecutor& GetRemoteExecutor() const override;
|
|
|
|
|
virtual void SetRemoteExecutor(const FName& InName);
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
private:
|
|
|
|
|
/** Handle when one of the modular features we are interested in is registered */
|
|
|
|
|
void HandleModularFeatureRegistered(const FName& Type, IModularFeature* ModularFeature);
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
/** Handle when one of the modular features we are interested in is unregistered */
|
|
|
|
|
void HandleModularFeatureUnregistered(const FName& Type, IModularFeature* ModularFeature);
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
FDefaultRemoteExecutor DefaultExecutor;
|
2021-05-13 11:11:54 -04:00
|
|
|
|
2021-09-17 11:17:27 -04:00
|
|
|
IRemoteExecutor* CurrentExecutor;
|
|
|
|
|
};
|
|
|
|
|
}
|