SUMO - Simulation of Urban MObility
NBPTStopCont Class Reference

#include <NBPTStopCont.h>

Collaboration diagram for NBPTStopCont:
Collaboration graph

Public Member Functions

void addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into)
 add edges that must be kept More...
 
void alignIdSigns ()
 
void assignLanes (NBEdgeCont &cont)
 
std::map< std::string, NBPTStop * >::const_iterator begin () const
 Returns the pointer to the begin of the stored pt stops. More...
 
std::map< std::string, NBPTStop * >::const_iterator end () const
 Returns the pointer to the end of the stored pt stops. More...
 
void findAccessEdgesForRailStops (NBEdgeCont &cont, double d, int i)
 
NBPTStopget (std::string id)
 Retrieve a previously inserted pt stop. More...
 
bool insert (NBPTStop *ptStop)
 Inserts a node into the map. More...
 
void localizePTStops (NBEdgeCont &cont)
 
void postprocess (std::set< std::string > &usedStops)
 
void reviseStops (NBEdgeCont &cont)
 revise pt stops and remove stops on non existing (removed) edges More...
 
int size () const
 Returns the number of pt stops stored in this container. More...
 
 ~NBPTStopCont ()
 

Static Public Member Functions

static NBEdgegetReverseEdge (NBEdge *edge)
 

Private Types

typedef std::map< std::string, NBPTStop * > PTStopsCont
 Definition of the map of names to pt stops. More...
 

Private Member Functions

NBPTStopassignAndCreatNewPTStopAsNeeded (NBPTStop *pStop, NBEdgeCont &cont)
 
void assignPTStopToEdgeOfClosestPlatform (NBPTStop *pStop, NBEdgeCont &cont)
 
double computeCrossProductEdgePosition (const NBEdge *edge, const Position *closestPlatform) const
 
NBPTPlatformgetClosestPlatformToPTStopPosition (NBPTStop *pStop)
 
NBPTStopgetReverseStop (NBPTStop *pStop, NBEdgeCont &cont)
 

Private Attributes

PTStopsCont myPTStops
 The map of names to pt stops. More...
 

Detailed Description

Definition at line 30 of file NBPTStopCont.h.

Member Typedef Documentation

◆ PTStopsCont

typedef std::map<std::string, NBPTStop*> NBPTStopCont::PTStopsCont
private

Definition of the map of names to pt stops.

Definition at line 84 of file NBPTStopCont.h.

Constructor & Destructor Documentation

◆ ~NBPTStopCont()

NBPTStopCont::~NBPTStopCont ( )

Definition at line 32 of file NBPTStopCont.cpp.

References myPTStops.

Member Function Documentation

◆ addEdges2Keep()

void NBPTStopCont::addEdges2Keep ( const OptionsCont oc,
std::set< std::string > &  into 
)

add edges that must be kept

Definition at line 276 of file NBPTStopCont.cpp.

References OptionsCont::isSet(), and myPTStops.

Referenced by NBRampsComputer::computeRamps(), end(), and NBNodeCont::removeUnwishedNodes().

◆ alignIdSigns()

void NBPTStopCont::alignIdSigns ( )

Definition at line 298 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBNetBuilder::compute().

◆ assignAndCreatNewPTStopAsNeeded()

◆ assignLanes()

void NBPTStopCont::assignLanes ( NBEdgeCont cont)

◆ assignPTStopToEdgeOfClosestPlatform()

◆ begin()

std::map<std::string, NBPTStop*>::const_iterator NBPTStopCont::begin ( ) const
inline

Returns the pointer to the begin of the stored pt stops.

Returns
The iterator to the beginning of stored pt stops

Definition at line 53 of file NBPTStopCont.h.

References myPTStops.

Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().

◆ computeCrossProductEdgePosition()

double NBPTStopCont::computeCrossProductEdgePosition ( const NBEdge edge,
const Position closestPlatform 
) const
private

◆ end()

std::map<std::string, NBPTStop*>::const_iterator NBPTStopCont::end ( ) const
inline

Returns the pointer to the end of the stored pt stops.

Returns
The iterator to the end of stored pt stops

Definition at line 61 of file NBPTStopCont.h.

References addEdges2Keep(), assignLanes(), findAccessEdgesForRailStops(), localizePTStops(), myPTStops, postprocess(), and reviseStops().

Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().

◆ findAccessEdgesForRailStops()

◆ get()

NBPTStop * NBPTStopCont::get ( std::string  id)

Retrieve a previously inserted pt stop.

Definition at line 53 of file NBPTStopCont.cpp.

References myPTStops.

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

◆ getClosestPlatformToPTStopPosition()

NBPTPlatform * NBPTStopCont::getClosestPlatformToPTStopPosition ( NBPTStop pStop)
private

◆ getReverseEdge()

◆ getReverseStop()

◆ insert()

bool NBPTStopCont::insert ( NBPTStop ptStop)

Inserts a node into the map.

Parameters
[in]stopThe pt stop to insert
Returns
Whether the pt stop could be added

Definition at line 41 of file NBPTStopCont.cpp.

References NBPTStop::getID(), and myPTStops.

Referenced by NIImporter_OpenStreetMap::insertEdge(), and localizePTStops().

◆ localizePTStops()

◆ postprocess()

void NBPTStopCont::postprocess ( std::set< std::string > &  usedStops)

Definition at line 286 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBNetBuilder::compute(), and end().

◆ reviseStops()

void NBPTStopCont::reviseStops ( NBEdgeCont cont)

revise pt stops and remove stops on non existing (removed) edges

Parameters
cont

Definition at line 262 of file NBPTStopCont.cpp.

References NBEdgeCont::getByID(), myPTStops, and WRITE_WARNING.

Referenced by end(), and NIImporter_OpenStreetMap::load().

◆ size()

int NBPTStopCont::size ( ) const
inline

Returns the number of pt stops stored in this container.

Definition at line 46 of file NBPTStopCont.h.

References myPTStops.

Field Documentation

◆ myPTStops

PTStopsCont NBPTStopCont::myPTStops
private

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