You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
57 lines
1.0 KiB
C++
57 lines
1.0 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Containers/UnrealString.h"
|
|
|
|
class FArchive;
|
|
class FString;
|
|
|
|
//
|
|
// This MUST be kept in sync with EGeneratedBodyVersion in UBT defined in ExternalExecution.cs
|
|
// and with ToGeneratedBodyVersion function below
|
|
//
|
|
enum class EGeneratedCodeVersion : uint8
|
|
{
|
|
None,
|
|
V1,
|
|
V2,
|
|
VLatest = V2
|
|
};
|
|
|
|
inline FArchive& operator<<(FArchive& Ar, EGeneratedCodeVersion& Type)
|
|
{
|
|
if (Ar.IsLoading())
|
|
{
|
|
uint8 Value;
|
|
Ar << Value;
|
|
Type = (EGeneratedCodeVersion)Value;
|
|
}
|
|
else if (Ar.IsSaving())
|
|
{
|
|
uint8 Value = (uint8)Type;
|
|
Ar << Value;
|
|
}
|
|
return Ar;
|
|
}
|
|
|
|
inline EGeneratedCodeVersion ToGeneratedCodeVersion(const FString& InString)
|
|
{
|
|
if (InString.Compare(TEXT("V1")) == 0)
|
|
{
|
|
return EGeneratedCodeVersion::V1;
|
|
}
|
|
|
|
if (InString.Compare(TEXT("V2")) == 0)
|
|
{
|
|
return EGeneratedCodeVersion::V2;
|
|
}
|
|
|
|
if (InString.Compare(TEXT("VLatest")) == 0)
|
|
{
|
|
return EGeneratedCodeVersion::VLatest;
|
|
}
|
|
|
|
return EGeneratedCodeVersion::None;
|
|
}
|