Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/Private/UHTMakefile/StructScopeArchiveProxy.cpp
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

39 lines
1.3 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "UnrealHeaderTool.h"
#include "UHTMakefile/UHTMakefile.h"
#include "UHTMakefile/StructScopeArchiveProxy.h"
#include "Scope.h"
FArchive& operator<<(FArchive& Ar, FStructScopeArchiveProxy& StructScopeArchiveProxy)
{
Ar << static_cast<FScopeArchiveProxy&>(StructScopeArchiveProxy);
Ar << StructScopeArchiveProxy.StructIndex;
return Ar;
}
FStructScopeArchiveProxy::FStructScopeArchiveProxy(const FUHTMakefile& UHTMakefile, const FStructScope* StructScope)
: FScopeArchiveProxy(UHTMakefile, StructScope)
{
StructIndex = UHTMakefile.GetStructIndex(StructScope->Struct);
}
void FStructScopeArchiveProxy::AddReferencedNames(const FStructScope* StructScope, FUHTMakefile& UHTMakefile)
{
FScopeArchiveProxy::AddReferencedNames(StructScope, UHTMakefile);
}
FStructScope* FStructScopeArchiveProxy::CreateStructScope(const FUHTMakefile& UHTMakefile) const
{
return new FStructScope(nullptr, nullptr);
}
void FStructScopeArchiveProxy::Resolve(FStructScope* StructScope, const FUHTMakefile& UHTMakefile) const
{
FScopeArchiveProxy::Resolve(StructScope, UHTMakefile);
StructScope->Struct = UHTMakefile.GetStructByIndex(StructIndex);
FScope::ScopeMap.Add(StructScope->Struct, StructScope->HasBeenAlreadyMadeSharable() ? StructScope->AsShared() : MakeShareable(StructScope));
}