Files
UnrealEngineUWP/Engine/Source/Developer/BlueprintCompilerCppBackend/Private/BlueprintCompilerCppBackendModule.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

56 lines
2.0 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "BlueprintCompilerCppBackendModulePrivatePCH.h"
#include "IBlueprintCompilerCppBackendModule.h"
#include "ModuleManager.h"
#include "BlueprintCompilerCppBackend.h"
#include "BlueprintCompilerCppBackendUtils.h" // for FEmitHelper::GetBaseFilename()
class FBlueprintCompilerCppBackendModule : public IBlueprintCompilerCppBackendModule
{
public:
//~ Begin IBlueprintCompilerCppBackendModuleInterface interface
virtual IBlueprintCompilerCppBackend* Create() override;
//~ End IBlueprintCompilerCppBackendModuleInterface interface
//~ Begin IBlueprintCompilerCppBackendModule interface
virtual FString ConstructBaseFilename(const UObject* AssetObj) override;
virtual FPCHFilenameQuery& OnPCHFilenameQuery() override;
virtual FIsTargetedForConversionQuery& OnIsTargetedForConversionQuery() override;
virtual TMap<TWeakObjectPtr<UClass>, TWeakObjectPtr<UClass> >& GetOriginalClassMap() override;
//~ End IBlueprintCompilerCppBackendModule interface
private:
FPCHFilenameQuery PCHFilenameQuery;
FIsTargetedForConversionQuery IsTargetedForConversionQuery;
TMap<TWeakObjectPtr<UClass>, TWeakObjectPtr<UClass> > OriginalClassMap;
};
IBlueprintCompilerCppBackend* FBlueprintCompilerCppBackendModule::Create()
{
return new FBlueprintCompilerCppBackend();
}
FString FBlueprintCompilerCppBackendModule::ConstructBaseFilename(const UObject* AssetObj)
{
// use the same function that the backend uses for #includes
return FEmitHelper::GetBaseFilename(AssetObj);
}
IBlueprintCompilerCppBackendModule::FPCHFilenameQuery& FBlueprintCompilerCppBackendModule::OnPCHFilenameQuery()
{
return PCHFilenameQuery;
}
IBlueprintCompilerCppBackendModule::FIsTargetedForConversionQuery& FBlueprintCompilerCppBackendModule::OnIsTargetedForConversionQuery()
{
return IsTargetedForConversionQuery;
}
TMap<TWeakObjectPtr<UClass>, TWeakObjectPtr<UClass> >& FBlueprintCompilerCppBackendModule::GetOriginalClassMap()
{
return OriginalClassMap;
}
IMPLEMENT_MODULE(FBlueprintCompilerCppBackendModule, BlueprintCompilerCppBackend)