-
Notifications
You must be signed in to change notification settings - Fork 0
/
TrainObjects.js
51 lines (44 loc) · 919 Bytes
/
TrainObjects.js
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
const IN_OUT = {
IN: 1,
OUT: 2
}
const WEEK_TAG = {
WEEKDAY: 1,
SATURDAY: 2,
SUNDAY: 3
}
function Course(){
this.lineNum = 0;
this.in_out = 0
this.week_tag = 0;
this.originStation = "";
this.destStation = "";
this.stationVisits = [];
this.earliestTime = null;
this.latestTime = null;
}
function StationVisit(){
this.stationCode = "";
this.leftTime = null;
this.arriveTime = null;
}
function Station(){
this.stationCode = "";
this.stationName = "";
this.stationNameEng = "";
this.connectedStations = [];
this.xCoord = 0.0;
this.yCoord = 0.0;
this.line = -1;
}
function Train(){
this.UUID = 0;
this.number = "";
this.courses = [];
}
function Branch(){
this.stations = [];
this.parentBranch = null;
this.children = [];
}
export {IN_OUT, WEEK_TAG, Course, StationVisit, Train, Station, Branch};