v2.0.0
Loading...
Searching...
No Matches
mna_op_schema.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef MNA_OP_SCHEMA_H
36#define MNA_OP_SCHEMA_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "mna_global.h"
43#include "mna_types.h"
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QString>
50#include <QStringList>
51#include <QVariant>
52#include <QMetaType>
53#include <QList>
54
55//=============================================================================================================
56// FORWARD DECLARATIONS
57//=============================================================================================================
58
59namespace MNALIB { struct MnaNode; }
60
61//=============================================================================================================
62// DEFINE NAMESPACE MNALIB
63//=============================================================================================================
64
65namespace MNALIB
66{
67
68//=============================================================================================================
79
80//=============================================================================================================
85{
86 QString name;
87 QMetaType::Type type;
88 bool required = false;
89 QVariant defaultValue;
90 QString description;
91};
92
93//=============================================================================================================
100{
101public:
102 QString opType;
103 QString version;
104 QString binding;
105 QString category;
106 QString description;
107 QString library;
108 QString executable;
109 QString cliTemplate;
110
111 QList<MnaOpSchemaPort> inputPorts;
112 QList<MnaOpSchemaPort> outputPorts;
113 QList<MnaOpSchemaAttr> attributes;
114
122 bool validate(const MnaNode& node, QStringList* errors = nullptr) const;
123};
124
125} // namespace MNALIB
126
127#endif // MNA_OP_SCHEMA_H
mna library export/import macros.
#define MNASHARED_EXPORT
Definition mna_global.h:55
MNA type definitions.
MNE Analysis Container Format (mna/mnx).
MnaDataKind
Definition mna_types.h:90
Graph node representing a processing step.
Definition mna_node.h:75
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.