Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ROVehicleByDepartureComperator Class Reference

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

#include <ROHelper.h>

Inheritance diagram for ROVehicleByDepartureComperator:
[legend]
Collaboration diagram for ROVehicleByDepartureComperator:
[legend]

Public Member Functions

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

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 40 of file ROHelper.h.

Constructor & Destructor Documentation

◆ ROVehicleByDepartureComperator()

ROVehicleByDepartureComperator::ROVehicleByDepartureComperator ( )
inlineexplicit

Constructor.

Definition at line 43 of file ROHelper.h.

◆ ~ROVehicleByDepartureComperator()

ROVehicleByDepartureComperator::~ROVehicleByDepartureComperator ( )
inline

Destructor.

Definition at line 46 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
[i]veh1 The first vehicle to compare
[i]veh2 The second vehicle to compare
Returns
Whether the first vehicle departs later than the second
Todo:
Check whether both vehicles can be const

Definition at line 59 of file ROHelper.h.

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


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