v2.0.0
Loading...
Searching...
No Matches
mna_graph_executor.cpp File Reference

Implementation of MnaGraphExecutor — batch / incremental graph walk plus MNE-Scan-friendly stream-mode plugin wiring. More...

#include "mna_graph_executor.h"
#include "mna_graph.h"
#include "mna_op_registry.h"
#include <QDir>
#include <QTemporaryFile>
#include <QProcess>
Include dependency graph for mna_graph_executor.cpp:

Go to the source code of this file.

Detailed Description

Implementation of MnaGraphExecutor — batch / incremental graph walk plus MNE-Scan-friendly stream-mode plugin wiring.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.0
Date
April 2026

MnaGraphExecutor::execute first validates the graph, then runs MnaGraph::topologicalSort and visits every node in order. For each node it gathers inputs from the Context::results map keyed by srcNodeId::srcPortName, falls back to Context::graphInputs for graph-level entry ports, looks the opType up in MnaOpRegistry, invokes the registered MnaOpRegistry::OpFunc with the merged inputs and node attributes, and writes the returned outputs back into the context map. executeIncremental reuses the same loop but restricts it to nodes returned by MnaGraph::dirtyNodes and their MnaGraph::downstreamNodes.

startStream / stopStream provide the MNE Scan integration point: the host application supplies a PluginFactory that maps opType strings to live QObject plugin instances; the executor instantiates one per node in topological order, applies MnaParamTree values to their attributes, and stores the resulting StreamContext so the host can wire signal/slot connections by the matching MnaDataKind on each port and tear down the pipeline in reverse order on stop.

Definition in file mna_graph_executor.cpp.