2021-07-28 17:12:57 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "MetasoundFrontendGraph.h"
|
|
|
|
|
#include "MetasoundVertex.h"
|
|
|
|
|
|
|
|
|
|
namespace Metasound
|
|
|
|
|
{
|
|
|
|
|
namespace Frontend
|
|
|
|
|
{
|
|
|
|
|
/** FReceiveNodeAddressFunction defines the function signature for callbacks
|
|
|
|
|
* to create send addresses. Different systems may rely on different data
|
|
|
|
|
* in the Metasound Environment to create a unique address.
|
|
|
|
|
*
|
|
|
|
|
* @param InEnv - The current environment of the graph hosting the receive node.
|
2021-09-13 14:14:37 -04:00
|
|
|
* @param InVertexName - The input vertex key of the graph input which will have a
|
2021-07-28 17:12:57 -04:00
|
|
|
* receive node injected.
|
|
|
|
|
* @param InTypeName - The data type of the receive node.
|
|
|
|
|
*
|
|
|
|
|
* @return FSendAddress The resulting transmission address for the receive node.
|
|
|
|
|
*/
|
2021-09-13 14:14:37 -04:00
|
|
|
using FReceiveNodeAddressFunction = TFunction<FSendAddress(const FMetasoundEnvironment& InEnv, const FVertexName& InVertexName, const FName& InTypeName)>;
|
2021-07-28 17:12:57 -04:00
|
|
|
|
|
|
|
|
/** Injects a receive node between an graph input and the connected internal nodes.
|
|
|
|
|
*
|
|
|
|
|
* @param InGraph - The graph to manipulate.
|
|
|
|
|
* @parma InAddressPolicy - A function which creates unique transmission addresses for each input.
|
|
|
|
|
* @param InInputDestination - The input destination on the graph where a receive node should be injected.
|
|
|
|
|
*
|
|
|
|
|
* @return True on success, false on failure.
|
|
|
|
|
*/
|
|
|
|
|
METASOUNDFRONTEND_API bool InjectReceiveNode(FFrontendGraph& InGraph, const FReceiveNodeAddressFunction& InAddressPolicy, const FInputDataDestination& InInputDestination);
|
|
|
|
|
|
|
|
|
|
/** Injects receive nodes between an graph inputs and the connected internal nodes.
|
|
|
|
|
*
|
|
|
|
|
* @param InGraph - The graph to manipulate.
|
2021-11-22 15:55:50 -05:00
|
|
|
* @parma InAddressPolicy - Function which creates unique transmission addresses for each input.
|
|
|
|
|
* @param InInputVertexNames - Set of input vertices which should have receive nodes injected.
|
2021-07-28 17:12:57 -04:00
|
|
|
*
|
2021-11-22 15:55:50 -05:00
|
|
|
* @return True on success, false on failure.
|
2021-07-28 17:12:57 -04:00
|
|
|
*/
|
2021-11-22 15:55:50 -05:00
|
|
|
METASOUNDFRONTEND_API bool InjectReceiveNodes(FFrontendGraph& InGraph, const FReceiveNodeAddressFunction& InAddressPolicy, const TSet<FVertexName>& InInputVertexNames);
|
2021-07-28 17:12:57 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|