Navigation
API > API/Plugins > API/Plugins/RigVMDeveloper
Discovers and manages code generation templates for a target language.
FRigVMCodeGenerator is responsible for:
- Discovering template files from the Content/CodeGeneration/{Language}/ directory
- Providing access to templates by name
- Orchestrating code generation by combining a converter with templates
Usage: //CreategeneratorforC++FRigVMCodeGeneratorGenerator(ERigVMCodeLanguage::CPlusPlus);//CreateconverterfromaRigVMassetautoConverter=MakeShared
| Name | FRigVMCodeGenerator |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/RigVM/Source/RigVMDeveloper/Public/RigVMCompiler/RigVMCodeGenerator.h |
| Include Path | #include "RigVMCompiler/RigVMCodeGenerator.h" |
Syntax
struct FRigVMCodeGenerator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRigVMCodeGenerator
(
ERigVMCodeLanguage::Type InLanguage |
Constructs a generator and discovers all templates for the specified language. | RigVMCompiler/RigVMCodeGenerator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CodeTemplates | TArray< TSharedPtr< FRigVMCodeTemplate > > | All discovered templates for the target language. | RigVMCompiler/RigVMCodeGenerator.h | |
| Language | ERigVMCodeLanguage::Type | The target language for this generator. | RigVMCompiler/RigVMCodeGenerator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedPtr< FRigVMCodeOutput > Generate
(
const TSharedPtr< FRigVMCodeConverter >& InConverter, |
Generates output from a single template. | RigVMCompiler/RigVMCodeGenerator.h | |
TArray< TSharedPtr< FRigVMCodeOutput > > GenerateAll
(
const TSharedPtr< FRigVMCodeConverter >& InConverter |
Generates output from all discovered templates. | RigVMCompiler/RigVMCodeGenerator.h | |
const TSharedPtr< FRigVMCodeTemplate > & GetTemplate
(
const FString& InName |
Retrieves a template by name. | RigVMCompiler/RigVMCodeGenerator.h | |
int32 NumTemplates() |
Returns the number of discovered templates. | RigVMCompiler/RigVMCodeGenerator.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedPtr< FRigVMCodeOutput > Generate
(
const TSharedPtr< FRigVMCodeConverter >& InConverter, |
Generates output from a template (static version). | RigVMCompiler/RigVMCodeGenerator.h |
See Also
-
FRigVMCodeConverter for bytecode parsing and JSON generation
-
FRigVMCodeTemplate for template file representation