// Copyright Epic Games, Inc. All Rights Reserved. using EpicGames.Core; namespace UnrealBuildTool { /// /// Stores information about where a module rules object came from, and how it can be used. /// internal class ModuleRulesContext { /// /// The scope for this module. Used to validate references to other modules. /// public RulesScope Scope { get; set; } /// /// The default directory for output files /// public DirectoryReference DefaultOutputBaseDir { get; set; } /// /// The plugin that this module belongs to /// public PluginInfo? Plugin { get; set; } /// /// Whether this module should be included in the default hot reload set /// public bool bCanHotReload { get; set; } /// /// Whether this module should be compiled with optimization disabled in DebugGame configurations (ie. whether it's a game module). /// public bool bCanBuildDebugGame { get; set; } /// /// Whether this module can be used for generating shared PCHs /// public bool bCanUseForSharedPCH { get; set; } /// /// Whether to treat this module as a game module for UHT ordering /// public bool bClassifyAsGameModuleForUHT { get; set; } /// /// The default module type for UnrealHeaderTool. Do not use this for inferring other things about the module. /// public UHTModuleType? DefaultUHTModuleType { get; set; } /// /// Constructor /// public ModuleRulesContext(RulesScope scope, DirectoryReference defaultOutputBaseDir) { Scope = scope; DefaultOutputBaseDir = defaultOutputBaseDir; bCanUseForSharedPCH = true; } /// /// Copy constructor /// /// The context to copy from public ModuleRulesContext(ModuleRulesContext other) { Scope = other.Scope; DefaultOutputBaseDir = other.DefaultOutputBaseDir; Plugin = other.Plugin; bCanHotReload = other.bCanHotReload; bCanBuildDebugGame = other.bCanBuildDebugGame; bCanUseForSharedPCH = other.bCanUseForSharedPCH; bClassifyAsGameModuleForUHT = other.bClassifyAsGameModuleForUHT; DefaultUHTModuleType = other.DefaultUHTModuleType; } } }