Eclipse SUMO - Simulation of Urban MObility
RailEdge< E, V > Class Template Reference

the edge type representing backward edges More...

#include <RailEdge.h>

Collaboration diagram for RailEdge< E, V >:
[legend]

Public Types

typedef RailEdge< E, V > _RailEdge
 
typedef std::vector< std::pair< const _RailEdge *, const _RailEdge * > > ConstEdgePairVector
 

Public Member Functions

void addVirtualTurns (const E *forward, const E *backward, std::vector< _RailEdge * > &railEdges, int &numericalID, double dist, double maxTrainLength, const std::vector< const E * > &replacementEdges)
 
const std::string & getID () const
 Returns the id of the edge. More...
 
double getLength () const
 Returns the length of the edge. More...
 
int getNumericalID () const
 Returns the index (numeric id) of the edge. More...
 
const E * getOriginal () const
 Returns the original edge. More...
 
const ConstEdgePairVectorgetViaSuccessors (SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
 
void init (std::vector< _RailEdge * > &railEdges, int &numericalID, double maxTrainLength)
 
void insertOriginalEdges (double length, std::vector< const E * > &into) const
 
bool isInternal () const
 
bool isVirtual () const
 
bool prohibits (const V *const vehicle) const
 
 RailEdge (const E *orig)
 
 RailEdge (const E *turnStart, const E *turnEnd, int numericalID)
 
bool restricts (const V *const vehicle) const
 
void update (double maxTrainLength, const std::vector< const E * > &replacementEdges)
 
virtual ~RailEdge ()
 Destructor. More...
 

Private Attributes

std::map< SUMOVehicleClass, ConstEdgePairVectormyClassesViaSuccessorMap
 The successors available for a given vClass. More...
 
const std::string myID
 
bool myIsVirtual
 
double myMaxLength = std::numeric_limits<double>::max()
 maximum train length for passing this (turnaround) edge More...
 
const int myNumericalID
 
const E * myOriginal
 
std::vector< const E * > myReplacementEdges
 actual edges to return when passing this (turnaround) edge - only forward More...
 
double myStartLength = 0
 length of the edge where this turn starts More...
 
_RailEdgemyTurnaround
 
ConstEdgePairVector myViaSuccessors
 

Detailed Description

template<class E, class V>
class RailEdge< E, V >

the edge type representing backward edges

Definition at line 38 of file RailEdge.h.

Member Typedef Documentation

◆ _RailEdge

template<class E , class V >
typedef RailEdge<E, V> RailEdge< E, V >::_RailEdge

Definition at line 40 of file RailEdge.h.

◆ ConstEdgePairVector

template<class E , class V >
typedef std::vector<std::pair<const _RailEdge*, const _RailEdge*> > RailEdge< E, V >::ConstEdgePairVector

Definition at line 41 of file RailEdge.h.

Constructor & Destructor Documentation

◆ RailEdge() [1/2]

template<class E , class V >
RailEdge< E, V >::RailEdge ( const E *  orig)
inline

Definition at line 43 of file RailEdge.h.

◆ RailEdge() [2/2]

template<class E , class V >
RailEdge< E, V >::RailEdge ( const E *  turnStart,
const E *  turnEnd,
int  numericalID 
)
inline

Definition at line 50 of file RailEdge.h.

References RailEdge< E, V >::myViaSuccessors.

◆ ~RailEdge()

template<class E , class V >
virtual RailEdge< E, V >::~RailEdge ( )
inlinevirtual

Destructor.

Definition at line 62 of file RailEdge.h.

References RailEdge< E, V >::myTurnaround.

Member Function Documentation

◆ addVirtualTurns()

template<class E , class V >
void RailEdge< E, V >::addVirtualTurns ( const E *  forward,
const E *  backward,
std::vector< _RailEdge< E, V > * > &  railEdges,
int &  numericalID,
double  dist,
double  maxTrainLength,
const std::vector< const E * > &  replacementEdges 
)
inline

Definition at line 76 of file RailEdge.h.

References RailEdge< E, V >::getID(), RailEdge< E, V >::myTurnaround, RailEdge< E, V >::myViaSuccessors, REVERSAL_SLACK, SVC_IGNORING, toString(), and RailEdge< E, V >::update().

Referenced by RailEdge< E, V >::init().

Here is the caller graph for this function:

◆ getID()

template<class E , class V >
const std::string& RailEdge< E, V >::getID ( ) const
inline

Returns the id of the edge.

Returns
The original edge's id

Definition at line 177 of file RailEdge.h.

References RailEdge< E, V >::myID, and RailEdge< E, V >::myOriginal.

Referenced by RailEdge< E, V >::addVirtualTurns(), RailEdge< E, V >::init(), RailEdge< E, V >::prohibits(), and RailEdge< E, V >::update().

Here is the caller graph for this function:

◆ getLength()

template<class E , class V >
double RailEdge< E, V >::getLength ( ) const
inline

Returns the length of the edge.

Returns
The original edge's length

Definition at line 211 of file RailEdge.h.

References RailEdge< E, V >::myOriginal.

Referenced by RailEdge< E, V >::init().

Here is the caller graph for this function:

◆ getNumericalID()

template<class E , class V >
int RailEdge< E, V >::getNumericalID ( ) const
inline

Returns the index (numeric id) of the edge.

Definition at line 165 of file RailEdge.h.

References RailEdge< E, V >::myNumericalID.

◆ getOriginal()

template<class E , class V >
const E* RailEdge< E, V >::getOriginal ( ) const
inline

Returns the original edge.

Definition at line 170 of file RailEdge.h.

References RailEdge< E, V >::myOriginal.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ getViaSuccessors()

template<class E , class V >
const ConstEdgePairVector& RailEdge< E, V >::getViaSuccessors ( SUMOVehicleClass  vClass = SVC_IGNORING,
bool  ignoreTransientPermissions = false 
) const
inline

◆ init()

template<class E , class V >
void RailEdge< E, V >::init ( std::vector< _RailEdge< E, V > * > &  railEdges,
int &  numericalID,
double  maxTrainLength 
)
inline

◆ insertOriginalEdges()

template<class E , class V >
void RailEdge< E, V >::insertOriginalEdges ( double  length,
std::vector< const E * > &  into 
) const
inline

Definition at line 181 of file RailEdge.h.

References RailEdge< E, V >::myIsVirtual, RailEdge< E, V >::myOriginal, RailEdge< E, V >::myReplacementEdges, RailEdge< E, V >::myStartLength, REVERSAL_SLACK, and SVC_IGNORING.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ isInternal()

template<class E , class V >
bool RailEdge< E, V >::isInternal ( ) const
inline

Definition at line 219 of file RailEdge.h.

References RailEdge< E, V >::myOriginal.

◆ isVirtual()

template<class E , class V >
bool RailEdge< E, V >::isVirtual ( ) const
inline

Definition at line 262 of file RailEdge.h.

References RailEdge< E, V >::myIsVirtual.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ prohibits()

template<class E , class V >
bool RailEdge< E, V >::prohibits ( const V *const  vehicle) const
inline

◆ restricts()

template<class E , class V >
bool RailEdge< E, V >::restricts ( const V *const  vehicle) const
inline

Definition at line 232 of file RailEdge.h.

References RailEdge< E, V >::myOriginal.

◆ update()

template<class E , class V >
void RailEdge< E, V >::update ( double  maxTrainLength,
const std::vector< const E * > &  replacementEdges 
)
inline

Definition at line 66 of file RailEdge.h.

References RailEdge< E, V >::getID(), RailEdge< E, V >::myMaxLength, RailEdge< E, V >::myReplacementEdges, and toString().

Referenced by RailEdge< E, V >::addVirtualTurns().

Here is the caller graph for this function:

Field Documentation

◆ myClassesViaSuccessorMap

template<class E , class V >
std::map<SUMOVehicleClass, ConstEdgePairVector> RailEdge< E, V >::myClassesViaSuccessorMap
mutableprivate

The successors available for a given vClass.

Definition at line 282 of file RailEdge.h.

Referenced by RailEdge< E, V >::getViaSuccessors().

◆ myID

template<class E , class V >
const std::string RailEdge< E, V >::myID
private

Definition at line 268 of file RailEdge.h.

Referenced by RailEdge< E, V >::getID().

◆ myIsVirtual

template<class E , class V >
bool RailEdge< E, V >::myIsVirtual
private

◆ myMaxLength

template<class E , class V >
double RailEdge< E, V >::myMaxLength = std::numeric_limits<double>::max()
private

maximum train length for passing this (turnaround) edge

Definition at line 277 of file RailEdge.h.

Referenced by RailEdge< E, V >::prohibits(), and RailEdge< E, V >::update().

◆ myNumericalID

template<class E , class V >
const int RailEdge< E, V >::myNumericalID
private

Definition at line 267 of file RailEdge.h.

Referenced by RailEdge< E, V >::getNumericalID().

◆ myOriginal

◆ myReplacementEdges

template<class E , class V >
std::vector<const E*> RailEdge< E, V >::myReplacementEdges
private

actual edges to return when passing this (turnaround) edge - only forward

Definition at line 274 of file RailEdge.h.

Referenced by RailEdge< E, V >::insertOriginalEdges(), and RailEdge< E, V >::update().

◆ myStartLength

template<class E , class V >
double RailEdge< E, V >::myStartLength = 0
private

length of the edge where this turn starts

Definition at line 279 of file RailEdge.h.

Referenced by RailEdge< E, V >::insertOriginalEdges().

◆ myTurnaround

template<class E , class V >
_RailEdge* RailEdge< E, V >::myTurnaround
private

◆ myViaSuccessors

template<class E , class V >
ConstEdgePairVector RailEdge< E, V >::myViaSuccessors
mutableprivate

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