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

Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system. More...

#include "fiff_constants.h"
#include "fiff_time.h"
#include "fiff_data_ref.h"
#include <Eigen/Core>
#include <QList>
#include <QStringList>
#include <QPair>
#include <QVariant>
Include dependency graph for fiff_types.h:

Go to the source code of this file.

Macros

#define FIFFM_CHPOS(x)

Typedefs

typedef FiffId fiffIdRec
typedef FiffId fiff_id_t
 Backward-compatible typedef for the old fiff_id_t.
typedef FiffId * fiffId
 Backward-compatible pointer typedef for the old fiffId pointer.
typedef FiffDirEntry fiffDirEntryRec
 Backward-compatible typedef for the old fiffDirEntryRec struct.
typedef FiffDirEntry fiff_dir_entry_t
 Backward-compatible typedef for the old fiff_dir_entry_t.
typedef FiffDirEntry * fiffDirEntry
 Backward-compatible pointer typedef for the old fiffDirEntry pointer.
typedef FiffDigPoint fiffDigPointRec
 Backward-compatible typedef for the old fiffDigPointRec struct.

Detailed Description

Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2012-2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org; Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Juan GPC jgarc.nosp@m.iapr.nosp@m.ieto@.nosp@m.mgh..nosp@m.harva.nosp@m.rd.e.nosp@m.du; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om
Since
0.1.0
Date
August 2012

Defines the fixed-width FIFFLIB primitives (fiff_int_t, fiff_float_t, fiff_byte_t, fiff_double_t, the DAU packed half-precision integer aliases, the Julian-day type, etc.) so that on-disk records preserve the exact byte layout documented by the FIFF specification regardless of host platform. It also publishes a handful of Eigen typedefs (MatrixDau16, MatrixShort) used by the matrix tag readers in FiffStream and a small set of empty-default sentinel objects (defaultMatrixXd, defaultQStringList, ...) that let callers express ``no value provided'' on optional arguments without relying on std::optional, matching the historical MATLAB-style signatures inherited from the MNE matlab toolbox.

Note: the leftover Old fiff_type declarations - replace them'' heading on the previous header line reflects an in-progress cleanup toward strongly typed C++ replacements; new code should prefer the class wrappers (@ref FiffId, @ref FiffChInfo, ...) over the legacy Rec'' struct aliases re-exported for backwards compatibility. */


INCLUDES


EIGEN INCLUDES


QT INCLUDES


DEFINE NAMESPACE FIFFLIB

namespace FIFFLIB {

const static QStringList defaultQStringList = QStringList(); static Eigen::MatrixXd defaultMatrixXd = Eigen::MatrixXd::Constant(1,1,-1); const static Eigen::MatrixXd defaultConstMatrixXd(0,0); const static Eigen::MatrixXi defaultMatrixXi(0,0); const static Eigen::VectorXi defaultVectorXi; const static Eigen::RowVectorXi defaultRowVectorXi; const static QPair<float,float> defaultFloatPair = qMakePair(-1.0f, -1.0f);

typedef Eigen::Matrix<qint16, Eigen::Dynamic, Eigen::Dynamic> MatrixDau16; typedef Eigen::Matrix<short, Eigen::Dynamic, Eigen::Dynamic> MatrixShort;


TYPEDEFS Primitive building blocks:

typedef unsigned char fiff_byte_t; typedef char fiff_char_t; typedef qint16 fiff_short_t; typedef quint16 fiff_ushort_t; typedef qint32 fiff_int_t; typedef quint32 fiff_uint_t; typedef qint64 fiff_long_t; typedef quint64 fiff_ulong_t; typedef float fiff_float_t; typedef double fiff_double_t; typedef quint16 fiff_dau_pack13_t; typedef quint16 fiff_dau_pack14_t; typedef qint16 fiff_dau_pack16_t; typedef qint32 fiff_julian_t; typedef char fiff_data_t; //unsig char instead of void -> avoid void in C++ cause of its undefined behaviour using delete -> this can happen during lots of casting


TYPEDEFS Structured types: Note: The old C structs have been replaced by proper C++ classes.

- fiffDigStringRec, fiff_event_bits, fiff_hpi_coil, fiff_hpi_subsys -> removed (unused)


BACKWARD COMPATIBILITY TYPEDEFS for FiffId (fiff_id.h provides the class) The old fiffIdRec struct has been replaced by FiffId.

These typedefs are kept so that legacy C-compat code compiles without changes.

Forward declare FiffId - actual class is in fiff_id.h class FiffId;

/** Backward-compatible typedef for the old fiffIdRec struct.

Definition in file fiff_types.h.

Macro Definition Documentation

◆ FIFFM_CHPOS

#define FIFFM_CHPOS ( x)
Value:
&((x)->chpos)

Definition at line 153 of file fiff_types.h.

Typedef Documentation

◆ fiff_dir_entry_t

typedef FiffDirEntry fiff_dir_entry_t

Backward-compatible typedef for the old fiff_dir_entry_t.

Definition at line 139 of file fiff_types.h.

◆ fiff_id_t

typedef FiffId fiff_id_t

Backward-compatible typedef for the old fiff_id_t.

Definition at line 125 of file fiff_types.h.

◆ fiffDigPointRec

typedef FiffDigPoint fiffDigPointRec

Backward-compatible typedef for the old fiffDigPointRec struct.

Definition at line 151 of file fiff_types.h.

◆ fiffDirEntry

typedef FiffDirEntry* fiffDirEntry

Backward-compatible pointer typedef for the old fiffDirEntry pointer.

Definition at line 141 of file fiff_types.h.

◆ fiffDirEntryRec

typedef FiffDirEntry fiffDirEntryRec

Backward-compatible typedef for the old fiffDirEntryRec struct.

Definition at line 137 of file fiff_types.h.

◆ fiffId

typedef FiffId* fiffId

Backward-compatible pointer typedef for the old fiffId pointer.

Definition at line 127 of file fiff_types.h.

◆ fiffIdRec

typedef FiffId fiffIdRec

Definition at line 123 of file fiff_types.h.