-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmeasurement.h
43 lines (35 loc) · 1.11 KB
/
measurement.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
#ifndef MEASUREMENT_H
#define MEASUREMENT_H
#include <QPair>
#include <QList>
#include <QMetaType>
struct Measurement
{
Measurement(bool base, bool bit, bool valid = 1) : base(base), bit(bit), valid(valid) {}
explicit Measurement() : base(0), bit(0), valid(1) {}
Measurement &operator=(const Measurement &other)
{base = other.base; bit = other.bit; valid = other.valid; return *this;}
Measurement(const Measurement &other) {base = other.base; bit = other.bit; valid = other.valid;}
bool base;
bool bit;
bool valid;
};
/*
inline QDataStream& operator>>(QDataStream& stream, Measurement& measurement)
{
stream >> measurement.base >> measurement.bit >> measurement.valid;
return stream;
}
inline QDataStream& operator<<(QDataStream& stream, const Measurement& measurement)
{
stream << measurement.base << measurement.bit << measurement.valid;
return stream;
}
*/
typedef QList<Measurement*> Measurements;
Q_DECLARE_METATYPE(Measurements)
/*
static int id3 = qRegisterMetaType<Measurements>();
static int id4 = qRegisterMetaTypeStreamOperators<Measurements>();
*/
#endif // MEASUREMENT_H