-
Notifications
You must be signed in to change notification settings - Fork 0
/
matvar.h
61 lines (44 loc) · 1.82 KB
/
matvar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef MATVAR_H
#define MATVAR_H
#include <QVector>
#include <QString>
#include <QList>
#include "matio.h"
class MatVar;
typedef QList<MatVar> MatVars;
class MatVar
{
public:
MatVar();
MatVar(matvar_t* matvar);
virtual ~MatVar();
QString getName() const;
matio_types getDataType() const;
matio_classes getClassType() const;
bool isComplex() const;
bool isGlobal() const;
bool isLogical() const;
int getRank() const;
int getBytesSize() const;
const QVector<double> getDoubleArrayData() const;
double getDoubleScalarData();
private:
matvar_t* matvarData;
};
//typedef struct matvar_t {
// size_t nbytes; /**< Number of bytes for the MAT variable */
// int rank; /**< Rank (Number of dimensions) of the data */
// enum matio_types data_type; /**< Data type(MAT_T_*) */
// int data_size; /**< Bytes / element for the data */
// enum matio_classes class_type; /**< Class type in Matlab(MAT_C_DOUBLE, etc) */
// int isComplex; /**< non-zero if the data is complex, 0 if real */
// int isGlobal; /**< non-zero if the variable is global */
// int isLogical; /**< non-zero if the variable is logical */
// size_t *dims; /**< Array of lengths for each dimension */
// char *name; /**< Name of the variable */
// void *data; /**< Pointer to the data */
// int mem_conserve; /**< 1 if Memory was conserved with data */
// enum matio_compression compression; /**< Variable compression type */
// struct matvar_internal *internal; /**< matio internal data */
//} matvar_t;
#endif // MATVAR_H