Files
UnrealEngineUWP/Engine/Source/Developer/AutomationController/Private/AutomationControllerModule.cpp
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

78 lines
2.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
AutomationControllerModule.cpp: Implements the FAutomationControllerModule class.
=============================================================================*/
#include "AutomationControllerModule.h"
#include "AutomationControllerManager.h"
#if WITH_EDITOR
#include "MessageLogInitializationOptions.h"
#include "MessageLogModule.h"
#endif
#define LOCTEXT_NAMESPACE "AutomationTesting"
IMPLEMENT_MODULE(FAutomationControllerModule, AutomationController);
IAutomationControllerManagerRef FAutomationControllerModule::GetAutomationController( )
{
if (!AutomationControllerSingleton.IsValid())
{
AutomationControllerSingleton = MakeShareable(new FAutomationControllerManager());
}
return AutomationControllerSingleton.ToSharedRef();
}
void FAutomationControllerModule::Init()
{
GetAutomationController()->Init();
}
void FAutomationControllerModule::Tick()
{
GetAutomationController()->Tick();
}
void FAutomationControllerModule::ShutdownModule()
{
GetAutomationController()->Shutdown();
AutomationControllerSingleton.Reset();
#if WITH_EDITOR
if (FModuleManager::Get().IsModuleLoaded("MessageLog"))
{
FMessageLogModule& MessageLogModule = FModuleManager::GetModuleChecked<FMessageLogModule>("MessageLog");
MessageLogModule.UnregisterLogListing("AutomationTestingLog");
}
#endif
}
void FAutomationControllerModule::StartupModule()
{
GetAutomationController()->Startup();
#if WITH_EDITOR
FMessageLogModule& MessageLogModule = FModuleManager::LoadModuleChecked<FMessageLogModule>("MessageLog");
FMessageLogInitializationOptions InitOptions;
InitOptions.bShowFilters = true;
InitOptions.bShowPages = true;
MessageLogModule.RegisterLogListing("AutomationTestingLog", LOCTEXT("AutomationTesting", "Automation Testing Log"), InitOptions);
#endif
}
bool FAutomationControllerModule::SupportsDynamicReloading()
{
return true;
}
/* Static initialization
*****************************************************************************/
IAutomationControllerManagerPtr FAutomationControllerModule::AutomationControllerSingleton = NULL;
#undef LOCTEXT_NAMESPACE