My Project
|
The main class to define route. More...
#include <route.h>
Public Member Functions | |
Route (std::string name, Stop **stops, double *distances, int num_stops, PassengerGenerator *) | |
Constructs a route. More... | |
Route * | Clone () |
Copy a route. | |
void | Update () |
void | Report (std::ostream &) |
bool | IsAtEnd () const |
Decide if a route is finished. | |
void | NextStop () |
Change destination_stop_ to next stop. | |
Stop * | GetDestinationStop () const |
Get pointer to next stop. More... | |
double | GetNextStopDistance () |
Get distance to next stop. More... | |
Stop * | GetNextStop () |
Get pointer to next stop. More... | |
Stop * | GetPreviousStop () |
Get pointer to previous stop. More... | |
std::string | GetName () |
Get name of the route. More... | |
std::list< Stop * > | GetStops () |
list of stops More... | |
void | UpdateRouteData () |
Update route data. | |
RouteData | GetRouteData () |
Getter of route data. | |
The main class to define route.
Route::Route | ( | std::string | name, |
Stop ** | stops, | ||
double * | distances, | ||
int | num_stops, | ||
PassengerGenerator * | pg | ||
) |
Constructs a route.
[in] | string | holding a name of a created route. |
[in] | Stop | ** holding the stops the route involves. |
[in] | double | * holding distances between the stops. |
[in] | int | holding the number of stops |
Stop * Route::GetDestinationStop | ( | ) | const |
Get pointer to next stop.
std::string Route::GetName | ( | ) |
Get name of the route.
Stop * Route::GetNextStop | ( | ) |
Get pointer to next stop.
double Route::GetNextStopDistance | ( | ) |
Get distance to next stop.
Stop * Route::GetPreviousStop | ( | ) |
Get pointer to previous stop.
std::list< Stop * > Route::GetStops | ( | ) |
list of stops