You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "IProfilerServiceModule.h"
|
|
#include "ProfilerServiceManager.h"
|
|
|
|
|
|
/**
|
|
* Implements the ProfilerService module
|
|
*/
|
|
class FProfilerServiceModule
|
|
: public IProfilerServiceModule
|
|
{
|
|
public:
|
|
|
|
//~ IModuleInterface interface
|
|
|
|
virtual void ShutdownModule() override
|
|
{
|
|
if (ProfilerServiceManager.IsValid())
|
|
{
|
|
((FProfilerServiceManager*)ProfilerServiceManager.Get())->Shutdown();
|
|
}
|
|
ProfilerServiceManager.Reset();
|
|
}
|
|
|
|
public:
|
|
|
|
//~ IProfilerServiceModule interface
|
|
|
|
virtual TSharedPtr<IProfilerServiceManager> CreateProfilerServiceManager() override
|
|
{
|
|
if (!ProfilerServiceManager.IsValid())
|
|
{
|
|
ProfilerServiceManager = FProfilerServiceManager::CreateSharedServiceManager();
|
|
((FProfilerServiceManager*)ProfilerServiceManager.Get())->Init();
|
|
}
|
|
|
|
return ProfilerServiceManager;
|
|
}
|
|
|
|
private:
|
|
|
|
/** The profiler service singleton. */
|
|
static TSharedPtr<IProfilerServiceManager> ProfilerServiceManager;
|
|
};
|
|
|
|
|
|
TSharedPtr<IProfilerServiceManager> FProfilerServiceModule::ProfilerServiceManager = nullptr;
|
|
|
|
|
|
IMPLEMENT_MODULE(FProfilerServiceModule, ProfilerService);
|