// Copyright Epic Games, Inc. All Rights Reserved. using System; using System.Collections.Generic; using System.Text; using System.IO; using AutomationTool; using UnrealBuildTool; using System.Reflection; using System.Xml; using System.Linq; using System.Diagnostics; using EpicGames.Core; namespace AutomationTool { /// /// Options for how the graph should be printed /// enum GraphPrintOptions { /// /// Includes a list of the graph options /// ShowCommandLineOptions = 0x1, /// /// Includes the list of dependencies for each node /// ShowDependencies = 0x2, /// /// Includes the list of notifiers for each node /// ShowNotifications = 0x4, } /// /// Diagnostic message from the graph script. These messages are parsed at startup, then culled along with the rest of the graph nodes before output. Doing so /// allows errors and warnings which are only output if a node is part of the graph being executed. /// class GraphDiagnostic { /// /// The diagnostic event type /// public LogEventType EventType; /// /// The message to display /// public string Message; /// /// The node which this diagnostic is declared in. If the node is culled from the graph, the message will not be displayed. /// public Node EnclosingNode; /// /// The agent that this diagnostic is declared in. If the entire agent is culled from the graph, the message will not be displayed. /// public Agent EnclosingAgent; /// /// The trigger that this diagnostic is declared in. If this trigger is not being run, the message will not be displayed. /// public ManualTrigger EnclosingTrigger; } /// /// Represents a graph option. These are expanded during preprocessing, but are retained in order to display help messages. /// class GraphOption { /// /// Name of this option /// public string Name; /// /// Description for this option /// public string Description; /// /// Default value for this option /// public string DefaultValue; /// /// Constructor /// /// The name of this option /// Description of the option, for display on help pages /// Default value for the option public GraphOption(string Name, string Description, string DefaultValue) { this.Name = Name; this.Description = Description; this.DefaultValue = DefaultValue; } /// /// Returns a name of this option for debugging /// /// Name of the option public override string ToString() { return Name; } } /// /// Definition of a graph. /// class Graph { /// /// List of options, in the order they were specified /// public List Options = new List(); /// /// List of agents containing nodes to execute /// public List Agents = new List(); /// /// All manual triggers that are part of this graph /// public Dictionary NameToTrigger = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping from name to agent /// public Dictionary NameToAgent = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping of names to the corresponding node. /// public Dictionary NameToNode = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping of names to the corresponding report. /// public Dictionary NameToReport = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping of names to their corresponding node output. /// public HashSet LocalTagNames = new HashSet(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping of names to their corresponding node output. /// public Dictionary TagNameToNodeOutput = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// Mapping of aggregate names to their respective nodes /// public Dictionary NameToAggregate = new Dictionary(StringComparer.InvariantCultureIgnoreCase); /// /// List of badges that can be displayed for this build /// public List Badges = new List(); /// /// List of labels that can be displayed for this build /// public List