Files
phil popp 07cf8fc40c Fix for ensure when adding variable set or get node when dragged from pin.
#jira UE-135952
#rb Rob.Gay, Helen.Yang
#preflight 61ddce0cce7fe7aeff6b621f

#ROBOMERGE-AUTHOR: phil.popp
#ROBOMERGE-SOURCE: CL 18574927 in //UE5/Release-5.0/... via CL 18574938
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18574950 by phil popp in ue5-release-engine-test branch]
2022-01-11 13:56:42 -05:00

42 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Set.h"
#include "Misc/Guid.h"
#include "Templates/Function.h"
namespace Metasound
{
namespace Frontend
{
// Forward declare.
class IInputController;
class IOutputController;
class INodeController;
class METASOUNDFRONTEND_API FGraphLinter
{
public:
using FDepthFirstVisitFunction = TFunctionRef<TSet<FGuid> (const INodeController&)>;
/** Returns true if connecting thing input and output controllers will cause
* a loop in the graph. Returns false otherwise.
*/
static bool DoesConnectionCauseLoop(const IInputController& InInputController, const IOutputController& InOutputController);
/** Returns true if the FromNode can reach the ToNode by traversing the graph
* in the forward direction. */
static bool IsReachableDownstream(const INodeController& InFromNode, const INodeController& InToNode);
/** Returns true if the FromNode can reach the ToNode by traversing the graph backwards
* (aka by traversing the transpose graph).
*/
static bool IsReachableUpstream(const INodeController& InFromNode, const INodeController& InToNode);
/** Visits nodes using depth first traversals. */
static void DepthFirstTraversal(const INodeController& Node, FDepthFirstVisitFunction Visit);
};
}
}