v2.0.0
Loading...
Searching...
No Matches
MNALIB::MnaScript Struct Reference

Inline code for script-type graph nodes. More...

#include <mna_script.h>

Public Member Functions

QJsonObject toJson () const
QCborMap toCbor () const

Static Public Member Functions

static MnaScript fromJson (const QJsonObject &json)
static MnaScript fromCbor (const QCborMap &cbor)

Public Attributes

QString language
 "python", "shell", "r", "matlab", "octave", "julia"
QString interpreter
QStringList interpreterArgs
 Extra args before the script file (e.g. ["-u"] for unbuffered Python).
QString code
 The inline source code (resolved at save-time if sourceUri is set).
QString sourceUri
QString codeSha256
 SHA-256 of code for integrity verification.
bool keepTempFile = false
 true → preserve temp script file after execution (debug aid)

Detailed Description

Inline code for script-type graph nodes.

Inline script definition embedded in an MnaNode. When the node's execMode is Script, the executor writes the code to a temporary file, invokes the interpreter, and captures the results.

Definition at line 68 of file mna_script.h.

Member Function Documentation

◆ fromCbor()

MnaScript MnaScript::fromCbor ( const QCborMap & cbor)
static

Definition at line 146 of file mna_script.cpp.

◆ fromJson()

MnaScript MnaScript::fromJson ( const QJsonObject & json)
static

Definition at line 90 of file mna_script.cpp.

◆ toCbor()

QCborMap MnaScript::toCbor ( ) const

Definition at line 110 of file mna_script.cpp.

◆ toJson()

QJsonObject MnaScript::toJson ( ) const

Definition at line 54 of file mna_script.cpp.

Member Data Documentation

◆ code

QString MNALIB::MnaScript::code

The inline source code (resolved at save-time if sourceUri is set).

Definition at line 74 of file mna_script.h.

◆ codeSha256

QString MNALIB::MnaScript::codeSha256

SHA-256 of code for integrity verification.

Definition at line 77 of file mna_script.h.

◆ interpreter

QString MNALIB::MnaScript::interpreter

Interpreter command (e.g. "python3", "/bin/bash", "Rscript") Empty → auto-detect from language

Definition at line 71 of file mna_script.h.

◆ interpreterArgs

QStringList MNALIB::MnaScript::interpreterArgs

Extra args before the script file (e.g. ["-u"] for unbuffered Python).

Definition at line 73 of file mna_script.h.

◆ keepTempFile

bool MNALIB::MnaScript::keepTempFile = false

true → preserve temp script file after execution (debug aid)

Definition at line 78 of file mna_script.h.

◆ language

QString MNALIB::MnaScript::language

"python", "shell", "r", "matlab", "octave", "julia"

Definition at line 70 of file mna_script.h.

◆ sourceUri

QString MNALIB::MnaScript::sourceUri

Optional authoring-time reference (e.g. "file:///lab/scripts/bandpass.py") Tooling resolves this into code at serialization; consumers use code.

Definition at line 75 of file mna_script.h.


The documentation for this struct was generated from the following files: