-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuser.h
48 lines (37 loc) · 1022 Bytes
/
user.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
#ifndef USER_H
#define USER_H
#include <QMultiMap>
#include <QList>
/**
* @file user.h
*
* Implementation of User class.
* Contains information about glove properties and sensor-motor conformity.
*/
#include "degreeOfFreedom.h"
class User
{
public:
User() :
mDOFListSize(0),
mConformityListSize(0)
{}
void addDOF(const int &min, const int &max);
/// Adds new conformity of sensor and motor.
void addSensorMotorConformity(const int &sensor, const int &motor);
int DOFSize() const { return mDOFListSize; }
int conformitySize() const { return mConformityListSize; }
/**
* Returns QList of motors, that match sensor with sensurNumber number.
* Several motors can match one sensor, but not the other way.
*/
QList<int> motorList(int const& sensorNumber) const;
int sensorMax(int const& num) const;
int sensorMin(int const& num) const;
private:
QList<DegreeOfFreedom> mFreedomList;
QMultiMap<int, int> mSensorMotorConformityMap;
int mDOFListSize;
int mConformityListSize;
};
#endif // USER_H