SUMO - Simulation of Urban MObility
|
A class used to sort known vehicles by their position. More...
#include <MSE2Collector.h>
Public Member Functions | |
by_vehicle_position_sorter (const MSLane *const lane) | |
constructor More... | |
by_vehicle_position_sorter (const by_vehicle_position_sorter &s) | |
copy constructor More... | |
int | operator() (const SUMOVehicle *v1, const SUMOVehicle *v2) |
Comparison funtcion. More... | |
Private Member Functions | |
by_vehicle_position_sorter & | operator= (const by_vehicle_position_sorter &) |
Private Attributes | |
const MSLane *const | myLane |
The lane the detector is placed at. More... | |
A class used to sort known vehicles by their position.
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 288 of file MSE2Collector.h.
|
inline |
constructor
[in] | lane | The lane the detector is placed at |
Definition at line 294 of file MSE2Collector.h.
|
inline |
copy constructor
[in] | s | The instance to copy |
Definition at line 302 of file MSE2Collector.h.
int MSE2Collector::by_vehicle_position_sorter::operator() | ( | const SUMOVehicle * | v1, |
const SUMOVehicle * | v2 | ||
) |
Comparison funtcion.
[in] | v1 | First vehicle to compare |
[in] | v2 | Second vehicle to compare |
Definition at line 457 of file MSE2Collector.cpp.
References MSLane::getPartialOccupator(), SUMOVehicle::getPositionOnLane(), and myLane.
|
private |
|
private |
The lane the detector is placed at.
Definition at line 318 of file MSE2Collector.h.
Referenced by operator()().