Files
UnrealEngineUWP/Engine/Source/Runtime/HTML5/MapPakDownloader/Private/MapPakDownloaderModule.cpp
Ben Marsh 7598af0532 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

[CL 4662404 by Ben Marsh in Main branch]
2018-12-14 13:41:00 -05:00

53 lines
1.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "MapPakDownloaderModule.h"
#include "MapPakDownloader.h"
#include "MapPakDownloaderLog.h"
class FMapPakDownloaderModule : public IMapPakDownloaderModule
{
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
virtual TSharedPtr<FMapPakDownloader> GetDownloader() override;
private:
TSharedPtr<FMapPakDownloader> MapPakDownloader;
};
IMPLEMENT_MODULE(FMapPakDownloaderModule, MapPakDownloader)
void FMapPakDownloaderModule::StartupModule()
{
// This code will execute after your module is loaded into memory (but after global variables are initialized, of course.)
TSharedPtr<FMapPakDownloader> Downloader = MakeShareable(new FMapPakDownloader());
if (!Downloader->Init())
{
ShutdownModule();
}
MapPakDownloader = Downloader;
}
void FMapPakDownloaderModule::ShutdownModule()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
// we call this function before unloading the module.
}
TSharedPtr<FMapPakDownloader> FMapPakDownloaderModule::GetDownloader()
{
return MapPakDownloader;
}
DEFINE_LOG_CATEGORY(LogMapPakDownloader);