Eclipse SUMO - Simulation of Urban MObility
NBPTStopCont Class Reference

#include <NBPTStopCont.h>

Collaboration diagram for NBPTStopCont:

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...
 
int 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)
 
NBPTStopfindStop (const std::string &origEdgeID, Position pos, double threshold=1) const
 
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 27 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 90 of file NBPTStopCont.h.

Constructor & Destructor Documentation

◆ ~NBPTStopCont()

NBPTStopCont::~NBPTStopCont ( )

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

References OptionsCont::isSet(), and myPTStops.

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

◆ alignIdSigns()

void NBPTStopCont::alignIdSigns ( )

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

References myPTStops.

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

◆ cleanupDeleted()

int NBPTStopCont::cleanupDeleted ( NBEdgeCont cont)

remove stops on non existing (removed) edges

Parameters
cont

Definition at line 299 of file NBPTStopCont.cpp.

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

Referenced by NBNetBuilder::compute(), 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 57 of file NBPTStopCont.h.

References myPTStops.

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

◆ findAccessEdgesForRailStops()

◆ findStop()

NBPTStop * NBPTStopCont::findStop ( const std::string &  origEdgeID,
Position  pos,
double  threshold = 1 
) const

Definition at line 413 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBPTLineCont::findWay().

◆ generateBidiStops()

◆ get()

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

Retrieve a previously inserted pt stop.

Definition at line 50 of file NBPTStopCont.cpp.

References myPTStops.

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

◆ getClosestPlatformToPTStopPosition()

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

◆ getReverseEdge()

◆ getReverseID()

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

Definition at line 336 of file NBPTStopCont.cpp.

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

◆ getReverseStop()

◆ getStops()

const std::map<std::string, NBPTStop*>& NBPTStopCont::getStops ( ) const
inline

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

References NBPTStop::getID(), and myPTStops.

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

◆ localizePTStops()

◆ postprocess()

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

Definition at line 325 of file NBPTStopCont.cpp.

References myPTStops.

Referenced by NBNetBuilder::compute().

◆ size()

int NBPTStopCont::size ( ) const
inline

Returns the number of pt stops stored in this container.

Definition at line 43 of file NBPTStopCont.h.

References myPTStops.

Field Documentation

◆ myPTStops


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