#include <ROHelper.h>

In the case two vehicles have the same departure time, they are sorted lexically.
Definition at line 48 of file ROHelper.h.
Public Member Functions | |
| bool | operator() (ROVehicle *veh1, ROVehicle *veh2) const throw () |
| Comparing operator. | |
| ROVehicleByDepartureComperator () throw () | |
| Constructor. | |
| ~ROVehicleByDepartureComperator () throw () | |
| Destructor. | |
| ROVehicleByDepartureComperator::ROVehicleByDepartureComperator | ( | ) | throw () [inline, explicit] |
| ROVehicleByDepartureComperator::~ROVehicleByDepartureComperator | ( | ) | throw () [inline] |
| bool ROVehicleByDepartureComperator::operator() | ( | ROVehicle * | veh1, | |
| ROVehicle * | veh2 | |||
| ) | const throw () [inline] |
Comparing operator.
Returns whether the first vehicles wants to leave later than the second. If both vehicles have the same departure time, a lexical comparison is done.
| i] | veh1 The first vehicle to compare | |
| i] | veh2 The second vehicle to compare |
Definition at line 67 of file ROHelper.h.
00067 { 00068 if (veh1->getDepartureTime()==veh2->getDepartureTime()) { 00069 return veh1->getID()>veh2->getID(); 00070 } 00071 return veh1->getDepartureTime()>veh2->getDepartureTime(); 00072 }
1.5.6