-
Notifications
You must be signed in to change notification settings - Fork 12
/
Variables.cpp
80 lines (74 loc) · 1.68 KB
/
Variables.cpp
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
72
73
74
75
76
77
78
79
80
#include "Variables.h"
CourseData::CourseData()
{
//ctor
}
CourseData::~CourseData()
{
//dtor
}
void CourseData::Add(wxDouble PosX,
wxDouble PosY,
wxDouble Angle,
short Wait,
short Crossing,
short Reverse,
wxDouble Speed,
// For Courseplay 3.4+
wxString Turn,
short TurnStart,
short TurnEnd,
short Ridgemarker,
wxString Generated
)
{
posX.Add(PosX);
posY.Add(PosY);
angle.Add(Angle);
wait.Add(Wait);
crossing.Add(Crossing);
rev.Add(Reverse);
speed.Add(Speed);
// For Courseplay 3.4+
turn.Add(Turn);
turnStart.Add(TurnStart);
turnEnd.Add(TurnEnd);
ridgemarker.Add(Ridgemarker);
generated.Add(Generated);
}
void CourseData::Alloc(size_t nCount)
{
posX.Alloc(nCount);
posY.Alloc(nCount);
angle.Alloc(nCount);
wait.Alloc(nCount);
crossing.Alloc(nCount);
rev.Alloc(nCount);
speed.Alloc(nCount);
// For Courseplay 3.4+
turn.Alloc(nCount);
turnStart.Alloc(nCount);
turnEnd.Alloc(nCount);
ridgemarker.Alloc(nCount);
generated.Alloc(nCount);
}
void CourseData::Clear()
{
posX.Clear();
posY.Clear();
angle.Clear();
wait.Clear();
crossing.Clear();
rev.Clear();
speed.Clear();
// For Courseplay 3.4+
turn.Clear();
turnStart.Clear();
turnEnd.Clear();
ridgemarker.Clear();
generated.Clear();
}
size_t CourseData::Count()
{
return posX.Count();
}