You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Moved the parsing of the enumeration form and underlying type to the pre-parser so they can be accessed during the parse phase. Fixed "warning as errors" return code. Removed the SimplePropertyTypeDispatch since it was only used the the version that supported containers. #rb self #rnx #preflight 60af9c85cd591d0001bc9a6e [CL 16483831 by Tim Smith in ue5-main branch]
77 lines
1.8 KiB
C++
77 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "IScriptGeneratorPluginInterface.h"
|
|
#include "Exceptions.h"
|
|
#include "UnrealHeaderTool.h"
|
|
#include "Algo/FindSortedStringCaseInsensitive.h"
|
|
|
|
extern FString GManifestFilename; // This is a bit of a hack...
|
|
|
|
EBuildModuleType::Type EBuildModuleType::Parse(const TCHAR* Value)
|
|
{
|
|
static const TCHAR* AlphabetizedTypes[] = {
|
|
TEXT("EngineDeveloper"),
|
|
TEXT("EngineEditor"),
|
|
TEXT("EngineRuntime"),
|
|
TEXT("EngineThirdParty"),
|
|
TEXT("EngineUncooked"),
|
|
TEXT("GameDeveloper"),
|
|
TEXT("GameEditor"),
|
|
TEXT("GameRuntime"),
|
|
TEXT("GameThirdParty"),
|
|
TEXT("GameUncooked"),
|
|
TEXT("Program")
|
|
};
|
|
|
|
int32 TypeIndex = Algo::FindSortedStringCaseInsensitive(Value, AlphabetizedTypes);
|
|
if (TypeIndex < 0)
|
|
{
|
|
FUHTMessage(GManifestFilename).Throwf(TEXT("Unrecognized EBuildModuleType name: %s"), Value);
|
|
}
|
|
|
|
static EBuildModuleType::Type AlphabetizedValues[] = {
|
|
EngineDeveloper,
|
|
EngineEditor,
|
|
EngineRuntime,
|
|
EngineThirdParty,
|
|
EngineUncooked,
|
|
GameDeveloper,
|
|
GameEditor,
|
|
GameRuntime,
|
|
GameThirdParty,
|
|
GameUncooked,
|
|
Program
|
|
};
|
|
|
|
return AlphabetizedValues[TypeIndex];
|
|
}
|
|
|
|
EPackageOverrideType::Type EPackageOverrideType::Parse(const TCHAR* Value)
|
|
{
|
|
static const TCHAR* AlphabetizedTypes[] = {
|
|
TEXT("EditorOnly"),
|
|
TEXT("EngineDeveloper"),
|
|
TEXT("EngineUncookedOnly"),
|
|
TEXT("GameDeveloper"),
|
|
TEXT("GameUncookedOnly"),
|
|
TEXT("None"),
|
|
};
|
|
|
|
int32 TypeIndex = Algo::FindSortedStringCaseInsensitive(Value, AlphabetizedTypes);
|
|
if (TypeIndex < 0)
|
|
{
|
|
FUHTMessage(GManifestFilename).Throwf(TEXT("Unrecognized EPackageOverrideType name: %s"), Value);
|
|
}
|
|
|
|
static EPackageOverrideType::Type AlphabetizedValues[] = {
|
|
EditorOnly,
|
|
EngineDeveloper,
|
|
EngineUncookedOnly,
|
|
GameDeveloper,
|
|
GameUncookedOnly,
|
|
None
|
|
};
|
|
|
|
return AlphabetizedValues[TypeIndex];
|
|
}
|