![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBPTLine.h>
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 |
NBEdge * | getRouteEnd (const NBEdgeCont &ec) const |
return last valid edge of myRoute (if it doest not lie before the last stop) More... | |
NBEdge * | getRouteStart (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 |
Definition at line 38 of file NBPTLine.h.
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.
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().
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().
void NBPTLine::deleteDuplicateStops | ( | ) |
Definition at line 300 of file NBPTLine.cpp.
References NBPTStop::getAreaID(), NBPTStop::getID(), getLineID(), NBPTStop::getName(), myPTStops, TL, toString(), and WRITE_WARNINGF.
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().
|
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().
|
inline |
Definition at line 51 of file NBPTLine.h.
References myName.
Referenced by NIXMLPTHandler::addPTLineRoute(), NIXMLPTHandler::addRoute(), and NBPTLineCont::constructRoute().
|
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().
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().
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().
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().
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().
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().
|
inline |
Definition at line 55 of file NBPTLine.h.
References myType.
Referenced by NBPTLineCont::fixBidiStops().
|
inline |
Definition at line 85 of file NBPTLine.h.
References myVClass.
Referenced by NBPTLineCont::fixPermissions().
|
inline |
Definition at line 106 of file NBPTLine.h.
References myWays.
Referenced by NBPTLineCont::constructRoute(), NBPTLineCont::findWay(), NBPTLineCont::reviseSingleWayStops(), and NBPTLineCont::reviseStops().
std::vector< long long int > * NBPTLine::getWaysNodes | ( | std::string | wayId | ) |
Definition at line 118 of file NBPTLine.cpp.
References myWaysNodes.
Referenced by NBPTLineCont::reviseStops().
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().
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().
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.
replace the given stop
Definition at line 255 of file NBPTLine.cpp.
References myPTStops.
Referenced by NBPTLineCont::findWay(), and NBPTLineCont::reviseStops().
|
inline |
Definition at line 70 of file NBPTLine.h.
References myPTStops.
Referenced by NBPTLineCont::fixBidiStops().
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().
void NBPTLine::setMyNumOfStops | ( | int | numStops | ) |
Definition at line 152 of file NBPTLine.cpp.
References myNumOfStops.
Referenced by NIXMLPTHandler::myEndElement(), and NIImporter_OpenStreetMap::RelationHandler::myEndElement().
|
inline |
Definition at line 102 of file NBPTLine.h.
References myName.
Referenced by NIXMLPTHandler::myStartElement().
void NBPTLine::write | ( | OutputDevice & | device | ) |
Definition at line 66 of file NBPTLine.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), RGBColor::isValid(), myColor, myInterval, myName, myNightService, myNumOfStops, myPTLineId, myPTStops, myRef, myRoute, myType, myVClass, OutputDevice::openTag(), SUMO_ATTR_COLOR, SUMO_ATTR_EDGES, SUMO_ATTR_ID, SUMO_ATTR_LINE, SUMO_ATTR_NAME, SUMO_ATTR_PERIOD, SUMO_ATTR_TYPE, SUMO_ATTR_VCLASS, SUMO_TAG_BUS_STOP, SUMO_TAG_PT_LINE, SUMO_TAG_ROUTE, toString(), and OutputDevice::writeAttr().
|
private |
Definition at line 122 of file NBPTLine.h.
Referenced by write().
|
private |
Definition at line 118 of file NBPTLine.h.
Referenced by addWayNode().
|
private |
Definition at line 125 of file NBPTLine.h.
Referenced by write().
|
private |
Definition at line 113 of file NBPTLine.h.
|
private |
Definition at line 127 of file NBPTLine.h.
Referenced by write().
|
private |
Definition at line 139 of file NBPTLine.h.
Referenced by setMyNumOfStops(), and write().
|
private |
Definition at line 119 of file NBPTLine.h.
Referenced by getLineID(), getRouteEnd(), getRouteStart(), and write().
|
private |
Definition at line 115 of file NBPTLine.h.
Referenced by addPTStop(), deleteDuplicateStops(), deleteInvalidStops(), getRouteEnd(), getRouteStart(), getStopEdges(), getStops(), replaceStop(), replaceStops(), and write().
|
private |
Definition at line 120 of file NBPTLine.h.
|
private |
Definition at line 134 of file NBPTLine.h.
Referenced by getRoute(), getRouteEnd(), getRouteStart(), isConsistent(), removeInvalidEdges(), replaceEdge(), setEdges(), and write().
|
private |
Definition at line 114 of file NBPTLine.h.
|
private |
Definition at line 128 of file NBPTLine.h.
Referenced by getVClass(), setEdges(), and write().
|
private |
Definition at line 117 of file NBPTLine.h.
Referenced by addWayNode(), and getWays().
|
private |
Definition at line 116 of file NBPTLine.h.
Referenced by addWayNode(), and getWaysNodes().