SUMO - Simulation of Urban MObility
MSLeaderInfo Class Reference

#include <MSLeaderInfo.h>

Inheritance diagram for MSLeaderInfo:
Inheritance graph
Collaboration diagram for MSLeaderInfo:
Collaboration graph

Public Member Functions

virtual int addLeader (const MSVehicle *veh, bool beyond, double latOffset=0)
 
virtual void clear ()
 discard all information More...
 
void getSublaneBorders (int sublane, double latOffset, double &rightSide, double &leftSide) const
 
void getSubLanes (const MSVehicle *veh, double latOffset, int &rightmost, int &leftmost) const
 
bool hasStoppedVehicle () const
 whether a stopped vehicle is leader More...
 
bool hasVehicles () const
 
 MSLeaderInfo (const MSLane *lane, const MSVehicle *ego=0, double latOffset=0)
 Constructor. More...
 
int numFreeSublanes () const
 
int numSublanes () const
 
const MSVehicle * operator[] (int sublane) const
 return the vehicle for the given sublane More...
 
virtual std::string toString () const
 print a debugging representation More...
 
virtual ~MSLeaderInfo ()
 Destructor. More...
 

Protected Attributes

int egoLeftMost
 
int egoRightMost
 borders of the ego vehicle for filtering of free sublanes More...
 
int myFreeSublanes
 the number of free sublanes More...
 
bool myHasVehicles
 
std::vector< const MSVehicle * > myVehicles
 
double myWidth
 the width of the lane to which this instance applies More...
 

Detailed Description

Definition at line 57 of file MSLeaderInfo.h.

Constructor & Destructor Documentation

MSLeaderInfo::MSLeaderInfo ( const MSLane *  lane,
const MSVehicle *  ego = 0,
double  latOffset = 0 
)

Constructor.

Definition at line 49 of file MSLeaderInfo.cpp.

References egoLeftMost, egoRightMost, getSubLanes(), myFreeSublanes, and myVehicles.

MSLeaderInfo::~MSLeaderInfo ( )
virtual

Destructor.

Definition at line 65 of file MSLeaderInfo.cpp.

Member Function Documentation

int MSLeaderInfo::addLeader ( const MSVehicle *  veh,
bool  beyond,
double  latOffset = 0 
)
virtual
void MSLeaderInfo::getSublaneBorders ( int  sublane,
double  latOffset,
double &  rightSide,
double &  leftSide 
) const
bool MSLeaderInfo::hasStoppedVehicle ( ) const

whether a stopped vehicle is leader

Definition at line 171 of file MSLeaderInfo.cpp.

References myHasVehicles, and myVehicles.

Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSLCM_SL2015::checkStrategicChange(), and hasVehicles().

bool MSLeaderInfo::hasVehicles ( ) const
inline
int MSLeaderInfo::numFreeSublanes ( ) const
inline
const MSVehicle * MSLeaderInfo::operator[] ( int  sublane) const

return the vehicle for the given sublane

Definition at line 147 of file MSLeaderInfo.cpp.

References myVehicles.

Referenced by MSLeaderDistanceInfo::addLeader().

Field Documentation

int MSLeaderInfo::egoLeftMost
protected
int MSLeaderInfo::egoRightMost
protected

borders of the ego vehicle for filtering of free sublanes

Definition at line 127 of file MSLeaderInfo.h.

Referenced by MSCriticalFollowerDistanceInfo::addFollower(), addLeader(), MSLeaderDistanceInfo::addLeader(), clear(), and MSLeaderInfo().

bool MSLeaderInfo::myHasVehicles
protected
double MSLeaderInfo::myWidth
protected

the width of the lane to which this instance applies

Definition at line 117 of file MSLeaderInfo.h.

Referenced by getSublaneBorders(), and getSubLanes().


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