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