Eclipse SUMO - Simulation of Urban MObility
|
Derivation of NLEdgeControlBuilder which builds gui-edges. More...
#include <GUIEdgeControlBuilder.h>
Public Member Functions | |
virtual void | addCrossingEdges (const std::vector< std::string > &) |
add the crossingEdges in a crossing edge if present | |
MSLane * | addLane (const std::string &id, double maxSpeed, double friction, double length, const PositionVector &shape, double width, SVCPermissions permissions, SVCPermissions changeLeft, SVCPermissions changeRight, int index, bool isRampAccel, const std::string &type, const PositionVector &outlineShape) override |
Builds and adds a lane. | |
virtual void | addNeigh (const std::string id) |
Adds a neighbor to the current lane. | |
void | addStopOffsets (const StopOffset &stopOffsets) |
process a stopOffset element (originates either from the active edge or lane). | |
void | beginEdgeParsing (const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority, const std::string &bidi, double distance) |
Begins building of an MSEdge. | |
MSEdgeControl * | build (const MMVersion &networkVersion) |
builds the MSEdgeControl-class which holds all edges | |
MSEdge * | buildEdge (const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, const int priority, const double distance) override |
Builds an edge instance (GUIEdge in this case) | |
virtual MSEdge * | closeEdge () |
Closes the building of an edge; The edge is completely described by now and may not be opened again. | |
void | closeLane () |
Closes the building of a lane; The edge is completely described by now and may not be opened again. | |
GUIEdgeControlBuilder () | |
Constructor. | |
std::string | reportCurrentEdgeOrLane () const |
Return info about currently processed edge or lane. | |
~GUIEdgeControlBuilder () | |
Destructor. | |
Protected Member Functions | |
void | applyDefaultStopOffsetsToLanes () |
void | setDefaultStopOffset (const StopOffset &stopOffset) |
set the stopOffset for the last added lane. | |
void | updateCurrentLaneStopOffset (const StopOffset &stopOffset) |
set the stopOffset for the last added lane. | |
Protected Attributes | |
MSEdge * | myActiveEdge |
pointer to the currently chosen edge | |
std::map< MSEdge *, std::string, ComparatorNumericalIdLess > | myBidiEdges |
temporary storage for bidi attributes (to be resolved after loading all edges) | |
StopOffset | myCurrentDefaultStopOffset |
The default stop offset for all lanes belonging to the active edge (this is set if the edge was given a stopOffset child) | |
int | myCurrentLaneIndex |
The index of the currently active lane (-1 if none is active) | |
int | myCurrentNumericalEdgeID |
A running number for edge numbering. | |
int | myCurrentNumericalLaneID |
A running number for lane numbering. | |
MSEdgeVector | myEdges |
Temporary, internal storage for built edges. | |
std::vector< MSLane * > * | myLaneStorage |
pointer to a temporary lane storage | |
std::vector< std::pair< MSLane *, std::string > > | myOppositeLanes |
Private Member Functions | |
GUIEdgeControlBuilder (const GUIEdgeControlBuilder &s) | |
invalidated copy constructor | |
GUIEdgeControlBuilder & | operator= (const GUIEdgeControlBuilder &s) |
invalidated assignment operator | |
Derivation of NLEdgeControlBuilder which builds gui-edges.
Instead of building pure microsim-objects (MSEdge and MSLane), this class builds GUIEdges and GUILanes.
Definition at line 50 of file GUIEdgeControlBuilder.h.
GUIEdgeControlBuilder::GUIEdgeControlBuilder | ( | ) |
Constructor.
[in] | glObjectIDStorage | Storage of gl-ids used to assign new ids to built edges |
Definition at line 40 of file GUIEdgeControlBuilder.cpp.
GUIEdgeControlBuilder::~GUIEdgeControlBuilder | ( | ) |
Destructor.
Definition at line 44 of file GUIEdgeControlBuilder.cpp.
|
private |
invalidated copy constructor
|
virtualinherited |
add the crossingEdges in a crossing edge if present
[in] | the | vector of crossed edges id |
Definition at line 256 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myActiveEdge, and MSEdge::setCrossingEdges().
Referenced by NLHandler::beginEdgeParsing().
|
overridevirtual |
Builds and adds a lane.
[in] | id | The lane's id |
[in] | maxSpeed | The speed allowed on this lane |
[in] | length | The lane's length |
[in] | shape | The shape of the lane |
[in] | width | The width of the lane |
[in] | permissions | Encoding of vehicle classes that may drive on this lane |
[in] | index | The index of this lane within its parent edge |
Reimplemented from NLEdgeControlBuilder.
Definition at line 48 of file GUIEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentLaneIndex, NLEdgeControlBuilder::myCurrentNumericalLaneID, and NLEdgeControlBuilder::myLaneStorage.
|
virtualinherited |
Adds a neighbor to the current lane.
[in] | id | The lane's id |
Definition at line 158 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myLaneStorage, and NLEdgeControlBuilder::myOppositeLanes.
Referenced by NLHandler::myStartElement().
|
inherited |
process a stopOffset element (originates either from the active edge or lane).
Definition at line 96 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myCurrentLaneIndex, NLEdgeControlBuilder::setDefaultStopOffset(), and NLEdgeControlBuilder::updateCurrentLaneStopOffset().
Referenced by NLHandler::myStartElement().
|
protectedinherited |
Definition at line 143 of file NLEdgeControlBuilder.cpp.
References StopOffset::isDefined(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentDefaultStopOffset, and NLEdgeControlBuilder::myLaneStorage.
Referenced by NLEdgeControlBuilder::closeEdge().
|
inherited |
Begins building of an MSEdge.
Builds an instance of MSEdge using "buildEdge". Stores it as the current edge in "myActiveEdge" and appends it to the list of built edges ("myEdges").
The given information is used to build the edge.
[in] | id | The id of the edge |
[in] | function | The function of the edge |
[in] | streetName | The street name of the edge |
InvalidArgument | If an edge with the same name was already built |
Definition at line 59 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::buildEdge(), MSEdge::dictionary(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myBidiEdges, NLEdgeControlBuilder::myEdges, and NLEdgeControlBuilder::myLaneStorage.
Referenced by NLHandler::beginEdgeParsing().
|
inherited |
builds the MSEdgeControl-class which holds all edges
Definition at line 183 of file NLEdgeControlBuilder.cpp.
References MELoop::buildSegmentsFor(), deprecatedVehicleClassesSeen, MSLane::dictionary(), OptionsCont::getOptions(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, MSGlobals::gUsingInternalLanes, NLEdgeControlBuilder::myBidiEdges, NLEdgeControlBuilder::myEdges, NLEdgeControlBuilder::myOppositeLanes, parseVehicleClasses(), MSEdge::setMesoIgnoredVClasses(), TL, TLF, toString(), WRITE_ERRORF, and WRITE_WARNINGF.
Referenced by NLBuilder::buildNet().
|
overridevirtual |
Builds an edge instance (GUIEdge in this case)
Builds an GUIEdge-instance using the given name and the current index "myCurrentNumericalEdgeID" Post-increments the index, returns the built edge.
[in] | id | The id of the edge to build |
Reimplemented from NLEdgeControlBuilder.
Definition at line 66 of file GUIEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myCurrentNumericalEdgeID.
|
virtualinherited |
Closes the building of an edge; The edge is completely described by now and may not be opened again.
Definition at line 164 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::applyDefaultStopOffsetsToLanes(), MSEdge::initialize(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentDefaultStopOffset, NLEdgeControlBuilder::myLaneStorage, and StopOffset::reset().
Referenced by NLHandler::closeEdge().
|
inherited |
Closes the building of a lane; The edge is completely described by now and may not be opened again.
Definition at line 177 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myCurrentLaneIndex.
Referenced by NLHandler::myEndElement().
|
private |
invalidated assignment operator
|
inherited |
Return info about currently processed edge or lane.
Definition at line 106 of file NLEdgeControlBuilder.cpp.
References Named::getID(), NLEdgeControlBuilder::myActiveEdge, and NLEdgeControlBuilder::myCurrentLaneIndex.
Referenced by NLHandler::myStartElement().
|
protectedinherited |
set the stopOffset for the last added lane.
Definition at line 133 of file NLEdgeControlBuilder.cpp.
References Named::getID(), StopOffset::isDefined(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentDefaultStopOffset, and WRITE_WARNING.
Referenced by NLEdgeControlBuilder::addStopOffsets().
|
protectedinherited |
set the stopOffset for the last added lane.
Definition at line 117 of file NLEdgeControlBuilder.cpp.
References Named::getID(), StopOffset::isDefined(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myLaneStorage, toString(), and WRITE_WARNING.
Referenced by NLEdgeControlBuilder::addStopOffsets().
|
protectedinherited |
pointer to the currently chosen edge
Definition at line 163 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addCrossingEdges(), NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::applyDefaultStopOffsetsToLanes(), NLEdgeControlBuilder::beginEdgeParsing(), NLEdgeControlBuilder::closeEdge(), NLEdgeControlBuilder::NLEdgeControlBuilder(), NLEdgeControlBuilder::reportCurrentEdgeOrLane(), NLEdgeControlBuilder::setDefaultStopOffset(), and NLEdgeControlBuilder::updateCurrentLaneStopOffset().
|
protectedinherited |
temporary storage for bidi attributes (to be resolved after loading all edges)
Definition at line 175 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::beginEdgeParsing(), and NLEdgeControlBuilder::build().
|
protectedinherited |
The default stop offset for all lanes belonging to the active edge (this is set if the edge was given a stopOffset child)
Definition at line 166 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::applyDefaultStopOffsetsToLanes(), NLEdgeControlBuilder::closeEdge(), and NLEdgeControlBuilder::setDefaultStopOffset().
|
protectedinherited |
The index of the currently active lane (-1 if none is active)
Definition at line 169 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::addStopOffsets(), NLEdgeControlBuilder::closeLane(), and NLEdgeControlBuilder::reportCurrentEdgeOrLane().
|
protectedinherited |
A running number for edge numbering.
Definition at line 157 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::buildEdge(), and buildEdge().
|
protectedinherited |
A running number for lane numbering.
Definition at line 154 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), and addLane().
|
protectedinherited |
Temporary, internal storage for built edges.
Definition at line 160 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::beginEdgeParsing(), and NLEdgeControlBuilder::build().
|
protectedinherited |
pointer to a temporary lane storage
Definition at line 172 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::addNeigh(), NLEdgeControlBuilder::applyDefaultStopOffsetsToLanes(), NLEdgeControlBuilder::beginEdgeParsing(), NLEdgeControlBuilder::closeEdge(), NLEdgeControlBuilder::NLEdgeControlBuilder(), NLEdgeControlBuilder::updateCurrentLaneStopOffset(), and NLEdgeControlBuilder::~NLEdgeControlBuilder().
|
protectedinherited |
Definition at line 177 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addNeigh(), and NLEdgeControlBuilder::build().