SUMO - Simulation of Urban MObility
ROVehicleByDepartureComperator Class Reference

A function for sorting vehicles by their departure time. More...

#include <ROHelper.h>

Inheritance diagram for ROVehicleByDepartureComperator:
Inheritance graph
Collaboration diagram for ROVehicleByDepartureComperator:
Collaboration graph

Public Member Functions

bool operator() (ROVehicle *veh1, ROVehicle *veh2) const
 Comparing operator. More...
 
 ROVehicleByDepartureComperator ()
 Constructor. More...
 
 ~ROVehicleByDepartureComperator ()
 Destructor. More...
 

Detailed Description

A function for sorting vehicles by their departure time.

In the case two vehicles have the same departure time, they are sorted lexically.

Definition at line 49 of file ROHelper.h.

Constructor & Destructor Documentation

◆ ROVehicleByDepartureComperator()

ROVehicleByDepartureComperator::ROVehicleByDepartureComperator ( )
inlineexplicit

Constructor.

Definition at line 52 of file ROHelper.h.

◆ ~ROVehicleByDepartureComperator()

ROVehicleByDepartureComperator::~ROVehicleByDepartureComperator ( )
inline

Destructor.

Definition at line 55 of file ROHelper.h.

Member Function Documentation

◆ operator()()

bool ROVehicleByDepartureComperator::operator() ( ROVehicle veh1,
ROVehicle veh2 
) const
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.

Parameters

Definition at line 68 of file ROHelper.h.

References RORoutable::getDepart(), RORoutable::getID(), and ROHelper::recheckForLoops().


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