|
SUMO - Simulation of Urban MObility
|
Derivation of NLEdgeControlBuilder which builds gui-edges. More...
#include <GUIEdgeControlBuilder.h>
Public Types | |
| typedef std::vector< MSEdge * > | EdgeCont |
| definition of the used storage for edges | |
Public Member Functions | |
| virtual MSLane * | addLane (const std::string &id, SUMOReal maxSpeed, SUMOReal length, const PositionVector &shape, SUMOReal width, const SUMOVehicleClasses &allowed, const SUMOVehicleClasses &disallowed) |
| Builds and adds a lane. | |
| void | beginEdgeParsing (const std::string &id, MSEdge::EdgeBasicFunction function, const std::string &streetName) |
| Begins building of an MSEdge. | |
| MSEdgeControl * | build () |
| builds the MSEdgeControl-class which holds all edges | |
| MSEdge * | buildEdge (const std::string &id, const std::string &streetName) |
| Builds an edge instance (GUIEdge in this case) | |
| MSEdge * | closeEdge () |
| Closes the building of an edge; The edge is completely described by now and may not be opened again. | |
| GUIEdgeControlBuilder () | |
| Constructor. | |
| ~GUIEdgeControlBuilder () | |
| Destructor. | |
Protected Attributes | |
| MSEdge * | myActiveEdge |
| pointer to the currently chosen edge | |
| unsigned int | myCurrentNumericalEdgeID |
| A running number for edge numbering. | |
| unsigned int | myCurrentNumericalLaneID |
| A running number for lane numbering. | |
| EdgeCont | myEdges |
| Temporary, internal storage for built edges. | |
| MSEdge::EdgeBasicFunction | myFunction |
| the function of the current edge | |
| std::vector< MSLane * > * | myLaneStorage |
| pointer to a temporary lane storage | |
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 60 of file GUIEdgeControlBuilder.h.
typedef std::vector<MSEdge*> NLEdgeControlBuilder::EdgeCont [inherited] |
definition of the used storage for edges
Definition at line 67 of file NLEdgeControlBuilder.h.
| GUIEdgeControlBuilder::GUIEdgeControlBuilder | ( | ) |
Constructor.
| [in] | glObjectIDStorage | Storage of gl-ids used to assign new ids to built edges |
Definition at line 54 of file GUIEdgeControlBuilder.cpp.
| GUIEdgeControlBuilder::~GUIEdgeControlBuilder | ( | ) |
Destructor.
Definition at line 58 of file GUIEdgeControlBuilder.cpp.
| GUIEdgeControlBuilder::GUIEdgeControlBuilder | ( | const GUIEdgeControlBuilder & | s | ) | [private] |
invalidated copy constructor
| MSLane * GUIEdgeControlBuilder::addLane | ( | const std::string & | id, |
| SUMOReal | maxSpeed, | ||
| SUMOReal | length, | ||
| const PositionVector & | shape, | ||
| SUMOReal | width, | ||
| const SUMOVehicleClasses & | allowed, | ||
| const SUMOVehicleClasses & | disallowed | ||
| ) | [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] | allowed | Vehicle classes that explicitly may drive on this lane |
| [in] | disallowed | Vehicle classes that are explicitly forbidden on this lane |
Reimplemented from NLEdgeControlBuilder.
Definition at line 70 of file GUIEdgeControlBuilder.cpp.
References MSEdge::EDGEFUNCTION_CONNECTOR, MSEdge::EDGEFUNCTION_INTERNAL, MSEdge::EDGEFUNCTION_NORMAL, NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myCurrentNumericalLaneID, NLEdgeControlBuilder::myFunction, NLEdgeControlBuilder::myLaneStorage, and toString().
| void NLEdgeControlBuilder::beginEdgeParsing | ( | const std::string & | id, |
| MSEdge::EdgeBasicFunction | function, | ||
| const std::string & | streetName | ||
| ) | [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 74 of file NLEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::buildEdge(), MSEdge::dictionary(), NLEdgeControlBuilder::myActiveEdge, NLEdgeControlBuilder::myEdges, and NLEdgeControlBuilder::myFunction.
Referenced by NLHandler::beginEdgeParsing().
| MSEdgeControl * NLEdgeControlBuilder::build | ( | ) | [inherited] |
builds the MSEdgeControl-class which holds all edges
Definition at line 123 of file NLEdgeControlBuilder.cpp.
References OptionsCont::getOptions(), and NLEdgeControlBuilder::myEdges.
Referenced by NLBuilder::buildNet().
| MSEdge * GUIEdgeControlBuilder::buildEdge | ( | const std::string & | id, |
| const std::string & | streetName | ||
| ) | [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 97 of file GUIEdgeControlBuilder.cpp.
References NLEdgeControlBuilder::myCurrentNumericalEdgeID.
| MSEdge * GUIEdgeControlBuilder::closeEdge | ( | ) | [virtual] |
Closes the building of an edge; The edge is completely described by now and may not be opened again.
Reimplemented from NLEdgeControlBuilder.
Definition at line 62 of file GUIEdgeControlBuilder.cpp.
| GUIEdgeControlBuilder& GUIEdgeControlBuilder::operator= | ( | const GUIEdgeControlBuilder & | s | ) | [private] |
invalidated assignment operator
MSEdge* NLEdgeControlBuilder::myActiveEdge [protected, inherited] |
pointer to the currently chosen edge
Definition at line 148 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::beginEdgeParsing(), NLEdgeControlBuilder::closeEdge(), and NLEdgeControlBuilder::NLEdgeControlBuilder().
unsigned int NLEdgeControlBuilder::myCurrentNumericalEdgeID [protected, inherited] |
A running number for edge numbering.
Definition at line 142 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::buildEdge(), and buildEdge().
unsigned int NLEdgeControlBuilder::myCurrentNumericalLaneID [protected, inherited] |
A running number for lane numbering.
Definition at line 139 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), and addLane().
EdgeCont NLEdgeControlBuilder::myEdges [protected, inherited] |
Temporary, internal storage for built edges.
Definition at line 145 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::beginEdgeParsing(), and NLEdgeControlBuilder::build().
MSEdge::EdgeBasicFunction NLEdgeControlBuilder::myFunction [protected, inherited] |
the function of the current edge
Definition at line 154 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::beginEdgeParsing(), and NLEdgeControlBuilder::closeEdge().
std::vector<MSLane*>* NLEdgeControlBuilder::myLaneStorage [protected, inherited] |
pointer to a temporary lane storage
Definition at line 151 of file NLEdgeControlBuilder.h.
Referenced by NLEdgeControlBuilder::addLane(), addLane(), NLEdgeControlBuilder::closeEdge(), NLEdgeControlBuilder::NLEdgeControlBuilder(), and NLEdgeControlBuilder::~NLEdgeControlBuilder().