Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundVariableRegistration.h
phil popp d5bd663e40 Implement MetasoundGraphCore Variable
#rb Rob.Gay
#jira UE-123940
#preflight 6137af632d09b9000130e10e

#ROBOMERGE-AUTHOR: phil.popp
#ROBOMERGE-SOURCE: CL 17450011 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17450040 by phil popp in ue5-release-engine-test branch]
2021-09-07 17:07:54 -04:00

40 lines
995 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundDataFactory.h"
#include <type_traits>
namespace Metasound
{
namespace Frontend
{
/** Allow or disallow types to be registered as MetaSound Variables. */
template<typename DataType>
struct TEnableVariables
{
// By default, all registered MetaSound data types are variables.
static constexpr bool Value = true;
};
/** Determine if data type supports necessary operations required of all
* MetaSound variable types.
*/
template<typename DataType>
struct TVariablesSupport
{
private:
static constexpr bool bIsCopyAssignable = std::is_copy_assignable<DataType>::value;
static constexpr bool bIsParsableFromLiteral = TLiteralTraits<DataType>::bIsParsableFromAnyLiteralType;
public:
/* MetaSound variables must be copy-assignable and parsable from a FLiteral */
static constexpr bool bIsVariableSupported = bIsCopyAssignable && bIsParsableFromLiteral;
};
}
}