![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The representation of a single pt stop. More...
#include <NBPTStop.h>
Public Member Functions | |
void | addAccess (std::string laneID, double offset, double length) |
void | addLine (const std::string &line) |
register line that services this stop (for displaying) More... | |
void | addPlatformCand (NBPTPlatform platform) |
void | clearAccess () |
remove all access definitions More... | |
bool | findLaneAndComputeBusStopExtent (const NBEdgeCont &ec) |
NBPTStop * | getBidiStop () const |
const std::string | getEdgeId () const |
std::string | getID () const |
bool | getIsMultipleStopPositions () const |
double | getLength () const |
const std::map< std::string, std::string > & | getMyAdditionalEdgeCandidates () const |
const std::string | getName () const |
const std::string | getOrigEdgeId () const |
SVCPermissions | getPermissions () const |
const std::vector< NBPTPlatform > & | getPlatformCands () |
const Position & | getPosition () const |
bool | isLoose () const |
NBPTStop (std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions) | |
Constructor. More... | |
void | registerAdditionalEdge (std::string wayId, std::string edgeId) |
void | reshiftPosition (const double offsetX, const double offsetY) |
void | setBidiStop (NBPTStop *bidiStop) |
bool | setEdgeId (std::string edgeId, const NBEdgeCont &ec) |
void | setIsMultipleStopPositions (bool multipleStopPositions) |
void | setMyOrigEdgeId (const std::string &myOrigEdgeId) |
void | setMyPTStopId (std::string id) |
void | setMyPTStopLength (double myPTStopLength) |
void | write (OutputDevice &device) |
Private Member Functions | |
void | computeExtent (double center, double d) |
NBPTStop & | operator= (const NBPTStop &) |
Invalidated assignment operator. More... | |
Private Attributes | |
std::vector< std::tuple< std::string, double, double > > | myAccesses |
laneId, lanePos, accessLength More... | |
std::map< std::string, std::string > | myAdditionalEdgeCandidates |
NBPTStop * | myBidiStop |
std::string | myEdgeId |
double | myEndPos |
bool | myIsLoose |
whether the stop was not part of the road network and must be mapped More... | |
bool | myIsMultipleStopPositions |
std::string | myLaneId |
std::vector< std::string > | myLines |
list of public transport lines (for displaying) More... | |
const std::string | myName |
std::string | myOrigEdgeId |
const SVCPermissions | myPermissions |
std::vector< NBPTPlatform > | myPlatformCands |
Position | myPosition |
std::string | myPTStopId |
double | myPTStopLength |
double | myStartPos |
The representation of a single pt stop.
Definition at line 44 of file NBPTStop.h.
NBPTStop::NBPTStop | ( | std::string | ptStopId, |
Position | position, | ||
std::string | edgeId, | ||
std::string | origEdgeId, | ||
double | length, | ||
std::string | name, | ||
SVCPermissions | svcPermissions | ||
) |
Constructor.
[in] | id | The id of the pt stop |
[in] | position | The position of the pt stop |
[in] | edgeId | The edge id of the pt stop |
[in] | length | The length of the pt stop |
Definition at line 33 of file NBPTStop.cpp.
void NBPTStop::addAccess | ( | std::string | laneID, |
double | offset, | ||
double | length | ||
) |
Definition at line 233 of file NBPTStop.cpp.
References SUMOXMLDefinitions::getEdgeIDFromLane(), and myAccesses.
Referenced by NIXMLPTHandler::addAccess().
void NBPTStop::addLine | ( | const std::string & | line | ) |
register line that services this stop (for displaying)
Definition at line 84 of file NBPTStop.cpp.
References StringUtils::escapeXML(), and myLines.
void NBPTStop::addPlatformCand | ( | NBPTPlatform | platform | ) |
Definition at line 137 of file NBPTStop.cpp.
References myPlatformCands.
Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().
void NBPTStop::clearAccess | ( | ) |
|
private |
Definition at line 77 of file NBPTStop.cpp.
References MAX2(), MIN2(), myEndPos, myPTStopLength, and myStartPos.
Referenced by findLaneAndComputeBusStopExtent().
bool NBPTStop::findLaneAndComputeBusStopExtent | ( | const NBEdgeCont & | ec | ) |
Definition at line 198 of file NBPTStop.cpp.
References computeExtent(), NBEdgeCont::getByID(), NBEdge::getLaneID(), NBEdge::getLanes(), NBEdge::getLaneShape(), NBEdge::getLength(), NBEdge::getLoadedLength(), getPermissions(), getPosition(), myEdgeId, myLaneId, and PositionVector::nearest_offset_to_point2D().
Referenced by NBPTStopCont::assignLanes(), NBPTStopCont::generateBidiStops(), and setEdgeId().
|
inline |
Definition at line 86 of file NBPTStop.h.
References myBidiStop.
Referenced by NBPTLineCont::fixBidiStops().
const std::string NBPTStop::getEdgeId | ( | ) | const |
Definition at line 59 of file NBPTStop.cpp.
References myEdgeId.
Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), NBPTLineCont::getCost(), and NBPTStopCont::getReverseStop().
std::string NBPTStop::getID | ( | ) | const |
Definition at line 48 of file NBPTStop.cpp.
References myPTStopId.
Referenced by NBPTLineCont::findWay(), NBPTLineCont::fixBidiStops(), NBPTStopCont::generateBidiStops(), NBPTStopCont::getReverseStop(), and NBPTStopCont::insert().
bool NBPTStop::getIsMultipleStopPositions | ( | ) | const |
Definition at line 149 of file NBPTStop.cpp.
References myIsMultipleStopPositions.
Referenced by NBPTStopCont::localizePTStops().
double NBPTStop::getLength | ( | ) | const |
Definition at line 161 of file NBPTStop.cpp.
References myPTStopLength.
Referenced by NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().
const std::map< std::string, std::string > & NBPTStop::getMyAdditionalEdgeCandidates | ( | ) | const |
Definition at line 180 of file NBPTStop.cpp.
References myAdditionalEdgeCandidates.
Referenced by NBPTLineCont::findWay().
const std::string NBPTStop::getName | ( | ) | const |
Definition at line 65 of file NBPTStop.cpp.
References myName.
Referenced by NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().
const std::string NBPTStop::getOrigEdgeId | ( | ) | const |
Definition at line 53 of file NBPTStop.cpp.
References myOrigEdgeId.
Referenced by NBPTLineCont::findWay(), and NBPTStopCont::generateBidiStops().
SVCPermissions NBPTStop::getPermissions | ( | ) | const |
Definition at line 131 of file NBPTStop.cpp.
References myPermissions.
Referenced by findLaneAndComputeBusStopExtent(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), and NBPTStopCont::getReverseStop().
const std::vector< NBPTPlatform > & NBPTStop::getPlatformCands | ( | ) |
Definition at line 143 of file NBPTStop.cpp.
References myPlatformCands.
Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::getClosestPlatformToPTStopPosition(), and NBPTStopCont::localizePTStops().
const Position & NBPTStop::getPosition | ( | ) | const |
Definition at line 71 of file NBPTStop.cpp.
References myPosition.
Referenced by findLaneAndComputeBusStopExtent(), NBPTLineCont::findWay(), NBPTStopCont::generateBidiStops(), NBPTStopCont::getClosestPlatformToPTStopPosition(), and NBPTStopCont::getReverseStop().
|
inline |
Definition at line 90 of file NBPTStop.h.
References myIsLoose.
Referenced by NBPTLineCont::findWay().
void NBPTStop::registerAdditionalEdge | ( | std::string | wayId, |
std::string | edgeId | ||
) |
Definition at line 174 of file NBPTStop.cpp.
References myAdditionalEdgeCandidates.
Referenced by NIImporter_OpenStreetMap::insertEdge().
void NBPTStop::reshiftPosition | ( | const double | offsetX, |
const double | offsetY | ||
) |
Definition at line 122 of file NBPTStop.cpp.
References Position::add(), myPlatformCands, and myPosition.
|
inline |
Definition at line 82 of file NBPTStop.h.
References myBidiStop.
Referenced by NBPTStopCont::generateBidiStops().
bool NBPTStop::setEdgeId | ( | std::string | edgeId, |
const NBEdgeCont & | ec | ||
) |
Definition at line 167 of file NBPTStop.cpp.
References findLaneAndComputeBusStopExtent(), and myEdgeId.
Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), and NBPTLineCont::findWay().
void NBPTStop::setIsMultipleStopPositions | ( | bool | multipleStopPositions | ) |
Definition at line 155 of file NBPTStop.cpp.
References myIsMultipleStopPositions.
Referenced by NIImporter_OpenStreetMap::RelationHandler::myEndElement().
void NBPTStop::setMyOrigEdgeId | ( | const std::string & | myOrigEdgeId | ) |
Definition at line 186 of file NBPTStop.cpp.
References myOrigEdgeId.
Referenced by NBPTLineCont::findWay().
void NBPTStop::setMyPTStopId | ( | std::string | id | ) |
Definition at line 223 of file NBPTStop.cpp.
References myPTStopId.
void NBPTStop::setMyPTStopLength | ( | double | myPTStopLength | ) |
Definition at line 192 of file NBPTStop.cpp.
References myPTStopLength.
Referenced by NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), and NBPTStopCont::assignPTStopToEdgeOfClosestPlatform().
void NBPTStop::write | ( | OutputDevice & | device | ) |
Definition at line 93 of file NBPTStop.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), myAccesses, myEndPos, myLaneId, myLines, myName, myPTStopId, myStartPos, OutputDevice::openTag(), SUMO_ATTR_ENDPOS, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_LENGTH, SUMO_ATTR_LINES, SUMO_ATTR_NAME, SUMO_ATTR_POSITION, SUMO_ATTR_STARTPOS, SUMO_TAG_ACCESS, SUMO_TAG_BUS_STOP, toString(), and OutputDevice::writeAttr().
|
private |
laneId, lanePos, accessLength
Definition at line 121 of file NBPTStop.h.
Referenced by addAccess(), clearAccess(), and write().
|
private |
Definition at line 101 of file NBPTStop.h.
Referenced by getMyAdditionalEdgeCandidates(), and registerAdditionalEdge().
|
private |
Definition at line 126 of file NBPTStop.h.
Referenced by getBidiStop(), and setBidiStop().
|
private |
Definition at line 100 of file NBPTStop.h.
Referenced by findLaneAndComputeBusStopExtent(), getEdgeId(), and setEdgeId().
|
private |
Definition at line 118 of file NBPTStop.h.
Referenced by computeExtent(), and write().
|
private |
whether the stop was not part of the road network and must be mapped
Definition at line 129 of file NBPTStop.h.
Referenced by isLoose().
|
private |
Definition at line 137 of file NBPTStop.h.
Referenced by getIsMultipleStopPositions(), and setIsMultipleStopPositions().
|
private |
Definition at line 114 of file NBPTStop.h.
Referenced by findLaneAndComputeBusStopExtent(), and write().
|
private |
list of public transport lines (for displaying)
Definition at line 124 of file NBPTStop.h.
|
private |
Definition at line 113 of file NBPTStop.h.
|
private |
Definition at line 105 of file NBPTStop.h.
Referenced by getOrigEdgeId(), and setMyOrigEdgeId().
|
private |
Definition at line 115 of file NBPTStop.h.
Referenced by getPermissions().
|
private |
Definition at line 136 of file NBPTStop.h.
Referenced by addPlatformCand(), getPlatformCands(), and reshiftPosition().
|
private |
Definition at line 99 of file NBPTStop.h.
Referenced by getPosition(), and reshiftPosition().
|
private |
Definition at line 98 of file NBPTStop.h.
Referenced by getID(), setMyPTStopId(), and write().
|
private |
Definition at line 109 of file NBPTStop.h.
Referenced by computeExtent(), getLength(), and setMyPTStopLength().
|
private |
Definition at line 117 of file NBPTStop.h.
Referenced by computeExtent(), and write().