Graph executor for MNA pipelines. More...
#include <mna_graph_executor.h>
Classes | |
| struct | Context |
| struct | StreamContext |
Public Types | |
| using | ProgressCallback |
| Progress callback type. | |
| using | PluginFactory = std::function<QObject*(const QString& opType)> |
Static Public Member Functions | |
| static Context | execute (MnaGraph &graph, const QVariantMap &graphInputs) |
| static Context | executeIncremental (MnaGraph &graph, Context &existing) |
| static QVariantMap | executeNode (const MnaNode &node, const QVariantMap &inputs) |
| static void | setProgressCallback (ProgressCallback cb) |
| static StreamContext | startStream (MnaGraph &graph, PluginFactory factory) |
| static void | stopStream (StreamContext &ctx) |
Graph executor for MNA pipelines.
Executes a computational graph by traversing nodes in topological order and invoking registered operation functions.
Definition at line 79 of file mna_graph_executor.h.
| using MNALIB::MnaGraphExecutor::PluginFactory = std::function<QObject*(const QString& opType)> |
Factory callback: given a node's opType, create the corresponding live plugin. Returns nullptr if the opType is unknown. The host app provides this callback.
Definition at line 150 of file mna_graph_executor.h.
Progress callback type.
Definition at line 136 of file mna_graph_executor.h.
|
static |
Execute the full graph (all nodes in topological order).
| graph | The graph to execute. |
| graphInputs | Named inputs fed into graph-level input ports. |
Definition at line 65 of file mna_graph_executor.cpp.
|
static |
Execute only dirty nodes and their downstream dependents.
| graph | The graph to execute. |
| existing | Existing context with prior results. |
Definition at line 135 of file mna_graph_executor.cpp.
|
static |
Execute a single node (for testing/debugging).
| node | The node to execute. |
| inputs | Input data keyed by port name. |
Definition at line 194 of file mna_graph_executor.cpp.
|
static |
Set a progress callback invoked for each node execution.
Definition at line 328 of file mna_graph_executor.cpp.
|
static |
Start stream-mode execution of a graph.
factory to instantiate a live pluginThe mna library does NOT depend on MNE Scan — the host app provides the factory and is responsible for wiring Qt signal/slot connections between the returned QObject* instances.
| [in,out] | graph | The pipeline graph. |
| [in] | factory | Callback that maps opType → live QObject* plugin. |
Definition at line 337 of file mna_graph_executor.cpp.
|
static |
Stop a running stream. Iterates nodes in reverse topological order and deletes the live plugin objects.
| [in,out] | ctx | The stream context to stop. |
Definition at line 395 of file mna_graph_executor.cpp.