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

Implementation of the hierarchical parameter store: path-keyed value access, binding management, formula evaluation and JSON round-trip. More...

#include "mna_param_tree.h"
#include <QJsonArray>
#include <QRegularExpression>
#include <cmath>
Include dependency graph for mna_param_tree.cpp:

Go to the source code of this file.

Detailed Description

Implementation of the hierarchical parameter store: path-keyed value access, binding management, formula evaluation and JSON round-trip.

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 keeps two parallel QMap members — one mapping path strings to literal QVariant values, the other mapping target paths to their MnaParamBinding definitions. MnaParamTree::evaluate iterates over registered bindings, fires those whose trigger condition is met for the supplied execution-context results map, calls MnaParamTree::evaluateExpression to compute the new value via the embedded expression evaluator (with ref("…") look-ups resolved against both the param store and the execution results), writes the result back into m_params and returns the list of paths whose values actually changed so the executor can mark downstream nodes dirty.

Definition in file mna_param_tree.cpp.