Files
UnrealEngineUWP/Engine/Source/Developer/TargetPlatform/Public/Interfaces/ITargetPlatformSettingsModule.h
florin pascu b49417947f First part of TargetPlatform(TP) refactor into TargetPlatformSettings(TPS) and TargetPlatformControls(TPC)
TPS doesn't need SDK and will be used to get info about the platform
TPC requires SDK
AndroidTP has been converted to the new system
#jira UE-200883
#rb Jack.Porter

[CL 30963905 by florin pascu in 5.4 branch]
2024-01-29 04:50:53 -05:00

55 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleInterface.h"
#include "Interfaces/ITargetPlatformSettings.h"
/**
* Interface for target platform modules.
*/
class ITargetPlatformSettingsModule
: public IModuleInterface
{
public:
/** Virtual destructor. */
virtual ~ITargetPlatformSettingsModule()
{
for (ITargetPlatformSettings* 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<ITargetPlatformSettings*> GetTargetPlatformSettings()
{
if (AllTargetPlatforms.Num() == 0)
{
GetTargetPlatformSettings(AllTargetPlatforms);
}
return AllTargetPlatforms;
}
protected:
/**
* This is where each platform module will fill out an array
*/
virtual void GetTargetPlatformSettings(TArray<ITargetPlatformSettings*>& TargetPlatforms) = 0;
private:
/** Holds the target platforms. */
TArray<ITargetPlatformSettings*> AllTargetPlatforms;
};