Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/Private/IScriptGeneratorPluginInterface.cpp
Ben Marsh 13d012685f Merging copyright update from 4.19 branch.
#rb none
#rnx
#jira

[CL 3818977 by Ben Marsh in Staging-4.19 branch]
2018-01-02 15:30:26 -05:00

42 lines
1004 B
C++

// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "IScriptGeneratorPluginInterface.h"
#include "UnrealHeaderTool.h"
#include "UObject/ErrorException.h"
#include "Containers/Algo/FindSortedStringCaseInsensitive.h"
EBuildModuleType::Type EBuildModuleType::Parse(const TCHAR* Value)
{
static const TCHAR* AlphabetizedTypes[] = {
TEXT("EngineDeveloper"),
TEXT("EngineEditor"),
TEXT("EngineRuntime"),
TEXT("EngineThirdParty"),
TEXT("GameDeveloper"),
TEXT("GameEditor"),
TEXT("GameRuntime"),
TEXT("GameThirdParty"),
TEXT("Program")
};
int32 TypeIndex = Algo::FindSortedStringCaseInsensitive(Value, AlphabetizedTypes);
if (TypeIndex < 0)
{
FError::Throwf(TEXT("Unrecognized EBuildModuleType name: %s"), Value);
}
static EBuildModuleType::Type AlphabetizedValues[] = {
EngineDeveloper,
EngineEditor,
EngineRuntime,
EngineThirdParty,
GameDeveloper,
GameEditor,
GameRuntime,
GameThirdParty,
Program
};
return AlphabetizedValues[TypeIndex];
}