Eclipse SUMO - Simulation of Urban MObility
NBTypeCont Class Reference

A storage for available edgeTypes of edges. More...

#include <NBTypeCont.h>

Collaboration diagram for NBTypeCont:
[legend]

Data Structures

struct  EdgeTypeDefinition
 edgeType definition More...
 
struct  LaneTypeDefinition
 laneType definition More...
 

Public Member Functions

Type-dependant Retrieval methods
int getEdgeTypeNumLanes (const std::string &edgeType) const
 Returns the number of lanes for the given edgeType. More...
 
double getEdgeTypeSpeed (const std::string &edgeType) const
 Returns the maximal velocity for the given edgeType [m/s]. More...
 
double getEdgeTypeFriction (const std::string &edgeType) const
 Returns the default friction for the given edgeType [-]. More...
 
int getEdgeTypePriority (const std::string &edgeType) const
 Returns the priority for the given edgeType. More...
 
bool getEdgeTypeIsOneWay (const std::string &edgeType) const
 Returns whether edges are one-way per default for the given edgeType. More...
 
bool getEdgeTypeShallBeDiscarded (const std::string &edgeType) const
 Returns the information whether edges of this edgeType shall be discarded. More...
 
double getEdgeTypeWidthResolution (const std::string &edgeType) const
 Returns the resolution for interpreting edge/lane widths of the given edgeType. More...
 
double getEdgeTypeMaxWidth (const std::string &edgeType) const
 Returns the maximum edge/lane widths of the given edgeType. More...
 
double getEdgeTypeMinWidth (const std::string &edgeType) const
 Returns the minimum edge/lane widths of the given edgeType. More...
 
bool wasSetEdgeTypeAttribute (const std::string &edgeType, const SumoXMLAttr attr) const
 Returns whether an attribute of a edgeType was set. More...
 
SVCPermissions getEdgeTypePermissions (const std::string &edgeType) const
 Returns allowed vehicle classes for the given edgeType. More...
 
LaneSpreadFunction getEdgeTypeSpreadType (const std::string &edgeType) const
 Returns spreadType for the given edgeType. More...
 
double getEdgeTypeWidth (const std::string &edgeType) const
 Returns the lane width for the given edgeType [m]. More...
 
double getEdgeTypeSidewalkWidth (const std::string &edgeType) const
 Returns the lane width for a sidewalk to be added [m]. More...
 
double getEdgeTypeBikeLaneWidth (const std::string &edgeType) const
 Returns the lane width for a bike lane to be added [m]. More...
 

Protected Attributes

EdgeTypeDefinitionmyDefaultType
 The default edgeType. More...
 
TypesCont myEdgeTypes
 The container of edgeTypes. More...
 

Private Member Functions

 NBTypeCont (const NBTypeCont &s)=delete
 invalid copy constructor More...
 
NBTypeContoperator= (const NBTypeCont &s)=delete
 invalid assignment operator More...
 

struct declaration

typedef std::map< std::string, EdgeTypeDefinition * > TypesCont
 A container of edgeTypes, accessed by the string id. More...
 
 NBTypeCont ()
 Constructor. More...
 
 ~NBTypeCont ()
 Destructor. More...
 
void clearTypes ()
 clear types More...
 
void setEdgeTypeDefaults (int defaultNumLanes, double defaultLaneWidth, double defaultSpeed, double defaultFriction, int defaultPriority, SVCPermissions defaultPermissions, LaneSpreadFunction defaultSpreadType)
 Sets the default values. More...
 
void insertEdgeType (const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, LaneSpreadFunction spreadType, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth, double widthResolution, double maxWidth, double minWidth)
 Adds a edgeType into the list. More...
 
void insertEdgeType (const std::string &id, const EdgeTypeDefinition *edgeType)
 Adds a edgeType into the list. More...
 
void insertLaneType (const std::string &edgeTypeID, int index, double maxSpeed, SVCPermissions permissions, double width, const std::set< SumoXMLAttr > &attrs)
 Adds a laneType into the list. More...
 
int size () const
 Returns the number of known edgeTypes. More...
 
void removeEdgeType (const std::string &id)
 Remove a edgeType from the list. More...
 
void updateEdgeTypeID (const std::string &oldId, const std::string &newId)
 change edge type ID More...
 
TypesCont::const_iterator begin () const
 return begin iterator More...
 
TypesCont::const_iterator end () const
 return end iterator More...
 
bool knows (const std::string &edgeType) const
 Returns whether the named edgeType is in the container. More...
 
const EdgeTypeDefinitiongetEdgeType (const std::string &name) const
 Retrieve the name or the default edgeType. More...
 
bool markEdgeTypeAsToDiscard (const std::string &id)
 Marks a edgeType as to be discarded. More...
 
bool markEdgeTypeAsSet (const std::string &id, const SumoXMLAttr attr)
 Marks an attribute of a edgeType as set. More...
 
bool addEdgeTypeRestriction (const std::string &id, const SUMOVehicleClass svc, const double speed)
 Adds a restriction to a edgeType. More...
 
bool copyEdgeTypeRestrictionsAndAttrs (const std::string &fromId, const std::string &toId)
 Copy restrictions to a edgeType. More...
 
bool markLaneTypeAsSet (const std::string &id, int index, const SumoXMLAttr attr)
 Marks an attribute of last laneType as set. More...
 
bool addLaneTypeRestriction (const std::string &id, const SUMOVehicleClass svc, const double speed)
 Adds a restriction to last laneType. More...
 
void writeEdgeTypes (OutputDevice &into, const std::set< std::string > &typeIDs=std::set< std::string >()) const
 writes all EdgeTypes (and their lanes) as XML More...
 

Detailed Description

A storage for available edgeTypes of edges.

NBTypeCont stores properties of edge-types of edges. Additionally, a default edgeType is stored which is used if no edgeType information is given.

This structure also contains a structure for determining node edgeTypes using edge speeds.

Definition at line 52 of file NBTypeCont.h.

Member Typedef Documentation

◆ TypesCont

typedef std::map<std::string, EdgeTypeDefinition*> NBTypeCont::TypesCont

A container of edgeTypes, accessed by the string id.

Definition at line 162 of file NBTypeCont.h.

Constructor & Destructor Documentation

◆ NBTypeCont() [1/2]

NBTypeCont::NBTypeCont ( )

Constructor.

Definition at line 163 of file NBTypeCont.cpp.

◆ ~NBTypeCont()

NBTypeCont::~NBTypeCont ( )

Destructor.

Definition at line 167 of file NBTypeCont.cpp.

References clearTypes(), and myDefaultType.

◆ NBTypeCont() [2/2]

NBTypeCont::NBTypeCont ( const NBTypeCont s)
privatedelete

invalid copy constructor

Member Function Documentation

◆ addEdgeTypeRestriction()

bool NBTypeCont::addEdgeTypeRestriction ( const std::string &  id,
const SUMOVehicleClass  svc,
const double  speed 
)

Adds a restriction to a edgeType.

Parameters
[in]idThe id of the edgeType
[in]svcThe vehicle class the restriction refers to
[in]speedThe restricted speed

Definition at line 331 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIXMLTypesHandler::myStartElement().

Here is the caller graph for this function:

◆ addLaneTypeRestriction()

bool NBTypeCont::addLaneTypeRestriction ( const std::string &  id,
const SUMOVehicleClass  svc,
const double  speed 
)

Adds a restriction to last laneType.

Parameters
[in]idThe id of the edgeType parent
[in]svcThe vehicle class the restriction refers to
[in]speedThe restricted speed

Definition at line 366 of file NBTypeCont.cpp.

References myEdgeTypes.

◆ begin()

NBTypeCont::TypesCont::const_iterator NBTypeCont::begin ( ) const

return begin iterator

Definition at line 291 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NGEdge::buildNBEdge().

Here is the caller graph for this function:

◆ clearTypes()

void NBTypeCont::clearTypes ( )

clear types

Definition at line 174 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by GNENet::saveEdgeTypes(), GNENet::saveNetwork(), and ~NBTypeCont().

Here is the caller graph for this function:

◆ copyEdgeTypeRestrictionsAndAttrs()

bool NBTypeCont::copyEdgeTypeRestrictionsAndAttrs ( const std::string &  fromId,
const std::string &  toId 
)

Copy restrictions to a edgeType.

Parameters
[in]fromIdThe id of the source edgeType
[in]toIdThe id of the destination edgeType

Definition at line 342 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ end()

NBTypeCont::TypesCont::const_iterator NBTypeCont::end ( ) const

return end iterator

Definition at line 297 of file NBTypeCont.cpp.

References myEdgeTypes.

◆ getEdgeType()

const NBTypeCont::EdgeTypeDefinition * NBTypeCont::getEdgeType ( const std::string &  name) const

Retrieve the name or the default edgeType.

If no name is given, the default edgeType is returned

Parameters
[in]nameThe name of the edgeType to retrieve
Returns
The named edgeType

Definition at line 582 of file NBTypeCont.cpp.

References myDefaultType, and myEdgeTypes.

Referenced by NIXMLEdgesHandler::addEdge(), getEdgeTypeBikeLaneWidth(), getEdgeTypeFriction(), getEdgeTypeIsOneWay(), getEdgeTypeMaxWidth(), getEdgeTypeMinWidth(), getEdgeTypeNumLanes(), getEdgeTypePermissions(), getEdgeTypePriority(), getEdgeTypeShallBeDiscarded(), getEdgeTypeSidewalkWidth(), getEdgeTypeSpeed(), getEdgeTypeSpreadType(), getEdgeTypeWidth(), getEdgeTypeWidthResolution(), and wasSetEdgeTypeAttribute().

Here is the caller graph for this function:

◆ getEdgeTypeBikeLaneWidth()

double NBTypeCont::getEdgeTypeBikeLaneWidth ( const std::string &  edgeType) const

Returns the lane width for a bike lane to be added [m].

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the width for
Returns
The width of lanes of edges of this edgeType

Definition at line 576 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::bikeLaneWidth, and getEdgeType().

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenStreetMap::insertEdge(), NIXMLTypesHandler::myStartElement(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeFriction()

double NBTypeCont::getEdgeTypeFriction ( const std::string &  edgeType) const

Returns the default friction for the given edgeType [-].

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the speed for
Returns
The friction on edges of this edgeType

Definition at line 508 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::friction, and getEdgeType().

Referenced by NIXMLEdgesHandler::addEdge().

Here is the caller graph for this function:

◆ getEdgeTypeIsOneWay()

bool NBTypeCont::getEdgeTypeIsOneWay ( const std::string &  edgeType) const

Returns whether edges are one-way per default for the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the one-way information for
Returns
Whether edges of this edgeType are one-way per default
Todo:
There is no default for one-way!?

Definition at line 520 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::oneWay.

Referenced by NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIXMLTypesHandler::myStartElement(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeMaxWidth()

double NBTypeCont::getEdgeTypeMaxWidth ( const std::string &  edgeType) const

Returns the maximum edge/lane widths of the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the maximum width for
Returns
The maximum width on edges of this edgeType

Definition at line 536 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::maxWidth.

Referenced by NIXMLTypesHandler::myStartElement(), and NIImporter_OpenDrive::setLaneAttributes().

Here is the caller graph for this function:

◆ getEdgeTypeMinWidth()

double NBTypeCont::getEdgeTypeMinWidth ( const std::string &  edgeType) const

Returns the minimum edge/lane widths of the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the maximum width for
Returns
The minimum width on edges of this edgeType

Definition at line 541 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::minWidth.

Referenced by NIXMLTypesHandler::myStartElement().

Here is the caller graph for this function:

◆ getEdgeTypeNumLanes()

int NBTypeCont::getEdgeTypeNumLanes ( const std::string &  edgeType) const

Returns the number of lanes for the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the lane number for
Returns
The number of lanes an edge of this edgeType has

Definition at line 497 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::laneTypeDefinitions.

Referenced by NIXMLEdgesHandler::addEdge(), NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIXMLTypesHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypePermissions()

SVCPermissions NBTypeCont::getEdgeTypePermissions ( const std::string &  edgeType) const

Returns allowed vehicle classes for the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the list of allowed vehicles classes for
Returns
List of vehicles class which may use edges of the given edgeType

Definition at line 552 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::permissions.

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenDrive::OpenDriveLaneSection::buildAttributeChanges(), NGEdge::buildNBEdge(), NIImporter_OpenDrive::OpenDriveLane::computePermission(), NIImporter_OpenStreetMap::extendRailwayDistances(), NIImporter_OpenDrive::findWidthSplit(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIXMLTypesHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), NIImporter_OpenDrive::setLaneAttributes(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypePriority()

int NBTypeCont::getEdgeTypePriority ( const std::string &  edgeType) const

Returns the priority for the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the priority for
Returns
The priority of edges of this edgeType

Definition at line 514 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::priority.

Referenced by NIXMLEdgesHandler::addEdge(), NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NIXMLTypesHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeShallBeDiscarded()

bool NBTypeCont::getEdgeTypeShallBeDiscarded ( const std::string &  edgeType) const

Returns the information whether edges of this edgeType shall be discarded.

Returns false if the edgeType is not known.

Parameters
[in]edgeTypeThe id of the edgeType
Returns
Whether edges of this edgeType shall be discarded.

Definition at line 526 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::discard, and getEdgeType().

Referenced by NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping(), NIImporter_OpenDrive::findWidthSplit(), NBEdgeCont::ignoreFilterMatch(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeSidewalkWidth()

double NBTypeCont::getEdgeTypeSidewalkWidth ( const std::string &  edgeType) const

Returns the lane width for a sidewalk to be added [m].

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the width for
Returns
The width of lanes of edges of this edgeType

Definition at line 570 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::sidewalkWidth.

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenStreetMap::insertEdge(), NIXMLTypesHandler::myStartElement(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeSpeed()

double NBTypeCont::getEdgeTypeSpeed ( const std::string &  edgeType) const

Returns the maximal velocity for the given edgeType [m/s].

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the speed for
Returns
The allowed speed on edges of this edgeType

Definition at line 503 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::speed.

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenDrive::OpenDriveLaneSection::buildAttributeChanges(), NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIXMLTypesHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), NIImporter_OpenDrive::setLaneAttributes(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeSpreadType()

LaneSpreadFunction NBTypeCont::getEdgeTypeSpreadType ( const std::string &  edgeType) const

Returns spreadType for the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the spread type
Returns
spread type which may use edges of the given edgeType

Definition at line 558 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::spreadType.

Referenced by NIXMLEdgesHandler::addEdge(), NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeWidth()

double NBTypeCont::getEdgeTypeWidth ( const std::string &  edgeType) const

Returns the lane width for the given edgeType [m].

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the width for
Returns
The width of lanes of edges of this edgeType

Definition at line 564 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::width.

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenDrive::buildConnectionsToOuter(), NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NIXMLTypesHandler::myStartElement(), NIImporter_OpenDrive::setLaneAttributes(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ getEdgeTypeWidthResolution()

double NBTypeCont::getEdgeTypeWidthResolution ( const std::string &  edgeType) const

Returns the resolution for interpreting edge/lane widths of the given edgeType.

If the named edgeType is not known, the default is returned

Parameters
[in]edgeTypeThe name of the edgeType to return the width resolution for
Returns
The width resolution on edges of this edgeType

Definition at line 531 of file NBTypeCont.cpp.

References getEdgeType(), and NBTypeCont::EdgeTypeDefinition::widthResolution.

Referenced by NIXMLTypesHandler::myStartElement(), and NIImporter_OpenDrive::setLaneAttributes().

Here is the caller graph for this function:

◆ insertEdgeType() [1/2]

void NBTypeCont::insertEdgeType ( const std::string &  id,
const EdgeTypeDefinition edgeType 
)

Adds a edgeType into the list.

Parameters
[in]idThe id of the edgeType
[in]edgeTypepointer to EdgeTypeDefinition (for copying parameters)

Definition at line 226 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::attrs, myEdgeTypes, and NBTypeCont::EdgeTypeDefinition::restrictions.

◆ insertEdgeType() [2/2]

void NBTypeCont::insertEdgeType ( const std::string &  id,
int  numLanes,
double  maxSpeed,
int  prio,
SVCPermissions  permissions,
LaneSpreadFunction  spreadType,
double  width,
bool  oneWayIsDefault,
double  sidewalkWidth,
double  bikeLaneWidth,
double  widthResolution,
double  maxWidth,
double  minWidth 
)

Adds a edgeType into the list.

Parameters
[in]idThe id of the edgeType
[in]numLanesThe number of lanes an edge of this edgeType has
[in]maxSpeedThe speed allowed on an edge of this edgeType
[in]prioThe priority of an edge of this edgeType
[in]permissionsThe encoding of vehicle classes allowed on an edge of this edgeType
[in]spreadTypeDefines how to compute the lane geometry from the edge geometry (right, center or roadCenter)
[in]widthThe width of lanes of edgesof this edgeType
[in]oneWayIsDefaultWhether edges of this edgeType are one-way per default
Returns
Whether the edgeType could be added (no edgeType with the same id existed)

Definition at line 204 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::attrs, myEdgeTypes, NBTypeCont::EdgeTypeDefinition::restrictions, and NBEdge::UNSPECIFIED_FRICTION.

Referenced by NIXMLTypesHandler::myStartElement(), NIImporter_VISUM::parse_Types(), GNENet::saveEdgeTypes(), GNENet::saveNetwork(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ insertLaneType()

void NBTypeCont::insertLaneType ( const std::string &  edgeTypeID,
int  index,
double  maxSpeed,
SVCPermissions  permissions,
double  width,
const std::set< SumoXMLAttr > &  attrs 
)

Adds a laneType into the list.

Parameters
[in]maxSpeedThe speed allowed on an lane of this edgeType
[in]prioThe priority of an lane of this edgeType
[in]permissionsThe encoding of vehicle classes allowed on an lane of this edgeType
[in]widthThe width of lane of this edgeType
[in]attrsenabled attributes

Definition at line 243 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::laneTypeDefinitions, myEdgeTypes, and NBEdge::UNSPECIFIED_FRICTION.

Referenced by NIXMLTypesHandler::myStartElement(), GNENet::saveEdgeTypes(), and GNENet::saveNetwork().

Here is the caller graph for this function:

◆ knows()

bool NBTypeCont::knows ( const std::string &  edgeType) const

Returns whether the named edgeType is in the container.

Returns
Whether the named edgeType is known

Definition at line 303 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIXMLEdgesHandler::addEdge(), NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping(), NIImporter_OpenDrive::findWidthSplit(), NBEdgeCont::ignoreFilterMatch(), NIImporter_ArcView::load(), NIXMLTypesHandler::myStartElement(), and NIImporter_OpenStreetMap::usableType().

Here is the caller graph for this function:

◆ markEdgeTypeAsSet()

bool NBTypeCont::markEdgeTypeAsSet ( const std::string &  id,
const SumoXMLAttr  attr 
)

Marks an attribute of a edgeType as set.

Parameters
[in]idThe id of the edgeType
[in]attrThe id of the attribute

Definition at line 320 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIXMLTypesHandler::myStartElement(), and NIImporter_VISUM::parse_Types().

Here is the caller graph for this function:

◆ markEdgeTypeAsToDiscard()

bool NBTypeCont::markEdgeTypeAsToDiscard ( const std::string &  id)

Marks a edgeType as to be discarded.

Parameters
[in]idThe id of the edgeType

Definition at line 309 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIXMLTypesHandler::myStartElement().

Here is the caller graph for this function:

◆ markLaneTypeAsSet()

bool NBTypeCont::markLaneTypeAsSet ( const std::string &  id,
int  index,
const SumoXMLAttr  attr 
)

Marks an attribute of last laneType as set.

Parameters
[in]idThe id of the edgeType parent
[in]attrThe id of the attribute

Definition at line 355 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NIXMLTypesHandler::myStartElement().

Here is the caller graph for this function:

◆ operator=()

NBTypeCont& NBTypeCont::operator= ( const NBTypeCont s)
privatedelete

invalid assignment operator

◆ removeEdgeType()

void NBTypeCont::removeEdgeType ( const std::string &  id)

Remove a edgeType from the list.

Parameters
[in]idThe id of the edgeType
Returns
Whether the edgeType could be added (no edgeType with the same id existed)

Definition at line 261 of file NBTypeCont.cpp.

References myEdgeTypes.

◆ setEdgeTypeDefaults()

void NBTypeCont::setEdgeTypeDefaults ( int  defaultNumLanes,
double  defaultLaneWidth,
double  defaultSpeed,
double  defaultFriction,
int  defaultPriority,
SVCPermissions  defaultPermissions,
LaneSpreadFunction  defaultSpreadType 
)

Sets the default values.

Parameters
[in]defaultNumLanesThe default number of lanes an edge has
[in]defaultLaneWidthThe default width of lanes
[in]defaultSpeedThe default speed allowed on an edge
[in]defaultFrictionThe default friction on an edge
[in]defaultPriorityThe default priority of an edge
[in]defaultPermissionsThe default permissions of an edge
[in]defaultSpreadTypeThe default lane spread type of an edge

Definition at line 185 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::friction, NBTypeCont::EdgeTypeDefinition::laneTypeDefinitions, myDefaultType, NBTypeCont::EdgeTypeDefinition::permissions, NBTypeCont::EdgeTypeDefinition::priority, NBTypeCont::EdgeTypeDefinition::speed, NBTypeCont::EdgeTypeDefinition::spreadType, and NBTypeCont::EdgeTypeDefinition::width.

Referenced by NBNetBuilder::applyOptions().

Here is the caller graph for this function:

◆ size()

int NBTypeCont::size ( ) const

Returns the number of known edgeTypes.

Returns
The number of known edge edgeTypes (excluding the default)

Definition at line 255 of file NBTypeCont.cpp.

References myEdgeTypes.

Referenced by NGEdge::buildNBEdge(), NILoader::load(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GNEApplicationWindow::onCmdReloadEdgeTypes(), and NWWriter_XML::writeNetwork().

Here is the caller graph for this function:

◆ updateEdgeTypeID()

void NBTypeCont::updateEdgeTypeID ( const std::string &  oldId,
const std::string &  newId 
)

change edge type ID

Parameters
[in]oldIDThe old id of the edgeType
[in]newIDThe new id of the edgeType

Definition at line 274 of file NBTypeCont.cpp.

References myEdgeTypes.

◆ wasSetEdgeTypeAttribute()

bool NBTypeCont::wasSetEdgeTypeAttribute ( const std::string &  edgeType,
const SumoXMLAttr  attr 
) const

Returns whether an attribute of a edgeType was set.

Parameters
[in]edgeTypeThe id of the edgeType
[in]attrThe id of the attribute
Returns
Whether the attribute was set

Definition at line 546 of file NBTypeCont.cpp.

References NBTypeCont::EdgeTypeDefinition::attrs, and getEdgeType().

◆ writeEdgeTypes()

Field Documentation

◆ myDefaultType

EdgeTypeDefinition* NBTypeCont::myDefaultType
protected

The default edgeType.

Definition at line 437 of file NBTypeCont.h.

Referenced by getEdgeType(), setEdgeTypeDefaults(), and ~NBTypeCont().

◆ myEdgeTypes


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