-
Notifications
You must be signed in to change notification settings - Fork 4
Add Station Class
#226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Station Class
#226
Conversation
|
|
||
| namespace dsm { | ||
| Station::Station(Id id, Delay managementTime) | ||
| : Node(id), m_managementTime{managementTime} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| : Node(id), m_managementTime{managementTime} {} | ||
|
|
||
| Station::Station(Id id, std::pair<double, double> coords, Delay managementTime) | ||
| : Node(id, coords), m_managementTime{managementTime} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| : Node(id, coords), m_managementTime{managementTime} {} | ||
|
|
||
| Station::Station(Station const& other) | ||
| : Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {} |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| : Node(other), m_managementTime{other.m_managementTime}, m_trains{other.m_trains} {} | ||
|
|
||
| void Station::enqueue(Id trainId, train_t trainType) { | ||
| m_trains.emplace(trainType, trainId); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 17.7 rule Note
| } | ||
| } | ||
| WHEN("The Station is created using an Id and coordinates") { | ||
| Station station{id, std::make_pair(lat, lon), managementTime}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
| } | ||
| } | ||
| WHEN("The Station is created using a copy constructor") { | ||
| Station base{id, std::make_pair(lat, lon), managementTime}; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note test
TrainStationclass #183