Files
UnrealEngineUWP/Engine/Source/Developer/CrashDebugHelper/Private/CrashDebugHelperModule.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

67 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CrashDebugHelperModule.h"
#include "Logging/LogMacros.h"
#include "Modules/ModuleManager.h"
#include "CrashDebugHelperPrivate.h"
IMPLEMENT_MODULE(FCrashDebugHelperModule, CrashDebugHelper);
DEFINE_LOG_CATEGORY(LogCrashDebugHelper);
#if PLATFORM_WINDOWS
#include "CrashDebugHelperWindows.h"
#elif PLATFORM_LINUX
#include "Linux/CrashDebugHelperLinux.h"
#elif PLATFORM_MAC
#include "CrashDebugHelperMac.h"
#elif PLATFORM_IOS
#include "CrashDebugHelperIOS.h"
#elif PLATFORM_ANDROID
#include "Android/CrashDebugHelperAndroid.h"
#else
#error "Unknown platform"
#endif
void FCrashDebugHelperModule::StartupModule()
{
CrashDebugHelper = new FCrashDebugHelper();
if (CrashDebugHelper != nullptr)
{
CrashDebugHelper->Init();
}
}
void FCrashDebugHelperModule::ShutdownModule()
{
if (CrashDebugHelper != nullptr)
{
delete CrashDebugHelper;
CrashDebugHelper = nullptr;
}
}
ICrashDebugHelper* FCrashDebugHelperModule::Get()
{
return CrashDebugHelper;
}
ICrashDebugHelper* FCrashDebugHelperModule::GetNew()
{
if (CrashDebugHelper != nullptr)
{
delete CrashDebugHelper;
CrashDebugHelper = nullptr;
}
CrashDebugHelper = new FCrashDebugHelper();
if (CrashDebugHelper != nullptr)
{
CrashDebugHelper->Init();
}
return CrashDebugHelper;
}