Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.BuildGraph/BgAggregateDef.cs
Ben Marsh bb0e506aac BuildGraph: Rename classes to reduce boilerplate when writing scripts.
* Expression classes (nodes, aggregates, graphs, etc...) are now called BgNode, BgAggregate, etc...
* Evaluated and instantiated objects used by BuildGraph internals are now called BgNodeDef, BgAggregateDef, etc...

#preflight 62b6374161016695a6545b08

[CL 20818158 by Ben Marsh in ue5-main branch]
2022-06-24 18:30:51 -04:00

62 lines
1.4 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.Collections.Generic;
namespace EpicGames.BuildGraph
{
/// <summary>
/// Defines a agggregate within a graph, which give the combined status of one or more job steps, and allow building several steps at once.
/// </summary>
public class BgAggregateDef
{
/// <summary>
/// Name of this badge
/// </summary>
public string Name { get; }
/// <summary>
/// Set of nodes that must be run for this label to be shown.
/// </summary>
public HashSet<BgNodeDef> RequiredNodes { get; } = new HashSet<BgNodeDef>();
/// <summary>
/// Constructor
/// </summary>
/// <param name="name">Name of this aggregate</param>
public BgAggregateDef(string name)
{
Name = name;
}
/// <summary>
/// Get the name of this label
/// </summary>
/// <returns>The name of this label</returns>
public override string ToString()
{
return Name;
}
}
/// <summary>
/// Aggregate that was created from bytecode
/// </summary>
public class BgBytecodeAggregateDef : BgAggregateDef
{
/// <summary>
/// Labels to add this aggregate to
/// </summary>
public BgLabelDef? Label { get; }
/// <summary>
/// Constructor
/// </summary>
public BgBytecodeAggregateDef(string name, IEnumerable<BgNodeDef> nodes, BgLabelDef? label)
: base(name)
{
RequiredNodes.UnionWith(nodes);
Label = label;
}
}
}