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

JSON and CBOR codecs for MnaScript including code body, interpreter selection, integrity hash and optional source URI. More...

#include "mna_script.h"
#include <QJsonArray>
#include <QCborArray>
Include dependency graph for mna_script.cpp:

Go to the source code of this file.

Detailed Description

JSON and CBOR codecs for MnaScript including code body, interpreter selection, integrity hash and optional source URI.

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 implementation writes the script code verbatim (after resolving an optional sourceUri to the on-disk file at save time), records the SHA-256 in codeSha256, and serialises the interpreter command plus interpreterArgs in execution order. The keepTempFile debug flag and the language / interpreter pair round-trip symmetrically so a project can be re-executed bit-for-bit later. Unknown fields are captured into the standard extras pattern used across MNALIB structs.

Definition in file mna_script.cpp.