Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/Private/UHTMakefile/PropertyBaseArchiveProxy.h
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

142 lines
2.7 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "MakefileHelpers.h"
#include "ParserHelper.h"
class FArchive;
/* See UHTMakefile.h for overview how makefiles work. */
class FPropertyBase;
class FUHTMakefile;
inline FArchive& operator<<(FArchive& Ar, EPropertyType& PropertyType)
{
if (Ar.IsLoading())
{
int32 Value;
Ar << Value;
PropertyType = (EPropertyType)Value;
}
else if (Ar.IsSaving())
{
int32 Value = (int32)PropertyType;
Ar << Value;
}
return Ar;
}
inline FArchive& operator<<(FArchive& Ar, ETokenType& TokenType)
{
if (Ar.IsLoading())
{
int32 Value;
Ar << Value;
TokenType = (ETokenType)Value;
}
else if (Ar.IsSaving())
{
int32 Value = (int32)TokenType;
Ar << Value;
}
return Ar;
}
inline FArchive& operator<<(FArchive& Ar, EArrayType::Type& ArrayType)
{
if (Ar.IsLoading())
{
int32 Value;
Ar << Value;
ArrayType = (EArrayType::Type)Value;
}
else if (Ar.IsSaving())
{
int32 Value = (int32)ArrayType;
Ar << Value;
}
return Ar;
}
inline FArchive& operator<<(FArchive& Ar, ERefQualifier::Type& RefQualifier)
{
if (Ar.IsLoading())
{
int32 Value;
Ar << Value;
RefQualifier = (ERefQualifier::Type)Value;
}
else if (Ar.IsSaving())
{
int32 Value = (int32)RefQualifier;
Ar << Value;
}
return Ar;
}
inline FArchive& operator<<(FArchive& Ar, EPointerType::Type& PointerType)
{
if (Ar.IsLoading())
{
int32 Value;
Ar << Value;
PointerType = (EPointerType::Type)Value;
}
else if (Ar.IsSaving())
{
int32 Value = (int32)PointerType;
Ar << Value;
}
return Ar;
}
struct FPropertyBaseArchiveProxy
{
FPropertyBaseArchiveProxy(const FUHTMakefile& UHTMakefile, const FPropertyBase* PropertyBase);
FPropertyBaseArchiveProxy() { }
static void AddReferencedNames(const FPropertyBase* PropertyBase, FUHTMakefile& UHTMakefile);
friend FArchive& operator<<(FArchive& Ar, FPropertyBaseArchiveProxy& PropertyBaseArchiveProxy);
FPropertyBase* CreatePropertyBase(const FUHTMakefile& UHTMakefile) const;
void PostConstruct(FPropertyBase* PropertyBase) const;
void Resolve(FPropertyBase* PropertyBase, const FUHTMakefile& UHTMakefile) const;
EPropertyType Type;
EArrayType::Type ArrayType;
uint64 PropertyFlags;
uint64 ImpliedPropertyFlags;
ERefQualifier::Type RefQualifier;
int32 MapKeyPropIndex;
uint32 PropertyExportFlags;
FSerializeIndex PropertyClassIndex;
FSerializeIndex StructIndex;
union
{
int32 EnumIndex;
int32 FunctionIndex;
#if PLATFORM_64BITS
int64 StringSize;
#else
int32 StringSize;
#endif
};
FSerializeIndex MetaClassIndex;
FNameArchiveProxy DelegateName;
FNameArchiveProxy RepNotifyName;
FString ExportInfo;
TArray<TPair<FNameArchiveProxy, FString>> MetaData;
EPointerType::Type PointerType;
};