v2.0.0
Loading...
Searching...
No Matches
fiff_types.h
Go to the documentation of this file.
1//=============================================================================================================
33
34#ifndef FIFF_TYPES_H
35#define FIFF_TYPES_H
36
37//=============================================================================================================
38// INCLUDES
39//=============================================================================================================
40
41#include "fiff_constants.h"
42#include "fiff_time.h"
43#include "fiff_data_ref.h"
44
45//=============================================================================================================
46// EIGEN INCLUDES
47//=============================================================================================================
48
49#include <Eigen/Core>
50
51//=============================================================================================================
52// QT INCLUDES
53//=============================================================================================================
54
55#include <QList>
56#include <QStringList>
57#include <QPair>
58#include <QVariant>
59
60//=============================================================================================================
61// DEFINE NAMESPACE FIFFLIB
62//=============================================================================================================
63
64namespace FIFFLIB
65{
66
67const static QStringList defaultQStringList = QStringList();
68static Eigen::MatrixXd defaultMatrixXd = Eigen::MatrixXd::Constant(1,1,-1);
69const static Eigen::MatrixXd defaultConstMatrixXd(0,0);
70const static Eigen::MatrixXi defaultMatrixXi(0,0);
71const static Eigen::VectorXi defaultVectorXi;
72const static Eigen::RowVectorXi defaultRowVectorXi;
73const static QPair<float,float> defaultFloatPair = qMakePair(-1.0f, -1.0f);
74
75typedef Eigen::Matrix<qint16, Eigen::Dynamic, Eigen::Dynamic> MatrixDau16;
76typedef Eigen::Matrix<short, Eigen::Dynamic, Eigen::Dynamic> MatrixShort;
77
78//=============================================================================================================
79// TYPEDEFS Primitive building blocks:
80//=============================================================================================================
81
82typedef unsigned char fiff_byte_t;
83typedef char fiff_char_t;
84typedef qint16 fiff_short_t;
85typedef quint16 fiff_ushort_t;
86typedef qint32 fiff_int_t;
87typedef quint32 fiff_uint_t;
88typedef qint64 fiff_long_t;
89typedef quint64 fiff_ulong_t;
90typedef float fiff_float_t;
91typedef double fiff_double_t;
92typedef quint16 fiff_dau_pack13_t;
93typedef quint16 fiff_dau_pack14_t;
94typedef qint16 fiff_dau_pack16_t;
95typedef qint32 fiff_julian_t;
96typedef 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
97
98//=============================================================================================================
99// TYPEDEFS Structured types:
100// Note: The old C structs have been replaced by proper C++ classes.
101// - fiffTimeRec -> FiffTime (fiff_time.h) - typedefs removed; use FiffTime directly
102// - fiffDataRefRec -> FiffDataRef (fiff_data_ref.h) - backward compat typedefs provided
103// - fiffTagRec -> FiffTag (fiff_tag.h) - use FiffTag::storageSize() for on-disk header size
104// - fiffIdRec -> FiffId (fiff_id.h) - backward compat typedefs below
105// - fiffDirEntryRec -> FiffDirEntry (fiff_dir_entry.h)
106// - fiffDigPointRec -> FiffDigPoint (fiff_dig_point.h)
107// - fiffCoordTransRec -> FiffCoordTrans (fiff_coord_trans.h)
108// - fiffChPosRec -> FiffChPos (fiff_ch_pos.h)
109// - fiffSparseMatrixRec -> FiffSparseMatrix (fiff_sparse_matrix.h)
110// - fiffDigStringRec, fiff_event_bits, fiff_hpi_coil, fiff_hpi_subsys -> removed (unused)
111//=============================================================================================================
112
113//=============================================================================================================
114// BACKWARD COMPATIBILITY TYPEDEFS for FiffId (fiff_id.h provides the class)
115// The old fiffIdRec struct has been replaced by FiffId.
116// These typedefs are kept so that legacy C-compat code compiles without changes.
117//=============================================================================================================
118
119// Forward declare FiffId - actual class is in fiff_id.h
120class FiffId;
121
123typedef FiffId fiffIdRec;
125typedef FiffId fiff_id_t;
127typedef FiffId* fiffId;
128
129//=============================================================================================================
130// BACKWARD COMPATIBILITY TYPEDEFS for FiffDirEntry (fiff_dir_entry.h provides the class)
131//=============================================================================================================
132
133// Forward declare FiffDirEntry - actual class is in fiff_dir_entry.h
134class FiffDirEntry;
135
137typedef FiffDirEntry fiffDirEntryRec;
139typedef FiffDirEntry fiff_dir_entry_t;
141typedef FiffDirEntry* fiffDirEntry;
142
143//=============================================================================================================
144// BACKWARD COMPATIBILITY TYPEDEFS for FiffDigPoint (fiff_dig_point.h provides the class)
145//=============================================================================================================
146
147// Forward declare FiffDigPoint - actual class is in fiff_dig_point.h
148class FiffDigPoint;
149
151typedef FiffDigPoint fiffDigPointRec;
152
153#define FIFFM_CHPOS(x) &((x)->chpos)
154
155}//NAMESPACE
156
157#endif // FIFF_TYPES_H
Symbolic FIFF tag, block, value, unit and channel-type constants shared across FIFFLIB.
Compact seconds + microseconds time record used by FIFF measurement, event and HPI tags.
External-data reference record describing type, endianness, size and offset of an out-of-file FIFF pa...
FiffId fiffIdRec
Definition fiff_types.h:123
FiffId * fiffId
Backward-compatible pointer typedef for the old fiffId pointer.
Definition fiff_types.h:127
FiffId fiff_id_t
Backward-compatible typedef for the old fiff_id_t.
Definition fiff_types.h:125
FiffDirEntry fiff_dir_entry_t
Backward-compatible typedef for the old fiff_dir_entry_t.
Definition fiff_types.h:139
FiffDirEntry fiffDirEntryRec
Backward-compatible typedef for the old fiffDirEntryRec struct.
Definition fiff_types.h:137
FiffDirEntry * fiffDirEntry
Backward-compatible pointer typedef for the old fiffDirEntry pointer.
Definition fiff_types.h:141
FiffDigPoint fiffDigPointRec
Backward-compatible typedef for the old fiffDigPointRec struct.
Definition fiff_types.h:151
FIFF file I/O, in-memory data structures and high-level readers/writers.
128-bit FIFF identifier: hardware machine ID plus creation time, stamped on every file and block.
Definition fiff_id.h:66