Eclipse SUMO - Simulation of Urban MObility
NBPTLine Class Reference

#include <NBPTLine.h>

Public Member Functions

void addPTStop (NBPTStop *pStop)
 
void addWayNode (long long int way, long long int node)
 
const std::string & getLineID () const
 
const std::vector< std::string > & getMyWays () 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< NBEdge * > getStopEdges (const NBEdgeCont &ec) const
 get stop edges More...
 
std::vector< NBPTStop * > getStops ()
 
const std::string & getType () const
 
std::vector< long long int > * getWaysNodes (std::string wayId)
 
 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)
 
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, NBEdgeCont &ec)
 

Private Attributes

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 36 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 
)
explicit

Definition at line 31 of file NBPTLine.cpp.

Member Function Documentation

◆ addPTStop()

void NBPTLine::addPTStop ( NBPTStop pStop)

Definition at line 42 of file NBPTLine.cpp.

References 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 94 of file NBPTLine.cpp.

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

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

Here is the caller graph for this function:

◆ getLineID()

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

Definition at line 45 of file NBPTLine.h.

References myPTLineId.

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

Here is the caller graph for this function:

◆ getMyWays()

const std::vector< std::string > & NBPTLine::getMyWays ( ) const

Definition at line 103 of file NBPTLine.cpp.

References myWays.

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

Here is the caller graph for this function:

◆ getName()

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

Definition at line 49 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 64 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 140 of file NBPTLine.cpp.

References myRoute.

Referenced by NBPTLineCont::findWay(), 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 186 of file NBPTLine.cpp.

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

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 157 of file NBPTLine.cpp.

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

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getStopEdges()

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

get stop edges

Definition at line 145 of file NBPTLine.cpp.

References myPTStops, and NBEdgeCont::retrieve().

Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops().

Here is the caller graph for this function:

◆ getStops()

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

Definition at line 47 of file NBPTLine.cpp.

References myPTStops.

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

Here is the caller graph for this function:

◆ getType()

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

Definition at line 53 of file NBPTLine.h.

References myType.

Referenced by NBPTLineCont::fixBidiStops().

Here is the caller graph for this function:

◆ getWaysNodes()

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

Definition at line 106 of file NBPTLine.cpp.

References myWaysNodes.

Referenced by NBPTLineCont::reviseStops().

Here is the caller graph for this function:

◆ replaceEdge()

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

◆ replaceStop()

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

replace the given stop

Definition at line 215 of file NBPTLine.cpp.

References myPTStops.

Referenced by NBPTLineCont::findWay().

Here is the caller graph for this function:

◆ replaceStops()

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

Definition at line 68 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 114 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 137 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 86 of file NBPTLine.h.

References myName.

Referenced by NIXMLPTHandler::myStartElement().

Here is the caller graph for this function:

◆ write()

Field Documentation

◆ myCurrentWay

std::string NBPTLine::myCurrentWay
private

Definition at line 103 of file NBPTLine.h.

Referenced by addWayNode().

◆ myInterval

int NBPTLine::myInterval
private

Definition at line 108 of file NBPTLine.h.

Referenced by write().

◆ myName

std::string NBPTLine::myName
private

Definition at line 91 of file NBPTLine.h.

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

◆ myNightService

std::string NBPTLine::myNightService
private

Definition at line 110 of file NBPTLine.h.

Referenced by write().

◆ myNumOfStops

int NBPTLine::myNumOfStops
private

Definition at line 122 of file NBPTLine.h.

Referenced by setMyNumOfStops(), and write().

◆ myPTLineId

std::string NBPTLine::myPTLineId
private

Definition at line 104 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 105 of file NBPTLine.h.

Referenced by getRef(), and write().

◆ myRoute

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

Definition at line 117 of file NBPTLine.h.

Referenced by getRoute(), getRouteEnd(), getRouteStart(), replaceEdge(), setEdges(), and write().

◆ myType

std::string NBPTLine::myType
private

Definition at line 92 of file NBPTLine.h.

Referenced by getType(), and write().

◆ myVClass

SUMOVehicleClass NBPTLine::myVClass
private

Definition at line 111 of file NBPTLine.h.

Referenced by setEdges(), and write().

◆ myWays

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

Definition at line 97 of file NBPTLine.h.

Referenced by addWayNode(), and getMyWays().

◆ myWaysNodes

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

Definition at line 96 of file NBPTLine.h.

Referenced by addWayNode(), and getWaysNodes().


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