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

Implementation of the MnaOpRegistry singleton, including the upward search for resources/mna/ and the drop-in registry merge logic. More...

#include "mna_op_registry.h"
#include "mna_registry_loader.h"
#include <QCoreApplication>
#include <QDir>
#include <QFile>
Include dependency graph for mna_op_registry.cpp:

Go to the source code of this file.

Detailed Description

Implementation of the MnaOpRegistry singleton, including the upward search for resources/mna/ and the drop-in registry merge logic.

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

The registry stores schemas and op functions in two QMap members keyed by op type. registerOp and registerOpFunc both replace any existing entry so plug-ins loaded later can shadow built-ins by design. loadRegistryFiles walks upward from QCoreApplication::applicationDirPath looking for a resources/mna/ directory, then delegates to MnaRegistryLoader::loadDirectory, which in turn reads the master mna-registry.json plus every drop-in under mna-registry.d/ in alphabetical order. missingOps walks a supplied tool list and returns those entries with no registered schema, which is the simplest way to detect a stale or partial install before a graph is executed.

Definition in file mna_op_registry.cpp.