![]() |
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 More... | |
virtual MSLane * | addLane (const std::string &id, double maxSpeed, double length, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel) |
Builds and adds a lane. More... | |
virtual void | addNeigh (const std::string id) |
Adds a neighbor to the current lane. More... | |
void | beginEdgeParsing (const std::string &id, const MSEdge::EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType, int priority) |
Begins building of an MSEdge. More... | |
MSEdgeControl * | build () |
builds the MSEdgeControl-class which holds all edges More... | |
MSEdge * | buildEdge (const std::string &id, const MSEdge::EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType, const int priority) |
Builds an edge instance (GUIEdge in this case) More... | |
virtual MSEdge * | closeEdge () |
Closes the building of an edge; The edge is completely described by now and may not be opened again. More... | |
GUIEdgeControlBuilder () | |
Constructor. More... | |
~GUIEdgeControlBuilder () | |
Destructor. More... | |
Protected Attributes | |
MSEdge * | myActiveEdge |
pointer to the currently chosen edge More... | |
int | myCurrentNumericalEdgeID |
A running number for edge numbering. More... | |
int | myCurrentNumericalLaneID |
A running number for lane numbering. More... | |
MSEdgeVector | myEdges |
Temporary, internal storage for built edges. More... | |
std::vector< MSLane * > * | myLaneStorage |
pointer to a temporary lane storage More... | |
Private Member Functions | |
GUIEdgeControlBuilder (const GUIEdgeControlBuilder &s) | |
invalidated copy constructor More... | |
GUIEdgeControlBuilder & | operator= (const GUIEdgeControlBuilder &s) |
invalidated assignment operator More... | |
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 60 of file GUIEdgeControlBuilder.h.
GUIEdgeControlBuilder::GUIEdgeControlBuilder | ( | ) |
Constructor.
[in] | glObjectIDStorage | Storage of gl-ids used to assign new ids to built edges |
Definition at line 49 of file GUIEdgeControlBuilder.cpp.
GUIEdgeControlBuilder::~GUIEdgeControlBuilder | ( | ) |
Destructor.
Definition at line 53 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 143 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myActiveEdge, and MSEdge::setCrossingEdges().
Referenced by NLHandler::beginEdgeParsing().
|
virtual |
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 57 of file GUIEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentNumericalLaneID, and NLEdgeControlBuilder::myLaneStorage.
|
virtualinherited |
Adds a neighbor to the current lane.
[in] | id | The lane's id |
Definition at line 91 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myLaneStorage.
Referenced by NLHandler::myStartElement().
|
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 66 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::buildEdge(), MSEdge::dictionary(), NLEdgeControlBuilder::myActiveEdge, and NLEdgeControlBuilder::myEdges.
Referenced by NLHandler::beginEdgeParsing().
|
inherited |
builds the MSEdgeControl-class which holds all edges
Definition at line 108 of file NLEdgeControlBuilder.cpp.
References deprecatedVehicleClassesSeen, Named::getID(), MSEdge::getNumPredecessors(), MSEdge::getNumSuccessors(), MSEdge::getPredecessors(), MSEdge::getSuccessors(), MSGlobals::gUsingInternalLanes, MSEdge::isInternal(), MSEdge::markAsRoundabout(), NLEdgeControlBuilder::myEdges, toString(), and WRITE_WARNING.
Referenced by NLBuilder::buildNet().
|
virtual |
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 71 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 97 of file NLEdgeControlBuilder.cpp.
References MSEdge::initialize(), NLEdgeControlBuilder::myActiveEdge, and NLEdgeControlBuilder::myLaneStorage.
Referenced by NLHandler::closeEdge().
|
private |
invalidated assignment operator
|
protectedinherited |
pointer to the currently chosen edge
Definition at line 154 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addCrossingEdges(), addLane(), NLEdgeControlBuilder::addLane(), NLEdgeControlBuilder::beginEdgeParsing(), NLEdgeControlBuilder::closeEdge(), and NLEdgeControlBuilder::NLEdgeControlBuilder().
|
protectedinherited |
A running number for edge numbering.
Definition at line 148 of file NLEdgeControlBuilder.h.
Referenced by buildEdge(), and NLEdgeControlBuilder::buildEdge().
|
protectedinherited |
A running number for lane numbering.
Definition at line 145 of file NLEdgeControlBuilder.h.
Referenced by addLane(), and NLEdgeControlBuilder::addLane().
|
protectedinherited |
Temporary, internal storage for built edges.
Definition at line 151 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::beginEdgeParsing(), and NLEdgeControlBuilder::build().
|
protectedinherited |
pointer to a temporary lane storage
Definition at line 157 of file NLEdgeControlBuilder.h.
Referenced by addLane(), NLEdgeControlBuilder::addLane(), NLEdgeControlBuilder::addNeigh(), NLEdgeControlBuilder::closeEdge(), NLEdgeControlBuilder::NLEdgeControlBuilder(), and NLEdgeControlBuilder::~NLEdgeControlBuilder().