-
Notifications
You must be signed in to change notification settings - Fork 0
/
public_train.h
61 lines (47 loc) · 1.43 KB
/
public_train.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
/*
* CTrain.h
*
* Created on: Nov 25, 2015
* Author: jose
*/
#ifndef CTRAIN_H_
#define CTRAIN_H_
#include "train.h"
#include "station.h"
#include "track.h"
class CPublicTrainGenerator;
class CPublicTrain : public CTrain
{
public:
/**
* \brief Constructor
* \param generator Train generator containing train settings (schedule, exceptions..)
*/
CPublicTrain(CPublicTrainGenerator& generator,
unsigned scheduledStartTime,
unsigned scheduledTargetStationArrival,
unsigned scheduledMainStationArrival = 0,
unsigned scheduledMainStationDeparture = 0,
std::string waitForTrain = "");
virtual ~CPublicTrain();
void Behavior();
unsigned GetRealMainStationdeparture() const;
const std::string& GetWaitForTrainName() const;
static unsigned GetBoardingTime();
private:
/// time to wait for passengers to get on the train [minutes]
static const unsigned BOARDING_TIME;
// name of the train, this train is waiting for
std::string m_WaitingForTrain;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
inline const std::string& CPublicTrain::GetWaitForTrainName() const
{
return m_WaitingForTrain;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
inline unsigned CPublicTrain::GetBoardingTime()
{
return BOARDING_TIME;
}
#endif /* CTRAIN_H_ */