Declarative MNA registry file loader. 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) |
Declarative MNA registry file loader.
Loads MNA operation schemas from declarative JSON registry manifest 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 73 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 262 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 217 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 290 of file mna_registry_loader.cpp.