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

43 lines
1.2 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "PropertyDataArchiveProxy.h"
#include "UnrealHeaderTool.h"
#include "ParserHelper.h"
#include "UHTMakefile.h"
#include "TokenDataArchiveProxy.h"
FPropertyDataArchiveProxy::FPropertyDataArchiveProxy(const FUHTMakefile& UHTMakefile, const FPropertyData* PropertyData)
{
for (const auto& Kvp : *PropertyData)
{
EntriesIndexes.Add(UHTMakefile.GetPropertyDataEntryIndex(&Kvp));
}
}
void FPropertyDataArchiveProxy::AddReferencedNames(const FPropertyData* PropertyData, FUHTMakefile& UHTMakefile)
{ }
FArchive& operator<<(FArchive& Ar, FPropertyDataArchiveProxy& PropertyDataArchiveProxy)
{
Ar << PropertyDataArchiveProxy.EntriesIndexes;
return Ar;
}
FPropertyData* FPropertyDataArchiveProxy::CreatePropertyData(const FUHTMakefile& UHTMakefile) const
{
return new FPropertyData();
}
void FPropertyDataArchiveProxy::Resolve(FPropertyData* PropertyData, FUHTMakefile& UHTMakefile)
{
PropertyData->Empty(EntriesIndexes.Num());
for (int32 Index : EntriesIndexes)
{
const TPair<UProperty*, TSharedPtr<FTokenData>>* Entry = UHTMakefile.GetPropertyDataEntryByIndex(Index);
UHTMakefile.ResolvePropertyDataEntry(Index);
PropertyData->Add(Entry->Key, Entry->Value);
}
}