You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
ProfilerClientModule.cpp: Implements the FProfilerClientModule class.
|
|
=============================================================================*/
|
|
|
|
#include "ProfilerClientPrivatePCH.h"
|
|
|
|
|
|
/**
|
|
* Implements the ProfilerClient module
|
|
*/
|
|
class FProfilerClientModule
|
|
: public IProfilerClientModule
|
|
{
|
|
public:
|
|
|
|
// Begin IModuleInterface interface
|
|
|
|
virtual void StartupModule() OVERRIDE
|
|
{
|
|
MessageBusPtr = IMessagingModule::Get().GetDefaultBus();
|
|
}
|
|
|
|
virtual void ShutdownModule() OVERRIDE
|
|
{
|
|
}
|
|
|
|
// End IModuleInterface interface
|
|
|
|
public:
|
|
|
|
// Begin IProfilerClientModule interface
|
|
|
|
virtual IProfilerClientPtr CreateProfilerClient() OVERRIDE
|
|
{
|
|
IMessageBusPtr MessageBus = MessageBusPtr.Pin();
|
|
|
|
if (!MessageBus.IsValid())
|
|
{
|
|
return nullptr;
|
|
}
|
|
|
|
return MakeShareable(new FProfilerClientManager(MessageBus.ToSharedRef()));
|
|
}
|
|
|
|
// End IProfilerClientModule interface
|
|
|
|
private:
|
|
|
|
// Holds a weak pointer to the message bus.
|
|
IMessageBusWeakPtr MessageBusPtr;
|
|
};
|
|
|
|
|
|
/* Static initialization
|
|
*****************************************************************************/
|
|
|
|
|
|
IMPLEMENT_MODULE(FProfilerClientModule, ProfilerClient);
|