-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
65 lines (58 loc) · 1.45 KB
/
Copy pathmain.cpp
File metadata and controls
65 lines (58 loc) · 1.45 KB
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
#include "main.h"
//full process
bool process(const int& type) {
switch (type)
{
case PlanType::StraightStopObsType:
{
unique_ptr<SceneBase> plan_obj = make_unique<StraightStopObs>();
return plan_obj->planning_process();
}
case PlanType::StraightStationType:
{
unique_ptr<SceneBase> plan_obj = make_unique<StraightStation>();
return plan_obj->planning_process();
}
case PlanType::StraightFollowType:
{
unique_ptr<SceneBase> plan_obj = make_unique<StraightFollow>();
return plan_obj->planning_process();
}
case PlanType::StraightCrosswalkType:
{
unique_ptr<SceneBase> plan_obj = make_unique<StraightCrosswalk>();
return plan_obj->planning_process();
}
case PlanType::ObsPassStaticType:
{
unique_ptr<SceneBase> plan_obj = make_unique<StaticObs>();
return plan_obj->planning_process();
}
case PlanType::ObsPassOvertakeType:
{
unique_ptr<SceneBase> plan_obj = make_unique<OvertakeObs>();
return plan_obj->planning_process();
}
case PlanType::ObsPassMeetingType:
{
unique_ptr<SceneBase> plan_obj = make_unique<MeetingObs>();
return plan_obj->planning_process();
}
default:
break;
}
cout << "plan type is not right" << endl;
return false;
}
int main() {
initgraph(SWIDTH, SHEIGHT, EW_SHOWCONSOLE);//window console
setbkcolor(WHITE);//setting the background color
cleardevice();
if (process(PlanType::ObsPassMeetingType))
{
cout << "complete" << endl;
}
system("pause");
closegraph(); //close window console
return 0;
}