Eclipse SUMO - Simulation of Urban MObility
NBPTLine Class Reference

#include <NBPTLine.h>

Collaboration diagram for NBPTLine:
[legend]

Public Member Functions

void addPTStop (NBPTStop *pStop)
 
void addWayNode (long long int way, long long int node)
 
void deleteDuplicateStops ()
 
void deleteInvalidStops (const NBEdgeCont &ec, const NBPTStopCont &sc)
 remove invalid stops from the line More...
 
const std::string & getLineID () const
 
const std::string & getName () const
 
const std::string & getRef () const
 get line reference (not unique) More...
 
const std::vector< NBEdge * > & getRoute () const
 
NBEdgegetRouteEnd (const NBEdgeCont &ec) const
 return last valid edge of myRoute (if it doest not lie before the last stop) More...
 
NBEdgegetRouteStart (const NBEdgeCont &ec) const
 return first valid edge of myRoute (if it doest not lie after the first stop) More...
 
std::vector< std::pair< NBEdge *, std::string > > getStopEdges (const NBEdgeCont &ec) const
 get stop edges and stop ids More...
 
const std::vector< NBPTStop * > & getStops ()
 
const std::string & getType () const
 
SUMOVehicleClass getVClass () const
 
const std::vector< std::string > & getWays () const
 
std::vector< long long int > * getWaysNodes (std::string wayId)
 
bool isConsistent (const std::vector< NBEdge * > &stops) const
 return whether the mentioned edges appear in that order in the route More...
 
 NBPTLine (const std::string &id, const std::string &name, const std::string &type, const std::string &ref, int interval, const std::string &nightService, SUMOVehicleClass vClass, RGBColor color)
 
void removeInvalidEdges (const NBEdgeCont &ec)
 remove invalid edges from the line More...
 
void replaceEdge (const std::string &edgeID, const EdgeVector &replacement)
 replace the edge with the given edge list More...
 
void replaceStop (NBPTStop *oldStop, NBPTStop *newStop)
 replace the given stop More...
 
void replaceStops (std::vector< NBPTStop * > stops)
 
void setEdges (const std::vector< NBEdge * > &edges)
 
void setMyNumOfStops (int numStops)
 
void setName (const std::string &name)
 
void write (OutputDevice &device)
 

Private Attributes

RGBColor myColor
 
std::string myCurrentWay
 
int myInterval
 
std::string myName
 
std::string myNightService
 
int myNumOfStops
 
std::string myPTLineId
 
std::vector< NBPTStop * > myPTStops
 
std::string myRef
 
std::vector< NBEdge * > myRoute
 
std::string myType
 
SUMOVehicleClass myVClass
 
std::vector< std::string > myWays
 
std::map< std::string, std::vector< long long int > > myWaysNodes
 

Detailed Description

Definition at line 38 of file NBPTLine.h.

Constructor & Destructor Documentation

◆ NBPTLine()

NBPTLine::NBPTLine ( const std::string &  id,
const std::string &  name,
const std::string &  type,
const std::string &  ref,
int  interval,
const std::string &  nightService,
SUMOVehicleClass  vClass,
RGBColor  color 
)

Definition at line 32 of file NBPTLine.cpp.

Member Function Documentation

◆ addPTStop()

void NBPTLine::addPTStop ( NBPTStop pStop)

Definition at line 46 of file NBPTLine.cpp.

References NBPTStop::getName(), NBPTStop::isPlatform(), and myPTStops.

Referenced by NIXMLPTHandler::addPTLineFromFlow(), NIXMLPTHandler::addPTLineStop(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ addWayNode()

void NBPTLine::addWayNode ( long long int  way,
long long int  node 
)

Definition at line 107 of file NBPTLine.cpp.

References myCurrentWay, myWays, myWaysNodes, and toString().

Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ deleteDuplicateStops()

void NBPTLine::deleteDuplicateStops ( )

◆ deleteInvalidStops()

void NBPTLine::deleteInvalidStops ( const NBEdgeCont ec,
const NBPTStopCont sc 
)

remove invalid stops from the line

Definition at line 283 of file NBPTLine.cpp.

References NBPTStopCont::get(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBPTStop::getID(), getLineID(), myPTStops, TL, and WRITE_WARNINGF.

Referenced by NBPTLineCont::process().

Here is the caller graph for this function:

◆ getLineID()

const std::string & NBPTLine::getLineID ( ) const
inline

Definition at line 47 of file NBPTLine.h.

References myPTLineId.

Referenced by NIXMLPTHandler::addPTLineStop(), NBPTLineCont::constructRoute(), deleteDuplicateStops(), deleteInvalidStops(), NBPTLineCont::findWay(), NBPTLineCont::fixBidiStops(), NBPTLineCont::insert(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getName()

const std::string & NBPTLine::getName ( ) const
inline

Definition at line 51 of file NBPTLine.h.

References myName.

Referenced by NIXMLPTHandler::addPTLineRoute(), NIXMLPTHandler::addRoute(), and NBPTLineCont::constructRoute().

Here is the caller graph for this function:

◆ getRef()

const std::string & NBPTLine::getRef ( ) const
inline

get line reference (not unique)

Definition at line 66 of file NBPTLine.h.

References myRef.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NBPTLineCont::fixBidiStops(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getRoute()

const std::vector< NBEdge * > & NBPTLine::getRoute ( ) const

Definition at line 158 of file NBPTLine.cpp.

References myRoute.

Referenced by NBPTLineCont::findWay(), NBPTLineCont::fixPermissions(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getRouteEnd()

NBEdge * NBPTLine::getRouteEnd ( const NBEdgeCont ec) const

return last valid edge of myRoute (if it doest not lie before the last stop)

Definition at line 207 of file NBPTLine.cpp.

References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getRouteStart()

NBEdge * NBPTLine::getRouteStart ( const NBEdgeCont ec) const

return first valid edge of myRoute (if it doest not lie after the first stop)

Definition at line 177 of file NBPTLine.cpp.

References NBEdge::getID(), myPTLineId, myPTStops, myRoute, NBEdgeCont::retrieve(), TL, and WRITE_WARNINGF.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getStopEdges()

std::vector< std::pair< NBEdge *, std::string > > NBPTLine::getStopEdges ( const NBEdgeCont ec) const

get stop edges and stop ids

Definition at line 164 of file NBPTLine.cpp.

References NBEdge::getID(), myPTStops, and NBEdgeCont::retrieve().

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getStops()

const std::vector< NBPTStop * > & NBPTLine::getStops ( )

Definition at line 60 of file NBPTLine.cpp.

References myPTStops.

Referenced by NBPTLineCont::fixBidiStops(), NIXMLPTHandler::myEndElement(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), NBPTLineCont::process(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getType()

const std::string & NBPTLine::getType ( ) const
inline

Definition at line 55 of file NBPTLine.h.

References myType.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ getVClass()

SUMOVehicleClass NBPTLine::getVClass ( ) const
inline

Definition at line 85 of file NBPTLine.h.

References myVClass.

Referenced by NBPTLineCont::fixPermissions().

Here is the caller graph for this function:

◆ getWays()

const std::vector< std::string > & NBPTLine::getWays ( ) const
inline

Definition at line 106 of file NBPTLine.h.

References myWays.

Referenced by NBPTLineCont::constructRoute(), NBPTLineCont::findWay(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ getWaysNodes()

std::vector< long long int > * NBPTLine::getWaysNodes ( std::string  wayId)

Definition at line 118 of file NBPTLine.cpp.

References myWaysNodes.

Referenced by NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ isConsistent()

bool NBPTLine::isConsistent ( const std::vector< NBEdge * > &  stops) const

return whether the mentioned edges appear in that order in the route

Definition at line 237 of file NBPTLine.cpp.

References myRoute.

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ removeInvalidEdges()

void NBPTLine::removeInvalidEdges ( const NBEdgeCont ec)

remove invalid edges from the line

Definition at line 322 of file NBPTLine.cpp.

References NBEdgeCont::getSplit(), myRoute, NBEdgeCont::retrieve(), and split().

◆ replaceEdge()

void NBPTLine::replaceEdge ( const std::string &  edgeID,
const EdgeVector replacement 
)

replace the edge with the given edge list

Definition at line 265 of file NBPTLine.cpp.

References myRoute.

◆ replaceStop()

void NBPTLine::replaceStop ( NBPTStop oldStop,
NBPTStop newStop 
)

replace the given stop

Definition at line 255 of file NBPTLine.cpp.

References myPTStops.

Referenced by NBPTLineCont::findWay(), and NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ replaceStops()

void NBPTLine::replaceStops ( std::vector< NBPTStop * >  stops)
inline

Definition at line 70 of file NBPTLine.h.

References myPTStops.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ setEdges()

void NBPTLine::setEdges ( const std::vector< NBEdge * > &  edges)

Definition at line 127 of file NBPTLine.cpp.

References myRoute, myVClass, SUMO_const_laneWidth, SVC_BICYCLE, and SVC_PEDESTRIAN.

Referenced by NIXMLPTHandler::addPTLineFromFlow(), NIXMLPTHandler::addPTLineRoute(), and NBPTLineCont::constructRoute().

Here is the caller graph for this function:

◆ setMyNumOfStops()

void NBPTLine::setMyNumOfStops ( int  numStops)

Definition at line 152 of file NBPTLine.cpp.

References myNumOfStops.

Referenced by NIXMLPTHandler::myEndElement(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().

Here is the caller graph for this function:

◆ setName()

void NBPTLine::setName ( const std::string &  name)
inline

Definition at line 102 of file NBPTLine.h.

References myName.

Referenced by NIXMLPTHandler::myStartElement().

Here is the caller graph for this function:

◆ write()

Field Documentation

◆ myColor

RGBColor NBPTLine::myColor
private

Definition at line 122 of file NBPTLine.h.

Referenced by write().

◆ myCurrentWay

std::string NBPTLine::myCurrentWay
private

Definition at line 118 of file NBPTLine.h.

Referenced by addWayNode().

◆ myInterval

int NBPTLine::myInterval
private

Definition at line 125 of file NBPTLine.h.

Referenced by write().

◆ myName

std::string NBPTLine::myName
private

Definition at line 113 of file NBPTLine.h.

Referenced by getName(), setName(), and write().

◆ myNightService

std::string NBPTLine::myNightService
private

Definition at line 127 of file NBPTLine.h.

Referenced by write().

◆ myNumOfStops

int NBPTLine::myNumOfStops
private

Definition at line 139 of file NBPTLine.h.

Referenced by setMyNumOfStops(), and write().

◆ myPTLineId

std::string NBPTLine::myPTLineId
private

Definition at line 119 of file NBPTLine.h.

Referenced by getLineID(), getRouteEnd(), getRouteStart(), and write().

◆ myPTStops

std::vector<NBPTStop*> NBPTLine::myPTStops
private

◆ myRef

std::string NBPTLine::myRef
private

Definition at line 120 of file NBPTLine.h.

Referenced by getRef(), and write().

◆ myRoute

std::vector<NBEdge*> NBPTLine::myRoute
private

◆ myType

std::string NBPTLine::myType
private

Definition at line 114 of file NBPTLine.h.

Referenced by getType(), and write().

◆ myVClass

SUMOVehicleClass NBPTLine::myVClass
private

Definition at line 128 of file NBPTLine.h.

Referenced by getVClass(), setEdges(), and write().

◆ myWays

std::vector<std::string> NBPTLine::myWays
private

Definition at line 117 of file NBPTLine.h.

Referenced by addWayNode(), and getWays().

◆ myWaysNodes

std::map<std::string, std::vector<long long int> > NBPTLine::myWaysNodes
private

Definition at line 116 of file NBPTLine.h.

Referenced by addWayNode(), and getWaysNodes().


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