Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/Private/IScriptGeneratorPluginInterface.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

42 lines
1004 B
C++

// Copyright 1998-2017 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];
}