MSE2Collector::by_vehicle_position_sorter Class Reference

#include <MSE2Collector.h>


Detailed Description

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 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.

Constructor & Destructor Documentation

MSE2Collector::by_vehicle_position_sorter::by_vehicle_position_sorter ( const MSLane *const   lane  )  throw () [inline]

constructor

Parameters:
[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

Parameters:
[in] s The instance to copy

Definition at line 309 of file MSE2Collector.h.

00310                 : myLane(s.myLane) { }


Member Function Documentation

int MSE2Collector::by_vehicle_position_sorter::operator() ( const MSVehicle v1,
const MSVehicle v2 
) throw () [inline]

Comparison funtcion.

Parameters:
[in] v1 First vehicle to compare
[in] v2 Second vehicle to compare
Returns:
Whether the position of the first vehicles is smaller than the one of the second

Definition at line 319 of file MSE2Collector.h.

References myLane.


Field Documentation

The lane the detector is placed at.

Definition at line 325 of file MSE2Collector.h.

Referenced by operator()().


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

Generated on Wed May 5 00:06:47 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6