-
Notifications
You must be signed in to change notification settings - Fork 0
/
entry.h
71 lines (58 loc) · 1.55 KB
/
entry.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
62
63
64
65
66
67
68
69
70
71
#ifndef ENTRY_H
#define ENTRY_H
#include <qlist.h>
#include <qhash.h>
#include <qstring.h>
#include <matchnumber.h>
class Entry
{
public:
struct Range {
int low;
int high;
};
Entry(const QHash<QString, int>& index, const QList<QString>& row);
QString submitter() const;
MatchNumber match() const;
int teamNumber() const;
bool attended() const;
bool autoBaseline() const;
bool autoGear() const;
/**
* @brief about how fast did they shoot balls during autonomous
* @return 0 if they didn't shoot, otherwise a number in units of balls/sec
*/
int autoHighGoalSpeed() const;
Range autoHighGoalAccuracy() const;
QString autoComments() const;
int teleopGears() const;
bool teleopLoadingStation() const;
bool teleopGroundGear() const;
int teleopHighGoalSpeed() const;
Range teleopHighGoalAccuracy() const;
Range climbTime() const;
QString foulsDescription() const;
QString teleopComments() const;
private:
static QString getColumn(const QString& name, const QHash<QString, int>& index, const QList<QString>& row);
static Range parseAccuracy(const QString& text);
static int parseSpeed(const QString& speed);
QString submitter_name;
MatchNumber match_number;
int team_number;
bool team_attended;
bool auto_baseline;
bool auto_gear;
int auto_high_goal_speed;
Range auto_high_goal_accuracy;
QString auto_comments;
int teleop_gears;
bool teleop_loading_station;
bool teleop_ground_gear;
int teleop_high_goal_speed;
Range teleop_high_goal_accuracy;
Range climb_time;
QString fouls_description;
QString teleop_comments;
};
#endif // ENTRY_H