// Copyright Epic Games, Inc. All Rights Reserved. using System.Collections.Generic; using EpicGames.Core; using EpicGames.UHT.Tokenizer; using EpicGames.UHT.Types; namespace EpicGames.UHT.Utils { /// /// Describes whether issues will generate warnings or errors /// public enum UhtIssueBehavior { /// /// An error will be generated. /// Disallow, /// /// Ignore the issue. /// AllowSilently, /// /// Log a warning. /// AllowAndLog, }; /// /// Interface for accessing configuration data. Since UnrealBuildTool depends on EpicGames.UHT and all /// of the configuration support exists in UBT, configuration data must be accessed through an interface. /// public interface IUhtConfig { /// /// Default version of generated code. Defaults to oldest possible, unless specified otherwise in config. /// public EGeneratedCodeVersion DefaultGeneratedCodeVersion { get; } /// /// Pointer warning for native pointers in the engine /// public UhtIssueBehavior EngineNativePointerMemberBehavior { get; } /// /// Pointer warning for object pointers in the engine /// public UhtIssueBehavior EngineObjectPtrMemberBehavior { get; } /// /// Pointer warning for native pointers in engine plugins /// public UhtIssueBehavior EnginePluginNativePointerMemberBehavior { get; } /// /// Pointer warning for object pointers in engine plugins /// public UhtIssueBehavior EnginePluginObjectPtrMemberBehavior { get; } /// /// Pointer warning for native pointers outside the engine /// public UhtIssueBehavior NonEngineNativePointerMemberBehavior { get; } /// /// Pointer warning for object pointers outside the engine /// public UhtIssueBehavior NonEngineObjectPtrMemberBehavior { get; } /// /// If true, deprecation warnings should be shown /// public bool ShowDeprecations { get; } /// /// If true, UObject properties are enabled in RigVM /// public bool AreRigVMUObjectPropertiesEnabled { get; } /// /// If true, UInterface properties are enabled in RigVM /// public bool AreRigVMUInterfaceProeprtiesEnabled { get; } /// /// Behavior for when generated headers aren't properly included in engine code. /// public UhtIssueBehavior EngineMissingGeneratedHeaderIncludeBehavior { get; } /// /// Behavior for when generated headers aren't properly included in non-engine code. /// public UhtIssueBehavior NonEngineMissingGeneratedHeaderIncludeBehavior { get; } /// /// Behavior for when enum underlying types aren't set for engine code. /// public UhtIssueBehavior EngineEnumUnderlyingTypeNotSet { get; } /// /// Behavior for when enum underlying types aren't set for non engine code. /// public UhtIssueBehavior NonEngineEnumUnderlyingTypeNotSet { get; } /// /// Collection of all known documentation policies /// public IReadOnlyDictionary DocumentationPolicies { get; } /// /// Settings to use for the development status /// public string ValkyrieDevelopmentStatusKey { get; } /// /// Settings to use for the development status /// public string ValkyrieDevelopmentStatusValueExperimental { get; } /// /// Settings to use for the deprecation status /// public string ValkyrieDeprecationStatusKey { get; } /// /// Settings to use for the deprecation status /// public string ValkyrieDeprecationStatusValueDeprecated { get; } /// /// Default documentation policy to be used if none is specified /// public string DefaultDocumentationPolicy { get; } /// /// If the token references a remapped identifier, update the value in the token /// /// Token to be remapped public void RedirectTypeIdentifier(ref UhtToken token); /// /// Return the remapped key or the existing key /// /// Key to be remapped. /// Resulting key name /// True if the key has been remapped and has changed. public bool RedirectMetaDataKey(string key, out string newKey); /// /// Test to see if the given units are valid. /// /// Units to test /// True if the units are valid, false if not public bool IsValidUnits(StringView units); /// /// Test to see if the structure name should be using a "T" prefix. /// /// Name of the structure to test without any prefix. /// True if the structure should have a "T" prefix. public bool IsStructWithTPrefix(StringView name); /// /// Test to see if the given macro has a parameter count as part of the name. /// /// Macro to test /// -1 if the macro does not contain a parameter count. The number of parameters minus one. public int FindDelegateParameterCount(StringView delegateMacro); /// /// Get the parameter count string associated with the given index /// /// Index from a prior call to FindDelegateParameterCount or -1. /// Parameter count string or an empty string if Index is -1. public StringView GetDelegateParameterCountString(int index); /// /// Test to see if the exporter is enabled /// /// Name of the exporter /// True if the exporter is enabled, false if not public bool IsExporterEnabled(string name); } }