Navigation
API > API/Plugins > API/Plugins/RigVM > API/Plugins/RigVM/RigVMCore
References
| Module | RigVM |
| Header | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMTemplate.h |
| Include | #include "RigVMCore/RigVMTemplate.h" |
Syntax
struct FRigVMTemplate
Remarks
The template is used to group multiple rigvm functions that share the same notation. Templates can then be used to build polymorphic nodes (RigVMTemplateNode) that can take on any of the permutations supported by the template.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AddTypeForArgument
(
const FName& InArgumentName, |
Adds a new argument to the template. | |
| bool | ArgumentSupportsTypeIndex
(
const FName& InArgumentName, |
Returns true if a given arg supports a type | |
| void | ComputeNotationFromArguments
(
const FString& InTemplateName |
Recomputes the notation from its arguments | |
| bool | ContainsPermutation
(
const FTypeMap& InTypes |
Returns true if the template was able to resolve to at least one permutation | |
| bool | ContainsPermutation
(
const FRigVMFunction* InPermutation |
Returns true if a given function is a permutation of this template | |
| const FRigVMTemplateArgument * | FindArgument
(
const FName& InArgumentName |
Returns an argument given a name (or nullptr) | |
| const FRigVMExecuteArgument * | FindExecuteArgument
(
const FName& InArgumentName, |
Returns an argument given a name (or nullptr) | |
| int32 | FindPermutation
(
const FRigVMFunction* InPermutation |
Returns the index of the permutation within the template of a given function (or INDEX_NONE) | |
| int32 | FindPermutation
(
const FTypeMap& InTypes |
Returns the index of the permutation within the template of a given set of types | |
| bool | FullyResolve
(
FTypeMap& InOutTypes, |
Returns true if the template was able to resolve to single permutation | |
| const FRigVMTemplateArgument * | GetArgument
(
int32 InIndex |
Returns an argument for a given index | |
| FString | GetArgumentMetaData
(
const FName& InArgumentName, |
Returns meta data on the property of the permutations. | |
| FString | GetArgumentNotation
(
const FRigVMTemplateArgument& InArgument |
Returns the notation of an argument | |
| const FString & | GetArgumentNotationPrefix
(
const FRigVMTemplateArgument& InArgument |
Returns the prefix for an argument in the notation | |
| FTypeMap | GetArgumentTypesFromString
(
const FString& InTypeString |
Converts the types provided by a string (like "A:float,B:int32") into a type map | |
| FString | GetCategory () |
||
| FLinearColor | Returns the color based on the permutation's metadata. | ||
| const FRigVMDispatchFactory * | Returns the factory this template was created by. | ||
| FText | GetDisplayNameForArgument
(
const FName& InArgumentName, |
Returns the display name text for an argument. | |
| const FRigVMExecuteArgument * | GetExecuteArgument
(
int32 InIndex, |
Returns an argument for a given index | |
| const UScriptStruct * | Returns the top level execute context struct this template uses | ||
| FString | GetKeywords () |
||
| FName | GetName () |
Returns the name of the template. | |
| const FName & | GetNotation () |
Returns the notation of this template. | |
| const FRigVMFunction * | GetOrCreatePermutation
(
int32 InIndex |
Returns a permutation given an index and creates it using the backing factory if needed | |
| const FRigVMFunction * | GetPermutation
(
int32 InIndex |
Returns a permutation given an index | |
| const FRigVMFunction * | Returns the first / primary permutation of the template | ||
| FString | GetStringFromArgumentTypes
(
const FTypeMap& InTypes |
Converts the types provided to a string (like "A:float,B:int32") | |
| TArray< UStruct * > | GetSuperStructs
(
UStruct* InStruct, |
Returns an array of structs in the inheritance order of a given struct | |
| FText | GetTooltipText
(
const TArray< int32 >& InPermutationIndices |
Returns the tooltip based on the permutation's metadata. | |
| FRigVMTemplateTypeMap | GetTypesForPermutation
(
const int32 InPermutationIndex |
Returns the types for a specific permutation | |
| uint32 | GetTypesHashFromTypes
(
const FTypeMap& InTypes |
Will return the hash of the input type map, if it is a valid type map. | |
| void | HandleTypeRemoval
(
TRigVMTypeIndex InTypeIndex |
Invalidates template permutations whenever a type such as a user defined struct is removed. | |
| bool | IsValid () |
Returns true if this is a valid template | |
| bool | IsValidArgumentForTemplate
(
const FRigVMTemplateArgument& InArgument |
Returns true if a given argument is valid for a template | |
| bool | Merge
(
const FRigVMTemplate& InOther |
Returns true if this template can merge another one | |
| int32 | NumArguments () |
Returns the number of args of this template | |
| int32 | NumExecuteArguments
(
const FRigVMDispatchContext& InContext |
Returns the number of args of this template | |
| int32 | Returns the number of permutations supported by this template | ||
| FRigVMTemplate_NewArgumentTypeDelegate & | Returns the delegate to be able to react to type changes dynamically. | ||
| void | |||
| bool | Returns true if the template was able to resolve to at least one permutation | ||
| bool | ResolveArgument
(
const FName& InArgumentName, |
Returns true if the template can resolve an argument to a new type | |
| void | Serialize. | ||
| bool | SupportsExecuteContextStruct
(
const UScriptStruct* InExecuteContextStruct |
Returns true if this template supports a given execute context struct | |
| void | UpdateTypesHashToPermutation
(
const int32& InPermutation |
||
| bool | UsesDispatch () |
Returns true if this template is backed by a dispatch factory. |