You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Removed the function to return a single TP, and wrapped the functionality in a simple single required function (platform just has to add TPs to an array, high level code manages init and cleanup of the array) - Stripped unncessary code from all TPs - Collapsed the desktop targetplatform modules into 1 per platform - Renamed LinuxAArch64NoEditorTargetPlatfortm to LinuxAArch64TargetPlatform to match the other non-editor platforms - Deleted AllDesktopPlatform [CL 13502803 by Josh Adams in ue5-main branch]
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Modules/ModuleInterface.h"
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
|
|
/**
|
|
* Interface for target platform modules.
|
|
*/
|
|
class ITargetPlatformModule
|
|
: public IModuleInterface
|
|
{
|
|
|
|
public:
|
|
|
|
/** Virtual destructor. */
|
|
virtual ~ITargetPlatformModule()
|
|
{
|
|
for (ITargetPlatform* TP : AllTargetPlatforms)
|
|
{
|
|
delete TP;
|
|
}
|
|
AllTargetPlatforms.Empty();
|
|
}
|
|
|
|
/**
|
|
* Gets the module's target platforms. This should be overridden by each platform, but
|
|
* currently, we are re-using the single internal GetTargetPlatform method the old TPModules will implement
|
|
*
|
|
* @return The target platform.
|
|
*/
|
|
TArray<ITargetPlatform*> GetTargetPlatforms()
|
|
{
|
|
if (AllTargetPlatforms.Num() == 0)
|
|
{
|
|
GetTargetPlatforms(AllTargetPlatforms);
|
|
}
|
|
|
|
return AllTargetPlatforms;
|
|
}
|
|
|
|
protected:
|
|
|
|
/**
|
|
* This is where each platform module will fill out an array
|
|
*/
|
|
virtual void GetTargetPlatforms(TArray<ITargetPlatform*>& TargetPlatforms) = 0;
|
|
|
|
private:
|
|
/** Holds the target platforms. */
|
|
TArray<ITargetPlatform*> AllTargetPlatforms;
|
|
};
|