v2.0.0
Loading...
Searching...
No Matches
mna_types.h File Reference

Enums and string-conversion helpers for the MNA container vocabulary (file roles, data kinds, port directions, exec modes). More...

#include <QString>
Include dependency graph for mna_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  MNALIB
 MNE Analysis Container Format (mna/mnx).

Enumerations

enum class  MNALIB::MnaFileRole {
  MNALIB::Raw , MNALIB::Forward , MNALIB::Inverse , MNALIB::Covariance ,
  MNALIB::SourceEstimate , MNALIB::Bem , MNALIB::Surface , MNALIB::Annotation ,
  MNALIB::Digitizer , MNALIB::Transform , MNALIB::SourceSpace , MNALIB::Evoked ,
  MNALIB::Event , MNALIB::VirtualChannel , MNALIB::Custom
}
enum class  MNALIB::MnaContainerFormat { MNALIB::Json , MNALIB::Cbor }
enum class  MNALIB::MnaDataKind {
  MNALIB::FiffRaw , MNALIB::Forward , MNALIB::Inverse , MNALIB::Covariance ,
  MNALIB::SourceEstimate , MNALIB::Epochs , MNALIB::Evoked , MNALIB::Matrix ,
  MNALIB::Volume , MNALIB::Surface , MNALIB::Bem , MNALIB::Annotation ,
  MNALIB::Label , MNALIB::RealTimeStream , MNALIB::Custom
}
enum class  MNALIB::MnaPortDir { MNALIB::Input , MNALIB::Output }
enum class  MNALIB::MnaNodeExecMode { MNALIB::Batch , MNALIB::Stream , MNALIB::Ipc , MNALIB::Script }

Functions

QString MNALIB::mnaFileRoleToString (MnaFileRole role)
MnaFileRole MNALIB::mnaFileRoleFromString (const QString &str)
QString MNALIB::mnaDataKindToString (MnaDataKind kind)
MnaDataKind MNALIB::mnaDataKindFromString (const QString &str)

Detailed Description

Enums and string-conversion helpers for the MNA container vocabulary (file roles, data kinds, port directions, exec modes).

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

Every MNA file, port and node is tagged with a small set of controlled vocabularies that downstream tooling — schema validators, graph executors, GUI editors — uses to dispatch on without parsing strings ad-hoc. Centralising them in one header guarantees that the JSON/CBOR serialisers, the op-registry loader and the executor all agree on the canonical spelling.

MnaFileRole classifies the semantic purpose of a file within a project (Raw, Forward, Inverse, Covariance, …) so a viewer can pick the right reader without sniffing magic bytes. MnaDataKind describes the runtime payload travelling through a graph port (FiffRaw, Epochs, SourceEstimate, RealTimeStream, …) and is what MnaGraph::validate uses to reject incompatible connections. MnaPortDir and MnaNodeExecMode (Batch/Stream/Ipc/Script) complete the surface needed by the graph executor.

The inline xxxToString / xxxFromString helpers are the single source of truth for serialisation; both spellings (CamelCase from the C++ side and snake_case from the JSON side) are accepted on read to keep the format human-authorable.

Definition in file mna_types.h.