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

AnyVehicleIterator is a structure, which manages the iteration through all vehicles on the lane, that may be of importance for the car-following dynamics along that lane. The relevant types of vehicles are: 1) vehicles with their front on the lane (myVehicles), 2) vehicles intersecting the lane but with front on another lane (myPartialVehicles). More...

#include <MSLane.h>

Collaboration diagram for MSLane::AnyVehicleIterator:
[legend]

Public Member Functions

 AnyVehicleIterator (const MSLane *lane, int i1, int i2, int i3, const int i1End, const int i2End, const int i3End, bool downstream=true)
bool operator!= (AnyVehicleIterator const &other) const
const MSVehicleoperator* ()
AnyVehicleIteratoroperator++ ()
const MSVehicleoperator-> ()
bool operator== (AnyVehicleIterator const &other) const

Private Member Functions

bool nextIsMyVehicles () const

Private Attributes

int myDirection
 index delta
bool myDownstream
 iteration direction
int myI1
 index for myVehicles
int myI1End
 end index for myVehicles
int myI2
 index for myPartialVehicles
int myI2End
 end index for myPartialVehicles
int myI3
 index for myTmpVehicles
int myI3End
 end index for myTmpVehicles
const MSLanemyLane
 the lane that is being iterated

Detailed Description

AnyVehicleIterator is a structure, which manages the iteration through all vehicles on the lane, that may be of importance for the car-following dynamics along that lane. The relevant types of vehicles are: 1) vehicles with their front on the lane (myVehicles), 2) vehicles intersecting the lane but with front on another lane (myPartialVehicles).

In the context of retrieving linkLeaders during lane changing a third group of vehicles is checked: 3) vehicles processed during lane changing (myTmpVehicles)

Definition at line 129 of file MSLane.h.

Constructor & Destructor Documentation

◆ AnyVehicleIterator()

MSLane::AnyVehicleIterator::AnyVehicleIterator ( const MSLane * lane,
int i1,
int i2,
int i3,
const int i1End,
const int i2End,
const int i3End,
bool downstream = true )
inline

Definition at line 131 of file MSLane.h.

References MSLane::MSLane(), myDirection, myDownstream, myI1, myI1End, myI2, myI2End, myI3, myI3End, and myLane.

Referenced by operator!=(), and operator==().

Here is the caller graph for this function:

Member Function Documentation

◆ nextIsMyVehicles()

bool MSLane::AnyVehicleIterator::nextIsMyVehicles ( ) const
private

Definition at line 204 of file MSLane.cpp.

References DEBUG_COND2, Named::getID(), MSVehicle::getPositionOnLane(), myDownstream, myI1, myI1End, myI2, myI2End, myI3, myI3End, myLane, and SIMTIME.

Referenced by operator*(), and operator++().

Here is the caller graph for this function:

◆ operator!=()

bool MSLane::AnyVehicleIterator::operator!= ( AnyVehicleIterator const & other) const
inline

Definition at line 160 of file MSLane.h.

References AnyVehicleIterator().

◆ operator*()

const MSVehicle * MSLane::AnyVehicleIterator::operator* ( )

Definition at line 187 of file MSLane.cpp.

References myI1, myI1End, myI2, myI2End, myI3, myI3End, myLane, and nextIsMyVehicles().

◆ operator++()

MSLane::AnyVehicleIterator & MSLane::AnyVehicleIterator::operator++ ( )

Definition at line 170 of file MSLane.cpp.

References myDirection, myI1, myI1End, myI2, myI3, myI3End, and nextIsMyVehicles().

◆ operator->()

const MSVehicle * MSLane::AnyVehicleIterator::operator-> ( )
inline

Definition at line 164 of file MSLane.h.

◆ operator==()

bool MSLane::AnyVehicleIterator::operator== ( AnyVehicleIterator const & other) const
inline

Definition at line 151 of file MSLane.h.

References AnyVehicleIterator(), myI1, myI1End, myI2, myI2End, myI3, and myI3End.

Field Documentation

◆ myDirection

int MSLane::AnyVehicleIterator::myDirection
private

index delta

Definition at line 192 of file MSLane.h.

Referenced by AnyVehicleIterator(), and operator++().

◆ myDownstream

bool MSLane::AnyVehicleIterator::myDownstream
private

iteration direction

Definition at line 190 of file MSLane.h.

Referenced by AnyVehicleIterator(), and nextIsMyVehicles().

◆ myI1

int MSLane::AnyVehicleIterator::myI1
private

index for myVehicles

Definition at line 178 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), operator++(), and operator==().

◆ myI1End

int MSLane::AnyVehicleIterator::myI1End
private

end index for myVehicles

Definition at line 184 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), operator++(), and operator==().

◆ myI2

int MSLane::AnyVehicleIterator::myI2
private

index for myPartialVehicles

Definition at line 180 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), operator++(), and operator==().

◆ myI2End

int MSLane::AnyVehicleIterator::myI2End
private

end index for myPartialVehicles

Definition at line 186 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), and operator==().

◆ myI3

int MSLane::AnyVehicleIterator::myI3
private

index for myTmpVehicles

Definition at line 182 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), operator++(), and operator==().

◆ myI3End

int MSLane::AnyVehicleIterator::myI3End
private

end index for myTmpVehicles

Definition at line 188 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), operator*(), operator++(), and operator==().

◆ myLane

const MSLane* MSLane::AnyVehicleIterator::myLane
private

the lane that is being iterated

Definition at line 176 of file MSLane.h.

Referenced by AnyVehicleIterator(), nextIsMyVehicles(), and operator*().


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