Reads MNA op-schema manifests and feeds them into MnaOpRegistry, with drop-in directory merge support. More...
#include <mna_registry_loader.h>
Static Public Member Functions | |
| static int | loadFile (const QString &path, MnaOpRegistry ®istry) |
| static int | loadDirectory (const QString ®istryDir, MnaOpRegistry ®istry) |
| static bool | saveFile (const QString &path, const QString &provider, const MnaOpRegistry ®istry) |
Reads MNA op-schema manifests and feeds them into MnaOpRegistry, with drop-in directory merge support.
Loads MNA operation schemas from declarative JSON registry manifests files.
Registry files follow the mna-registry.json format with "mna_registry_version", "provider", and "ops" array. The loader supports a master manifest plus drop-in files from a mna-registry.d/ directory.
Definition at line 69 of file mna_registry_loader.h.
|
static |
Load the master manifest plus all drop-in files from a directory.
Loads mna-registry.json first, then all *.json files from mna-registry.d/ in alphabetical order. Later files override earlier entries for the same op type.
| [in] | registryDir | Directory containing mna-registry.json. |
| [in,out] | registry | Registry to populate. |
Definition at line 256 of file mna_registry_loader.cpp.
|
static |
Load a single registry manifest file and register all ops.
| [in] | path | Path to the JSON manifest file. |
| [in,out] | registry | Registry to populate. |
Definition at line 211 of file mna_registry_loader.cpp.
|
static |
Serialize current registry schemas to a JSON manifest file.
| [in] | path | Output file path. |
| [in] | provider | Provider name for the manifest header. |
| [in] | registry | Registry to serialize. |
Definition at line 284 of file mna_registry_loader.cpp.