Handles code generation and simulation workflows using generator plugins.
More...
#include <generator.h>
|
| | Generator (Pipeline *pipeline, QObject *parent=nullptr) |
| | Constructs a Generator instance.
|
| VoidResult | generate (const QString &outputDir, maki::IPlugin *generator) |
| | Generates output artifacts using the specified generator plugin.
|
| VoidResult | simulate (const QString &outputDir, maki::IPlugin *generator) |
| | Runs a simulation using the specified generator plugin.
|
| Pipeline * | pipeline () const |
| | Returns the pipeline used for generation workflows.
|
| void | setup () |
| | Performs initialization and setup of the generator.
|
|
|
QWidget * | progressContent () |
| | Returns a header string for notifications.
|
|
|
Pipeline * | mPipeline = nullptr |
| | Pipeline responsible for executing generation and simulation processes.
|
|
QString | mGenerationFolder |
| | Directory where generated artifacts are stored.
|
|
Pipeline::Info | mInfo |
| | Holds information regarding the current generation pipeline.
|
|
QString | mProgressId |
| | Holds the id of the progress widget.
|
Handles code generation and simulation workflows using generator plugins.
The Generator class coordinates the execution of generator plugins through a Pipeline. It is responsible for invoking generation or simulation procedures and emitting signals when these workflows start and finish.
Generator plugins provide the actual implementation for producing artifacts or launching simulations based on the current model state.
◆ Generator()
| Generator::Generator |
( |
Pipeline * | pipeline, |
|
|
QObject * | parent = nullptr ) |
Constructs a Generator instance.
- Parameters
-
| pipeline | Pipeline used to execute generation-related processes. |
| parent | Optional Qt parent object. |
◆ generate()
| VoidResult Generator::generate |
( |
const QString & | outputDir, |
|
|
maki::IPlugin * | generator ) |
Generates output artifacts using the specified generator plugin.
The generator plugin is responsible for producing code or other output files in the provided output directory. The process is executed through the configured pipeline.
- Parameters
-
| outputDir | Directory where generated artifacts will be written. |
| generator | Generator plugin responsible for producing the output. |
- Returns
- VoidResult indicating whether generation was successfully initiated.
◆ generationEnded
| void Generator::generationEnded |
( |
const QString & | outputFolder | ) |
|
|
signal |
Emitted when generation has completed.
- Parameters
-
| outputFolder | Directory where the generated artifacts were written. |
◆ generationStarted
| void Generator::generationStarted |
( |
Pipeline * | pipeline | ) |
|
|
signal |
Emitted when the generation pipeline starts.
Observers may use this signal to display progress indicators or track generation activity.
- Parameters
-
| pipeline | Pipeline responsible for executing the generation steps. |
◆ pipeline()
| Pipeline * Generator::pipeline |
( |
| ) |
const |
Returns the pipeline used for generation workflows.
- Returns
- Pointer to the associated Pipeline instance.
◆ setup()
| void Generator::setup |
( |
| ) |
|
Performs initialization and setup of the generator.
This may include configuring the pipeline, preparing generation directories, or registering required callbacks.
◆ simulate()
| VoidResult Generator::simulate |
( |
const QString & | outputDir, |
|
|
maki::IPlugin * | generator ) |
Runs a simulation using the specified generator plugin.
Similar to the generation workflow, but intended for launching simulation environments or related runtime artifacts produced by the generator plugin.
- Parameters
-
| outputDir | Directory containing the generated artifacts required for simulation. |
| generator | Generator plugin responsible for preparing the simulation. |
- Returns
- VoidResult indicating whether simulation was successfully initiated.
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/compiler/generator.h
- /__w/maki/maki/app/compiler/generator.cpp