v2.0.0
Loading...
Searching...
No Matches
mna_op_schema.h
Go to the documentation of this file.
1//=============================================================================================================
30
31#ifndef MNA_OP_SCHEMA_H
32#define MNA_OP_SCHEMA_H
33
34//=============================================================================================================
35// INCLUDES
36//=============================================================================================================
37
38#include "mna_global.h"
39#include "mna_types.h"
40
41//=============================================================================================================
42// QT INCLUDES
43//=============================================================================================================
44
45#include <QString>
46#include <QStringList>
47#include <QVariant>
48#include <QMetaType>
49#include <QList>
50
51//=============================================================================================================
52// FORWARD DECLARATIONS
53//=============================================================================================================
54
55namespace MNALIB
56{
57struct MnaNode;
58}
59
60//=============================================================================================================
61// DEFINE NAMESPACE MNALIB
62//=============================================================================================================
63
64namespace MNALIB
65{
66
67//=============================================================================================================
80
81//=============================================================================================================
88{
89 QString name;
90 QMetaType::Type type;
91 bool required = false;
92 QVariant defaultValue;
93 QString description;
94};
95
96//=============================================================================================================
105{
106public:
107 QString opType;
108 QString version;
109 QString binding;
110 QString category;
111 QString description;
112 QString library;
113 QString executable;
114 QString cliTemplate;
115
116 QList<MnaOpSchemaPort> inputPorts;
117 QList<MnaOpSchemaPort> outputPorts;
118 QList<MnaOpSchemaAttr> attributes;
119
127 bool validate(const MnaNode& node, QStringList* errors = nullptr) const;
128};
129
130} // namespace MNALIB
131
132#endif // MNA_OP_SCHEMA_H
Enums and string-conversion helpers for the MNA container vocabulary (file roles, data kinds,...
Export/import macros, build-info accessors, and MNALIB namespace anchor for the MNE Analysis Containe...
#define MNASHARED_EXPORT
Definition mna_global.h:47
MNE Analysis Container Format (mna/mnx).
MnaDataKind
Definition mna_types.h:93
Single executable step in an MNA pipeline graph, with attributes, typed ports, exec mode,...
Definition mna_node.h:77
QString name
Port name.
bool required
Must be connected?
QString description
Human-readable description.
MnaDataKind dataKind
Expected data kind.
QVariant defaultValue
Default when not set.
QMetaType::Type type
Expected value type.
QString description
Human-readable description.
QString name
Attribute key.
bool required
Must be set?
Operation schema for graph validation.
QList< MnaOpSchemaPort > outputPorts
Expected output ports.
QString binding
Binding type: "internal", "cli", or "script".
QList< MnaOpSchemaPort > inputPorts
Expected input ports.
QList< MnaOpSchemaAttr > attributes
Expected attributes.
QString category
Category: "io", "preprocessing", "source_estimation", etc.
bool validate(const MnaNode &node, QStringList *errors=nullptr) const
QString opType
Operation type string.
QString version
Version of the operation (e.g. "2.2.0").
QString executable
For CLI ops: executable name (e.g. "recon-all").
QString library
Which library provides the implementation.
QString description
What the operation does.
QString cliTemplate
For CLI ops: command template with {{placeholder}} tokens.