v2.0.0
Loading...
Searching...
No Matches
mna_graph.h File Reference

In-memory directed acyclic graph of MNALIB::MnaNode operations — connectivity, validation, topological sort and serialization. More...

#include "mna_global.h"
#include "mna_node.h"
#include "mna_port.h"
#include "mna_param_tree.h"
#include <QString>
#include <QStringList>
#include <QList>
#include <QJsonObject>
#include <QCborMap>
Include dependency graph for mna_graph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MNALIB::MnaGraph
 In-memory DAG of MnaNode operations with validation, topological sort and JSON/CBOR persistence. More...

Namespaces

namespace  MNALIB
 MNE Analysis Container Format (mna/mnx).

Detailed Description

In-memory directed acyclic graph of MNALIB::MnaNode operations — connectivity, validation, topological sort and serialization.

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

MNALIB::MnaGraph is the executable spine of an MNA project: a collection of MNALIB::MnaNode operations wired together through named MNALIB::MnaPort connections, surrounded by graph-level inputs and outputs that expose the pipeline to its host application, and parametrised by a shared MNALIB::MnaParamTree.

The class owns four responsibilities. (1) Composition: add / remove nodes, look them up by id, and connect output ports to input ports by name. (2) Validation: validate checks acyclicity, that every required input is connected, that MnaDataKind matches across each edge, and that every node conforms to its MNALIB::MnaOpSchema. (3) Scheduling: MNALIB::MnaGraph::topologicalSort "topologicalSort", MNALIB::MnaGraph::upstreamNodes "upstreamNodes", MNALIB::MnaGraph::downstreamNodes "downstreamNodes" and MNALIB::MnaGraph::dirtyNodes "dirtyNodes" feed the executor's incremental re-run logic. (4) Persistence: lossless JSON and CBOR round-trip mirroring the MNALIB::MnaIO codec choices.

Definition in file mna_graph.h.