Navigation
API > API/Plugins > API/Plugins/MetasoundGraphCore
FLiteral represents a constant value in a Metasound graph and is primarily used to invoke the correct constructor of a Metasound data type. To be constructed using a FLiteral, the Metasound data type must support a constructor which accepts one of the types supported by a FLiteral. The Metasound data type may optionally accept a `const FOperatorSettings&_ in addition.
Example: // Somewhere before DECLARE_METASOUND_DATA_REFERENCE_TYPES(FAudioBuffer...), ParseFrom
//... // In the frontend, we know that int and pass it to somewhere in MetasoundGraphCore... FLiteral InitParam(512);
//... // In the backend, we can safely construct an FAudioBuffer. if(InitParam.IsCompatibleWithType
| Name | FLiteral |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Public/MetasoundLiteral.h |
| Include Path | #include "MetasoundLiteral.h" |
Syntax
struct FLiteral
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FLiteral () |
Construct a literal param with no arguments. | MetasoundLiteral.h | |
FLiteral
(
ArgType&& Arg |
Construct a literal param with a single argument. | MetasoundLiteral.h |
Structs
| Name | Remarks |
|---|---|
| FInvalid | |
| FNone | FNone is used in scenarios where an object is constructed with an FLiteral where the expected object constructor is the default constructor, or a constructor which accepts an FOperatorSettings. |
| TIsSupportedLiteralType | Forward declare. |
| TIsSupportedLiteralTypeHelper | Helper function to determine if type "U" can be stored in this FLiteral. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FVariantType | TVariant< FNone, bool, int32, float, FString, TSharedPtr< Audio::IProxyData >, TArray< FNone >, TArray< bool >, TArray< int32 >, TArray< float >, TArray< FString >, TArray< TSharedPtr< Audio::IProxyData > >, FInvalid > | MetasoundLiteral.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Value | FVariantType | MetasoundLiteral.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ELiteralType GetType() |
MetasoundLiteral.h | ||
bool IsValid() |
MetasoundLiteral.h | ||
void Set
(
ArgType&& Arg |
MetasoundLiteral.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FLiteral CreateInvalid() |
Builds an invalid FLiteral. | MetasoundLiteral.h | |
static FLiteral GetDefaultForType
(
ELiteralType InType |
MetasoundLiteral.h |