Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCoding/Private/LiveCodingModule.h
ryan durand 471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00

67 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ILiveCodingModule.h"
#include "Delegates/Delegate.h"
#include "Modules/ModuleManager.h"
#include "Templates/SharedPointer.h"
struct IConsoleCommand;
class IConsoleVariable;
class ISettingsSection;
class ULiveCodingSettings;
class FLiveCodingModule final : public ILiveCodingModule
{
public:
FLiveCodingModule();
// IModuleInterface implementation
virtual void StartupModule() override;
virtual void ShutdownModule() override;
// ILiveCodingModule implementation
virtual void EnableByDefault(bool bInEnabled) override;
virtual bool IsEnabledByDefault() const override;
virtual void EnableForSession(bool bInEnabled) override;
virtual bool IsEnabledForSession() const override;
virtual bool CanEnableForSession() const override;
virtual bool HasStarted() const override;
virtual void ShowConsole() override;
virtual void Compile() override;
virtual bool IsCompiling() const override;
virtual void Tick() override;
virtual FOnPatchCompleteDelegate& GetOnPatchCompleteDelegate() override;
private:
ULiveCodingSettings* Settings;
TSharedPtr<ISettingsSection> SettingsSection;
bool bEnabledLastTick;
bool bEnabledForSession;
bool bStarted;
bool bUpdateModulesInTick;
TSet<FName> ConfiguredModules;
const FString FullEnginePluginsDir;
const FString FullProjectDir;
const FString FullProjectPluginsDir;
IConsoleCommand* EnableCommand;
IConsoleCommand* CompileCommand;
IConsoleVariable* ConsolePathVariable;
IConsoleVariable* SourceProjectVariable;
FDelegateHandle EndFrameDelegateHandle;
FDelegateHandle ModulesChangedDelegateHandle;
FOnPatchCompleteDelegate OnPatchCompleteDelegate;
bool StartLiveCoding();
void OnModulesChanged(FName ModuleName, EModuleChangeReason Reason);
void UpdateModules();
bool ShouldPreloadModule(const FName& Name, const FString& FullFilePath) const;
};