Files
UnrealEngineUWP/Engine/Source/Programs/UnrealHeaderTool/Public/IScriptGeneratorPluginInterface.h

106 lines
3.0 KiB
C
Raw Normal View History

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ModuleManager.h"
/** Build module type, mirrored in UEBuildModule.cs, enum UEBUildModuletype */
struct EBuildModuleType
{
enum Type
{
Unknown,
Runtime,
Developer,
Editor,
ThirdParty,
Program,
Game,
// NOTE: If you add a new value, make sure to update the ToString() method below!
Max
};
Copying //UE4/Dev-Core to //UE4/Main ========================== MAJOR FEATURES + CHANGES ========================== Change 2717513 on 2015/10/06 by Robert.Manuszewski@Robert_Manuszewski_EGUK_M1 GC and WeakObjectPtr performance optimizations. - Moved some of the EObjectFlags to EInternalObjectFlags and merged them with FUObjectArray - Moved WeakObjectPtr serial numbersto FUObjectArray - Added pre-allocated UObject array Change 2716517 on 2015/10/05 by Robert.Manuszewski@Robert_Manuszewski_EGUK_M1 Make SavePackage thread safe UObject-wise so that StaticFindObject etc can't run in parallel when packages are being saved. Change 2721142 on 2015/10/08 by Mikolaj.Sieluzycki@Dev-Core_D0920 UHT will now use makefiles to speed up iterative runs. Change 2726320 on 2015/10/13 by Jaroslaw.Palczynski@jaroslaw.palczynski_D1732_2963 Hot-reload performance optimizations: 1. Got rid of redundant touched BPs optimization (which was necessary before major HR fixes submitted earlier). 2. Parallelized search for old CDOs referencers. Change 2759032 on 2015/11/09 by Graeme.Thornton@GThornton_DesktopMaster Dependency preloading improvements - Asset registry dependencies now resolve asset redirectors - Rearrange runtime loading to put dependency preloads within BeginLoad/EndLoad for the source package Change 2754342 on 2015/11/04 by Robert.Manuszewski@Robert_Manuszewski_Stream1 Allow UnfocusedVolumeMultiplier to be set programmatically Change 2764008 on 2015/11/12 by Robert.Manuszewski@Robert_Manuszewski_Stream1 When cooking, don't add imports that are outers of objects excluded from the current cook target. Change 2755562 on 2015/11/05 by Steve.Robb@Dev-Core Inline storage for TFunction. Fix for delegate inline storage on Win64. Some build fixes. Visualizer fixes for new TFunction format. Change 2735084 on 2015/10/20 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec CrashReporter Web - Search by Platform Added initial support for streams (GetBranchesAsListItems, CopyToJira) Change 2762387 on 2015/11/11 by Steve.Robb@Dev-Core Unnecessary allocation removed when loading empty files in FFileHelper::LoadFileToString. Change 2762632 on 2015/11/11 by Steve.Robb@Dev-Core Some TSet function optimisations: Avoiding unnecessary hashing of function arguments if the container is empty (rather than the hash being empty, which is not necessarily equivalent). Taking local copies of HashSize during iterations. Change 2762936 on 2015/11/11 by Steve.Robb@Dev-Core BulkData zero byte allocations are now handled by an RAII object which owns the memory. Change 2765758 on 2015/11/13 by Steve.Robb@Dev-Core FName::operator== and != optimised to be a single comparison. Change 2757195 on 2015/11/06 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec PR #1305: Improvements in CrashReporter for Symbol Server usage (Contributed by bozaro) Change 2760778 on 2015/11/10 by Jaroslaw.Surowiec@Stream.1.JarekSurowiec PR #1725: Fixed typos in ProfilerCommon.h; Added comments (Contributed by BGR360) Also fixed starting condition. Change 2739804 on 2015/10/23 by Robert.Manuszewski@Robert_Manuszewski_Stream1 PR #1470: [UObjectGlobals] Do not overwrite instanced subobjects with ones from CDO (Contributed by slonopotamus) Change 2744733 on 2015/10/28 by Steve.Robb@Dev-Core PR #1540 - Specifying a different Saved folder at launch through a command line parameter Integrated and optimized. #lockdown Nick.Penwarden [CL 2772222 by Robert Manuszewski in Main branch]
2015-11-18 16:20:49 -05:00
friend FArchive& operator<<(FArchive& Ar, EBuildModuleType::Type& Type)
{
if (Ar.IsLoading())
{
uint8 Value;
Ar << Value;
Type = (EBuildModuleType::Type)Value;
}
else if (Ar.IsSaving())
{
uint8 Value = (uint8)Type;
Ar << Value;
}
return Ar;
}
/**
* Converts a string literal into EModuleType::Type value
*
* @param The string to convert to EModuleType::Type
*
* @return The enum value corresponding to the name
*/
inline static const EBuildModuleType::Type Parse(const TCHAR* Value)
{
if (FCString::Stricmp(Value, TEXT("Unknown")) == 0)
{
return Unknown;
}
else if (FCString::Stricmp(Value, TEXT("Runtime")) == 0)
{
return Runtime;
}
else if (FCString::Stricmp(Value, TEXT("Developer")) == 0)
{
return Developer;
}
else if (FCString::Stricmp(Value, TEXT("Editor")) == 0)
{
return Editor;
}
else if (FCString::Stricmp(Value, TEXT("ThirdParty")) == 0)
{
return ThirdParty;
}
else if (FCString::Stricmp(Value, TEXT("Program")) == 0)
{
return Program;
}
else if (FCString::Stricmp(Value, TEXT("Game")) == 0)
{
return Game;
}
else
{
FError::Throwf(TEXT("Unrecognized EBuildModuleType name: %s"), Value);
return Unknown;
}
}
};
/**
* The public interface to script generator plugins.
*/
class IScriptGeneratorPluginInterface : public IModuleInterface, public IModularFeature
{
public:
/** Name of module that is going to be compiling generated script glue */
virtual FString GetGeneratedCodeModuleName() const = 0;
/** Returns true if this plugin supports exporting scripts for the specified target. This should handle game as well as editor target names */
virtual bool SupportsTarget(const FString& TargetName) const = 0;
/** Returns true if this plugin supports exporting scripts for the specified module */
virtual bool ShouldExportClassesForModule(const FString& ModuleName, EBuildModuleType::Type ModuleType, const FString& ModuleGeneratedIncludeDirectory) const = 0;
/** Initializes this plugin with build information */
virtual void Initialize(const FString& RootLocalPath, const FString& RootBuildPath, const FString& OutputDirectory, const FString& IncludeBase) = 0;
/** Exports a single class. May be called multiple times for the same class (as UHT processes the entire hierarchy inside modules. */
virtual void ExportClass(class UClass* Class, const FString& SourceHeaderFilename, const FString& GeneratedHeaderFilename, bool bHasChanged) = 0;
/** Called once all classes have been exported */
virtual void FinishExport() = 0;
/** Name of the generator plugin, mostly for debuggind purposes */
virtual FString GetGeneratorName() const = 0;
};