Navigation
API > API/Plugins > API/Plugins/MetasoundGraphCore
References
| Module | MetasoundGraphCore |
| Header | /Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Public/MetasoundLiteral.h |
| Include | #include "MetasoundLiteral.h" |
Syntax
struct FLiteral
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVariantType | Value |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FLiteral () |
Construct a literal param with no arguments. | ||
FLiteral
(
ArgType&& Arg |
Construct a literal param with a single argument. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FLiteral | Builds an invalid FLiteral. | ||
| FLiteral | GetDefaultForType
(
ELiteralType InType |
||
| ELiteralType | GetType () |
||
| bool | IsValid () |
||
| void | Set
(
ArgType&& Arg |
Classes
| Type | Name | Description | |
|---|---|---|---|
| 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. |
Typedefs
| Name | Description |
|---|---|
| FVariantType |