Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSLane::vehicle_position_sorter Class Reference

Sorts vehicles by their position (descending) More...

Collaboration diagram for MSLane::vehicle_position_sorter:
[legend]

Public Member Functions

int operator() (MSVehicle *v1, MSVehicle *v2) const
 Comparing operator.
 
 vehicle_position_sorter (const MSLane *lane)
 Constructor.
 

Data Fields

const MSLanemyLane
 

Detailed Description

Sorts vehicles by their position (descending)

Definition at line 1632 of file MSLane.h.

Constructor & Destructor Documentation

◆ vehicle_position_sorter()

MSLane::vehicle_position_sorter::vehicle_position_sorter ( const MSLane lane)
inlineexplicit

Constructor.

Definition at line 1635 of file MSLane.h.

Member Function Documentation

◆ operator()()

int MSLane::vehicle_position_sorter::operator() ( MSVehicle v1,
MSVehicle v2 
) const

Comparing operator.

Parameters
[in]v1First vehicle to compare
[in]v2Second vehicle to compare
Returns
Whether the first vehicle is further on the lane than the second

Definition at line 3421 of file MSLane.cpp.

References MSVehicle::getBackPositionOnLane(), MSBaseVehicle::getNumericalID(), and myLane.

Field Documentation

◆ myLane

const MSLane* MSLane::vehicle_position_sorter::myLane

Definition at line 1647 of file MSLane.h.

Referenced by operator()().


The documentation for this class was generated from the following files: