#include <MSE2Collector.h>
Sorting is needed, because the order may change if a vehicle has entered the lane by lane changing.
We need to have the lane, because the vehicle's position - used for the sorting - may be beyond the lane's end (the vehicle may be on a new lane) and we have to ask for the vehicle's position using this information.
Definition at line 295 of file MSE2Collector.h.
Public Member Functions | |
| by_vehicle_position_sorter (const by_vehicle_position_sorter &s) throw () | |
| copy constructor | |
| by_vehicle_position_sorter (const MSLane *const lane) throw () | |
| constructor | |
| int | operator() (const MSVehicle *v1, const MSVehicle *v2) throw () |
| Comparison funtcion. | |
Private Attributes | |
| const MSLane *const | myLane |
| The lane the detector is placed at. | |
| MSE2Collector::by_vehicle_position_sorter::by_vehicle_position_sorter | ( | const MSLane *const | lane | ) | throw () [inline] |
constructor
| [in] | lane | The lane the detector is placed at |
Definition at line 301 of file MSE2Collector.h.
00302 : myLane(lane) { }
| MSE2Collector::by_vehicle_position_sorter::by_vehicle_position_sorter | ( | const by_vehicle_position_sorter & | s | ) | throw () [inline] |
copy constructor
| [in] | s | The instance to copy |
Definition at line 309 of file MSE2Collector.h.
00310 : myLane(s.myLane) { }
| int MSE2Collector::by_vehicle_position_sorter::operator() | ( | const MSVehicle * | v1, | |
| const MSVehicle * | v2 | |||
| ) | throw () [inline] |
Comparison funtcion.
| [in] | v1 | First vehicle to compare |
| [in] | v2 | Second vehicle to compare |
Definition at line 319 of file MSE2Collector.h.
References myLane.
00319 { 00320 return v1->getPositionOnActiveMoveReminderLane(myLane)>v2->getPositionOnActiveMoveReminderLane(myLane); 00321 }
const MSLane* const MSE2Collector::by_vehicle_position_sorter::myLane [private] |
The lane the detector is placed at.
Definition at line 325 of file MSE2Collector.h.
Referenced by operator()().
1.5.6