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...
 
void cleanupDeleted (NBEdgeCont &cont)
 remove stops on non existing (removed) edges 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 maxRadius, int maxCount, double accessFactor)
 
int generateBidiStops (NBEdgeCont &cont)
 duplicate stops for superposed rail edges and return the number of generated stops More...
 
NBPTStopget (std::string id)
 Retrieve a previously inserted pt stop. More...
 
const std::map< std::string, NBPTStop * > & getStops () const
 
bool insert (NBPTStop *ptStop)
 Inserts a node into the map. More...
 
void localizePTStops (NBEdgeCont &cont)
 
void postprocess (std::set< std::string > &usedStops)
 
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
 
const NBPTPlatformgetClosestPlatformToPTStopPosition (NBPTStop *pStop)
 
NBPTStopgetReverseStop (NBPTStop *pStop, NBEdgeCont &cont)
 

Static Private Member Functions

static std::string getReverseID (const std::string &id)
 

Private Attributes

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

Detailed Description

Definition at line 28 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 89 of file NBPTStopCont.h.

Constructor & Destructor Documentation

◆ ~NBPTStopCont()

NBPTStopCont::~NBPTStopCont ( )

Definition at line 30 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 314 of file NBPTStopCont.cpp.

References OptionsCont::isSet(), and myPTStops.

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

◆ alignIdSigns()

void NBPTStopCont::alignIdSigns ( )

Definition at line 340 of file NBPTStopCont.cpp.

References getReverseID(), and 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 51 of file NBPTStopCont.h.

References myPTStops.

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

◆ cleanupDeleted()

void NBPTStopCont::cleanupDeleted ( NBEdgeCont cont)

remove stops on non existing (removed) edges

Parameters
cont

Definition at line 300 of file NBPTStopCont.cpp.

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

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

◆ 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 58 of file NBPTStopCont.h.

References myPTStops.

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

◆ findAccessEdgesForRailStops()

◆ generateBidiStops()

◆ get()

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

Retrieve a previously inserted pt stop.

Definition at line 51 of file NBPTStopCont.cpp.

References myPTStops.

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

◆ getClosestPlatformToPTStopPosition()

const NBPTPlatform * NBPTStopCont::getClosestPlatformToPTStopPosition ( NBPTStop pStop)
private

◆ getReverseEdge()

◆ getReverseID()

std::string NBPTStopCont::getReverseID ( const std::string &  id)
staticprivate

Definition at line 335 of file NBPTStopCont.cpp.

Referenced by alignIdSigns(), generateBidiStops(), and getReverseStop().

◆ getReverseStop()

◆ getStops()

◆ 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 39 of file NBPTStopCont.cpp.

References NBPTStop::getID(), and myPTStops.

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

◆ localizePTStops()

◆ postprocess()

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

Definition at line 324 of file NBPTStopCont.cpp.

References myPTStops.

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

◆ size()

int NBPTStopCont::size ( ) const
inline

Returns the number of pt stops stored in this container.

Definition at line 44 of file NBPTStopCont.h.

References myPTStops.

Field Documentation

◆ myPTStops


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