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

Implementation of MnaOpSchema::validate — checks a concrete MnaNode against its declared port and attribute contract. More...

#include "mna_op_schema.h"
#include "mna_node.h"
Include dependency graph for mna_op_schema.cpp:

Go to the source code of this file.

Detailed Description

Implementation of MnaOpSchema::validate — checks a concrete MnaNode against its declared port and attribute contract.

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 validator walks the schema's input and output port lists looking for matching named ports on the node, recording an error whenever a required port is missing or carries the wrong MnaDataKind. It then walks the attribute schema, checks that every required attribute is present and that its runtime QMetaType matches what the schema expects, and supplies defaults for optional attributes that the node has not overridden. All errors are appended to the caller-supplied list so a GUI editor can surface every problem at once instead of bailing on the first mismatch.

Definition in file mna_op_schema.cpp.