SUMO - Simulation of Urban MObility
GNENet.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // The lop level container for GNE-network-components such as GNEEdge and
8 // GNEJunction. Contains an internal instances of NBNetBuilder GNE components
9 // wrap netbuild-components of this underlying NBNetBuilder and supply
10 // visualisation and editing capabilities (adapted from GUINet)
11 //
12 // Workflow (rough draft)
13 // wrap NB-components
14 // do netedit stuff
15 // call NBNetBuilder::buildLoaded to save results
16 //
17 /****************************************************************************/
18 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
19 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
20 /****************************************************************************/
21 //
22 // This file is part of SUMO.
23 // SUMO is free software: you can redistribute it and/or modify
24 // it under the terms of the GNU General Public License as published by
25 // the Free Software Foundation, either version 3 of the License, or
26 // (at your option) any later version.
27 //
28 /****************************************************************************/
29 #ifndef GNENet_h
30 #define GNENet_h
31 
32 
33 // ===========================================================================
34 // included modules
35 // ===========================================================================
36 #ifdef _MSC_VER
37 #include <windows_config.h>
38 #else
39 #include <config.h>
40 #endif
41 
42 #include <string>
43 #include <utility>
45 #include <netbuild/NBNetBuilder.h>
46 #include <utils/geom/Boundary.h>
47 #include <utils/geom/Position.h>
54 #include <utils/common/RGBColor.h>
58 #include "GNEChange.h"
59 #include "GNEDetectorE3.h"
60 #include "GNECalibrator.h"
61 
62 
63 // ===========================================================================
64 // class declarations
65 // ===========================================================================
68 class GNEEdge;
69 class GNELane;
70 class GNEJunction;
71 class GNEUndoList;
72 class GNEAdditional;
73 class GNEBusStop;
74 class GNEChargingStation;
75 class GNEDetectorE1;
76 class GNEDetectorE2;
77 class GNEDetectorE3;
78 class GNEDetectorE3EntryExit;
79 class GNEConnection;
80 class GNECrossing;
81 class GNEShape;
82 class GNEPoly;
83 class GNEPOI;
84 
85 // ===========================================================================
86 // class definitions
87 // ===========================================================================
92 class GNENet : public GUIGlObject, public ShapeContainer {
93 
95  friend class GNEChange_Junction;
96  friend class GNEChange_Edge;
97  friend class GNEChange_Connection;
98 
99 public:
103  static const RGBColor selectionColor;
104 
107 
110 
114 
119  GNENet(NBNetBuilder* netBuilder);
120 
122  ~GNENet();
123 
126 
134 
143 
150 
152  const Boundary& getZBoundary() const;
153 
158  void drawGL(const GUIVisualizationSettings& s) const;
160 
162  const Boundary& getBoundary() const;
163 
168 
172  const SUMORTree& getVisualisationSpeedUp() const;
173 
179  GNEJunction* createJunction(const Position& pos, GNEUndoList* undoList);
180 
192  GNEEdge* createEdge(GNEJunction* src, GNEJunction* dest, GNEEdge* tpl, GNEUndoList* undoList,
193  const std::string& suggestedName = "", bool wasSplit = false, bool allowDuplicateGeom = false);
194 
199  void deleteJunction(GNEJunction* junction, GNEUndoList* undoList);
200 
205  void deleteEdge(GNEEdge* edge, GNEUndoList* undoList);
206 
212  void replaceIncomingEdge(GNEEdge* which, GNEEdge* by, GNEUndoList* undoList);
213 
218  void deleteLane(GNELane* lane, GNEUndoList* undoList);
219 
224  void deleteConnection(GNEConnection* connection, GNEUndoList* undoList);
225 
230  void deleteCrossing(GNECrossing* crossing, GNEUndoList* undoList);
231 
236  void deletePOI(GNEPOI* POI, GNEUndoList* undoList);
237 
242  void deletePolygon(GNEPoly* polygon, GNEUndoList* undoList);
243 
248  void duplicateLane(GNELane* lane, GNEUndoList* undoList);
249 
255  bool restrictLane(SUMOVehicleClass vclass, GNELane* lane, GNEUndoList* undoList);
256 
261  bool revertLaneRestriction(GNELane* lane, GNEUndoList* undoList);
262 
268  bool addSRestrictedLane(SUMOVehicleClass vclass, GNEEdge& edge, GNEUndoList* undoList);
269 
275  bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge& edge, GNEUndoList* undoList);
276 
283  void deleteGeometryOrEdge(GNEEdge* edge, const Position& pos, GNEUndoList* undoList);
284 
290  GNEJunction* splitEdge(GNEEdge* edge, const Position& pos, GNEUndoList* undoList, GNEJunction* newJunction = 0);
291 
296  void splitEdgesBidi(const std::set<GNEEdge*>& edges, const Position& pos, GNEUndoList* undoList);
297 
301  void reverseEdge(GNEEdge* edge, GNEUndoList* undoList);
302 
307  GNEEdge* addReversedEdge(GNEEdge* edge, GNEUndoList* undoList);
308 
315  void mergeJunctions(GNEJunction* moved, GNEJunction* target, GNEUndoList* undoList);
316 
322  GNEJunction* retrieveJunction(const std::string& id, bool failHard = true);
323 
329  GNEEdge* retrieveEdge(const std::string& id, bool failHard = true);
330 
336  GNEEdge* retrieveEdge(GNEJunction* from, GNEJunction* to, bool failHard = true);
337 
343  std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(const std::set<GUIGlID>& ids, GUIGlObjectType type);
344 
348  std::vector<GNEEdge*> retrieveEdges(bool onlySelected = false);
349 
353  std::vector<GNELane*> retrieveLanes(bool onlySelected = false);
354 
360  GNELane* retrieveLane(const std::string& id, bool failHard = true);
361 
365  std::vector<GNEJunction*> retrieveJunctions(bool onlySelected = false);
366 
370  void save(OptionsCont& oc);
371 
376  void saveAdditionals(const std::string& filename, bool volatileOptionsEnabled = false);
377 
381  void savePlain(OptionsCont& oc);
382 
386  void saveJoined(OptionsCont& oc);
387 
389  void setViewNet(GNEViewNet* viewNet);
390 
392  void refreshElement(GUIGlObject* o);
393 
397  void refreshAdditional(GNEAdditional* additional);
398 
400  std::string generateVaporizerID() const;
401 
403  void renameEdge(GNEEdge* edge, const std::string& newID);
404 
406  void renameJunction(GNEJunction* junction, const std::string& newID);
407 
409  void changeEdgeEndpoints(GNEEdge* edge, const std::string& newSourceID, const std::string& newDestID);
410 
412  GNEViewNet* getViewNet() const;
413 
416 
420  std::set<GUIGlID> getGlIDs(GUIGlObjectType type = GLO_MAX);
421 
423  void initGNEConnections();
424 
426  void computeAndUpdate(OptionsCont& oc, bool volatileOptions);
427 
435  void computeEverything(GNEApplicationWindow* window, bool force = false, bool volatileOptions = false, std::string additionalPath = "", std::string shapePath = "");
436 
443  bool joinSelectedJunctions(GNEUndoList* undoList);
444 
446  bool cleanInvalidCrossings(GNEUndoList* undoList);
447 
449  void removeSolitaryJunctions(GNEUndoList* undoList);
450 
452  void replaceJunctionByGeometry(GNEJunction* junction, GNEUndoList* undoList);
453 
457  void computeJunction(GNEJunction* junction);
458 
460  void requireRecompute();
461 
464 
466  void requiereSaveShapes();
467 
469  bool netHasGNECrossings() const;
470 
472  FXApp* getApp();
473 
475  NBNetBuilder* getNetBuilder() const;
476 
478  void addExplicitTurnaround(std::string id);
479 
481  void removeExplicitTurnaround(std::string id);
482 
485  void moveSelection(const Position& moveSrc, const Position& moveDest);
486 
488  void finishMoveSelection(GNEUndoList* undoList);
489 
494  void insertAdditional(GNEAdditional* additional, bool hardFail = true);
495 
499  void deleteAdditional(GNEAdditional* additional);
500 
504  void updateAdditionalID(const std::string& oldID, GNEAdditional* additional);
505 
510  GNEAdditional* retrieveAdditional(const std::string& idl, bool hardFail = true) const;
511 
515  std::vector<GNEAdditional*> retrieveAdditionals(bool onlySelected = false);
516 
522  GNEAdditional* getAdditional(SumoXMLTag type, const std::string& id) const;
523 
530  std::string getAdditionalID(SumoXMLTag type, const GNELane* lane, const double pos) const;
531 
536  std::vector<GNEAdditional*> getAdditionals(SumoXMLTag type = SUMO_TAG_NOTHING) const;
537 
543 
545  const GNECalibratorRoute& getGNECalibratorRoute(const std::string& calibratorRouteID) const;
546 
548  const GNECalibratorVehicleType& getGNECalibratorVehicleType(const std::string& calibratorVehicleTypeID) const;
549 
551  const GNECalibratorFlow& getGNECalibratorFlow(const std::string& calibratorFlowID) const;
552 
554  bool routeExists(const std::string& routeID) const;
555 
557  bool vehicleTypeExists(const std::string& vehicleTypeID) const;
558 
560  bool flowExists(const std::string& flowID) const;
561 
573  bool addPolygon(const std::string& id, const std::string& type, const RGBColor& color, double layer,
574  double angle, const std::string& imgFile, const PositionVector& shape, bool fill,
575  bool ignorePruning = false);
576 
582 
587  bool removePolygon(const std::string& id);
588 
590  void insertPolygonInView(GNEPoly* p);
591 
593  void removePolygonOfView(GNEPoly* p);
594 
596  void refreshPolygon(GNEPoly* p);
597 
599  std::string generatePolyID() const;
600 
606  GNEPoly* retrievePolygon(const std::string& id, bool failHard = true) const;
607 
609  void changePolygonID(GNEPoly* poly, const std::string& OldID);
610 
623  bool addPOI(const std::string& id, const std::string& type, const RGBColor& color, double layer,
624  double angle, const std::string& imgFile, const Position& pos, double width, double height,
625  bool ignorePruning = false);
626 
631  bool removePOI(const std::string& id);
632 
634  void insertPOIInView(GNEPOI* p);
635 
637  void removePOIOfView(GNEPOI* p);
638 
640  void refreshPOI(GNEPOI* p);
641 
643  std::string generatePOIID() const;
644 
650  GNEPOI* retrievePOI(const std::string& id, bool failHard = true) const;
651 
653  void changePOIID(GNEPOI* POI, const std::string& OldID);
654 
658  void saveShapes(const std::string& filename);
659 
661  int getNumberOfShapes() const;
662 
664  bool isShapeSelected(SumoXMLTag tag, const std::string& ID) const;
665 
666 protected:
669 
672 
675 
678  typedef std::map<std::string, GNEJunction*> GNEJunctions;
679  typedef std::map<std::string, GNEEdge*> GNEEdges;
680  typedef std::map<std::pair<std::string, SumoXMLTag>, GNEAdditional*> GNEAdditionals;
681  // @}
682 
684  GNEJunctions myJunctions;
685 
687  GNEEdges myEdges;
688 
690  GNEAdditionals myAdditionals;
691 
693  // @{
696  // @}
697 
699  std::set<std::string> myExplicitTurnarounds;
700 
703 
706 
709 
710 private:
712  void initJunctionsAndEdges();
713 
715  void insertJunction(GNEJunction* junction);
716 
718  void insertEdge(GNEEdge* edge);
719 
722 
724  GNEEdge* registerEdge(GNEEdge* edge);
725 
727  void deleteSingleJunction(GNEJunction* junction);
728 
730  void deleteSingleEdge(GNEEdge* edge);
731 
733  void update();
734 
736  void reserveEdgeID(const std::string& id);
737 
739  void reserveJunctionID(const std::string& id);
740 
741  /* @brief helper function for changing the endpoints of a junction
742  * @param[in] keepEndpoints Whether to keep the original edge endpoints (influences junction shape)
743  */
744  void remapEdge(GNEEdge* oldEdge, GNEJunction* from, GNEJunction* to, GNEUndoList* undoList, bool keepEndpoints = false);
745 
747  bool checkJunctionPosition(const Position& pos);
748 
749  static void replaceInListAttribute(GNEAttributeCarrier* ac, SumoXMLAttr key, const std::string& which, const std::string& by, GNEUndoList* undoList);
750 
753 
755  static const double Z_INITIALIZED;
756 
759  FXDECLARE_ABSTRACT(GNEChange_ReplaceEdgeInTLS)
760 
761  public:
764  GNEChange(0, true),
765  myTllcont(tllcont), myReplaced(replaced), myBy(by) { }
766 
769 
771  FXString undoName() const {
772  return "Redo replace in TLS";
773  }
774 
776  FXString redoName() const {
777  return "Undo replace in TLS";
778  }
779 
781  void undo() {
783  }
784 
786  void redo() {
788  }
789 
791  bool trueChange() {
792  return myReplaced != myBy;
793  }
794 
795  private:
798 
801 
804  };
805 
806 };
807 
808 #endif
809 
810 /****************************************************************************/
~GNEChange_ReplaceEdgeInTLS()
destructor
Definition: GNENet.h:768
void setViewNet(GNEViewNet *viewNet)
Set the viewNet to be notified of network changes.
Definition: GNENet.cpp:880
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
Definition: GNENet.cpp:637
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
Definition: GNENet.cpp:978
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GNENet.cpp:169
void initJunctionsAndEdges()
Init Junctions and edges.
Definition: GNENet.cpp:2093
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
Definition: GNENet.cpp:944
GNEViewNet * myViewNet
The viewNet to be notofied of about changes.
Definition: GNENet.h:671
SumoXMLTag
Numbers representing SUMO-XML - element names.
void requiereSaveAdditionals()
inform that additionals has to be saved
Definition: GNENet.cpp:1237
NBTrafficLightLogicCont & myTllcont
container for traffic light logic
Definition: GNENet.h:797
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:899
IDSupplier myEdgeIDSupplier
Definition: GNENet.h:694
bool flowExists(const std::string &flowID) const
Check if exist a flow with these ID.
Definition: GNENet.cpp:1792
void removePolygonOfView(GNEPoly *p)
remove polygon of view net
Definition: GNENet.cpp:1872
SUMORTree myGrid
the rtree which contains all GUIGlObjects (so named for historical reasons)
Definition: GNENet.h:668
void deletePOI(GNEPOI *POI, GNEUndoList *undoList)
remove POI
Definition: GNENet.cpp:514
GUIGlObjectType
FXApp * getApp()
get pointer to the main App
Definition: GNENet.cpp:1268
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool removePolygon(const std::string &id)
Removes a polygon from the container.
Definition: GNENet.cpp:1847
GNEPoly * addPolygonForEditShapes(GNEJunction *junction)
Builds a special polygon used for edit Junctions&#39;s shapes.
Definition: GNENet.cpp:1826
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
Definition: GNENet.cpp:990
GNEAdditionals myAdditionals
map with the name and pointer to additional elements of net
Definition: GNENet.h:690
The main window of the Netedit.
static const RGBColor selectedLaneColor
color of selected lane
Definition: GNENet.h:106
bool revertLaneRestriction(GNELane *lane, GNEUndoList *undoList)
revert prevously restricted lane
Definition: GNENet.cpp:582
std::string generatePOIID() const
generate a POI ID
Definition: GNENet.cpp:2007
A container for traffic light definitions and built programs.
void refreshPOI(GNEPOI *p)
refresh shape in view net
Definition: GNENet.cpp:1995
Definition: GNEPOI.h:52
Stores the information about how to visualize structures.
std::set< GUIGlID > getGlIDs(GUIGlObjectType type=GLO_MAX)
get ids of currently active objects
Definition: GNENet.cpp:1070
bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const Position &pos, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
Definition: GNENet.cpp:1935
bool vehicleTypeExists(const std::string &vehicleTypeID) const
Check if exist a vehicle type with these ID.
Definition: GNENet.cpp:1779
The representation of a single edge during network building.
Definition: NBEdge.h:71
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GNENet.cpp:190
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
Definition: GNENet.cpp:700
void update()
notify myViewNet
Definition: GNENet.cpp:2207
void insertJunction(GNEJunction *junction)
inserts a single junction into the net and into the underlying netbuild-container ...
Definition: GNENet.cpp:2122
void saveAdditionals(const std::string &filename, bool volatileOptionsEnabled=false)
save additional elements of the network
Definition: GNENet.cpp:813
bool routeExists(const std::string &routeID) const
Check if exist a route with these ID.
Definition: GNENet.cpp:1766
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
Definition: GNENet.cpp:478
void splitEdgesBidi(const std::set< GNEEdge * > &edges, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
Definition: GNENet.cpp:689
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:92
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false)
creates a new edge (unless an edge with the same geometry already exists)
Definition: GNENet.cpp:225
void addExplicitTurnaround(std::string id)
add edge id to the list of explicit turnarounds
Definition: GNENet.cpp:1540
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
Definition: GNENet.cpp:1387
Storage for geometrical objects.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void insertEdge(GNEEdge *edge)
inserts a single edge into the net and into the underlying netbuild-container
Definition: GNENet.cpp:2129
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList)
removes edge
Definition: GNENet.cpp:332
A RT-tree for efficient storing of SUMO&#39;s GL-objects.
Definition: SUMORTree.h:74
void remapEdge(GNEEdge *oldEdge, GNEJunction *from, GNEJunction *to, GNEUndoList *undoList, bool keepEndpoints=false)
Definition: GNENet.cpp:770
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction with GNENet containers
Definition: GNENet.cpp:2140
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
bool myNeedRecompute
whether the net needs recomputation
Definition: GNENet.h:702
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
Definition: GNENet.cpp:1715
NBNetBuilder * myNetBuilder
The internal netbuilder.
Definition: GNENet.h:674
const Boundary & getBoundary() const
returns the bounder of the network
Definition: GNENet.cpp:162
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
Definition: GNENet.cpp:556
bool myAdditionalsSaved
Flag to check if additionals has to be saved.
Definition: GNENet.h:705
void renameJunction(GNEJunction *junction, const std::string &newID)
updates the map and reserves new id
Definition: GNENet.cpp:1531
IDSupplier myJunctionIDSupplier
Definition: GNENet.h:695
void refreshPolygon(GNEPoly *p)
refresh polygon in view net
Definition: GNENet.cpp:1886
void changePOIID(GNEPOI *POI, const std::string &OldID)
change POI ID
Definition: GNENet.cpp:2033
static const double Z_INITIALIZED
marker for whether the z-boundary is initialized
Definition: GNENet.h:755
FXString undoName() const
undo name
Definition: GNENet.h:771
static const RGBColor selectedAdditionalColor
color of selected additionals
Definition: GNENet.h:112
std::string getAdditionalID(SumoXMLTag type, const GNELane *lane, const double pos) const
Returns the additional close to the given position.
Definition: GNENet.cpp:1692
void updateAdditionalID(const std::string &oldID, GNEAdditional *additional)
update additional ID in container
Definition: GNENet.cpp:1638
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
Definition: GNENet.cpp:615
std::map< std::string, GNEJunction * > GNEJunctions
Definition: GNENet.h:678
NBEdge * myBy
replaced by NBEdge
Definition: GNENet.h:803
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:52
void insertPolygonInView(GNEPoly *p)
insert created polygon in view net
Definition: GNENet.cpp:1858
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GNENet.cpp:179
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
Definition: GNENet.cpp:998
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
Definition: GNENet.cpp:886
GNEJunctions myJunctions
map with the name and pointer to junctions of net
Definition: GNENet.h:684
A list of positions.
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
Definition: GNENet.cpp:958
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
Definition: GNENet.cpp:1280
Boundary myZBoundary
the z boundary (stored in the x-coordinate), values of 0 are ignored
Definition: GNENet.h:752
void deleteLane(GNELane *lane, GNEUndoList *undoList)
removes lane
Definition: GNENet.cpp:436
void replaceIncomingEdge(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replaces edge
Definition: GNENet.cpp:383
void deleteGeometryOrEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList)
removes geometry when pos is close to a geometry node, deletes the whole edge otherwise ...
Definition: GNENet.cpp:629
bool isShapeSelected(SumoXMLTag tag, const std::string &ID) const
Check if shape item is selected.
Definition: GNENet.cpp:2077
bool trueChange()
wether original and new value differ
Definition: GNENet.h:791
void changePolygonID(GNEPoly *poly, const std::string &OldID)
change Polygon ID
Definition: GNENet.cpp:1924
GNEPoly * retrievePolygon(const std::string &id, bool failHard=true) const
get Polygon by id
Definition: GNENet.cpp:1911
void computeJunction(GNEJunction *junction)
trigger recomputation of junction shape and logic param[in] window The window to inform about delay ...
Definition: GNENet.cpp:1216
const GNECalibratorFlow & getGNECalibratorFlow(const std::string &calibratorFlowID) const
Returns a reference to a calibrator flow finding in all calibrators of net.
Definition: GNENet.cpp:1753
A lane area vehicles can halt at (netedit-version)
Definition: GNEBusStop.h:58
void initGNEConnections()
initialize GNEConnections
Definition: GNENet.cpp:2227
void save(OptionsCont &oc)
save the network
Definition: GNENet.cpp:804
std::string generatePolyID() const
generate PolyID
Definition: GNENet.cpp:1898
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(const std::set< GUIGlID > &ids, GUIGlObjectType type)
get the attribute carriers based on GlIDs
Definition: GNENet.cpp:1020
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
Definition: GNENet.cpp:498
void insertPOIInView(GNEPOI *p)
insert created shape in view net
Definition: GNENet.cpp:1967
void moveSelection(const Position &moveSrc, const Position &moveDest)
move all selected junctions and edges
Definition: GNENet.cpp:1552
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
Definition: GNENet.cpp:214
SUMORTree & getVisualisationSpeedUp()
Returns the RTree used for visualisation speed-up.
Definition: GNENet.cpp:202
std::set< std::string > myExplicitTurnarounds
list of edge ids for which turn-arounds must be added explicitly
Definition: GNENet.h:699
bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const PositionVector &shape, bool fill, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
Definition: GNENet.cpp:1805
std::vector< GNEAdditional * > getAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
get vector with additionals
Definition: GNENet.cpp:1703
const GNECalibratorRoute & getGNECalibratorRoute(const std::string &calibratorRouteID) const
Returns a reference to a calibrator route finding in all calibrators of net.
Definition: GNENet.cpp:1727
bool checkJunctionPosition(const Position &pos)
return true if there are already a Junction in the given position, false in other case ...
Definition: GNENet.cpp:792
FXString redoName() const
get Redo name
Definition: GNENet.h:776
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
Definition: GNENet.cpp:1460
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:58
void undo()
undo action
Definition: GNENet.h:781
void reserveJunctionID(const std::string &id)
reserve junction ID (To avoid duplicates)
Definition: GNENet.cpp:2221
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
Definition: GNENet.cpp:1680
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNENet.cpp:185
void deletePolygon(GNEPoly *polygon, GNEUndoList *undoList)
remove Polygon
Definition: GNENet.cpp:529
void deleteSingleJunction(GNEJunction *junction)
deletes a single junction
Definition: GNENet.cpp:2175
~GNENet()
Destructor.
Definition: GNENet.cpp:132
const Boundary & getZBoundary() const
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary...
Definition: GNENet.cpp:196
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Definition: GNENet.cpp:932
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with GNENet containers
Definition: GNENet.cpp:2157
GNENet(NBNetBuilder *netBuilder)
Constructor.
Definition: GNENet.cpp:107
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:62
Instance responsible for building networks.
Definition: NBNetBuilder.h:115
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
Definition: GNENet.cpp:1443
static const RGBColor selectedConnectionColor
color of selected connection
Definition: GNENet.h:109
A storage for options typed value containers)
Definition: OptionsCont.h:99
The popup menu of a globject.
bool removePOI(const std::string &id)
Removes a PoI from the container.
Definition: GNENet.cpp:1956
class for GNEChange_ReplaceEdgeInTLS
Definition: GNENet.h:758
void computeEverything(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string shapePath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
Definition: GNENet.cpp:1167
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
Definition: GNENet.cpp:2238
void renameEdge(GNEEdge *edge, const std::string &newID)
updates the map and reserves new id
Definition: GNENet.cpp:1496
static void replaceInListAttribute(GNEAttributeCarrier *ac, SumoXMLAttr key, const std::string &which, const std::string &by, GNEUndoList *undoList)
Definition: GNENet.cpp:2334
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
Definition: GNENet.cpp:280
bool netHasGNECrossings() const
check if net has GNECrossings
Definition: GNENet.cpp:1257
std::string generateVaporizerID() const
generate an ID for vaporizers
Definition: GNENet.cpp:1010
void removeExplicitTurnaround(std::string id)
remove edge id from the list of explicit turnarounds
Definition: GNENet.cpp:1546
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
Definition: GNENet.cpp:872
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false)
return all additionals
Definition: GNENet.cpp:1668
void deleteAdditional(GNEAdditional *additional)
delete additional element previously inserted
Definition: GNENet.cpp:1622
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
Definition: GNENet.cpp:711
void requiereSaveShapes()
inform that shapes has to be saved
Definition: GNENet.cpp:1247
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
Definition: GNENet.cpp:2020
GNEEdges myEdges
map with the name and pointer to edges of net
Definition: GNENet.h:687
std::map< std::pair< std::string, SumoXMLTag >, GNEAdditional * > GNEAdditionals
Definition: GNENet.h:680
void removePOIOfView(GNEPOI *p)
remove shape of view net
Definition: GNENet.cpp:1981
static const RGBColor selectionColor
Definition: GNENet.h:103
empty max
const GNECalibratorVehicleType & getGNECalibratorVehicleType(const std::string &calibratorVehicleTypeID) const
Returns a reference to a calibrator vehicle type finding in all calibrators of net.
Definition: GNENet.cpp:1740
void reserveEdgeID(const std::string &id)
reserve edge ID (To avoid duplicates)
Definition: GNENet.cpp:2215
void deleteSingleEdge(GNEEdge *edge)
deletes a single edge
Definition: GNENet.cpp:2188
void redo()
redo action
Definition: GNENet.h:786
std::map< std::string, GNEEdge * > GNEEdges
Definition: GNENet.h:679
void replaceRemoved(NBEdge *removed, int removedLane, NBEdge *by, int byLane)
Replaces occurences of the removed edge/lane in all definitions by the given edge.
GNEAdditional * retrieveAdditional(const std::string &idl, bool hardFail=true) const
Returns the named additional.
Definition: GNENet.cpp:1653
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
Definition: GNENet.cpp:745
void insertAdditional(GNEAdditional *additional, bool hardFail=true)
Insert a additional element previously created in GNEAdditionalHandler.
Definition: GNENet.cpp:1604
int getNumberOfShapes() const
get number of shapes
Definition: GNENet.cpp:2071
bool addSRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
add restricted lane to edge
Definition: GNENet.cpp:600
GNEChange_ReplaceEdgeInTLS(NBTrafficLightLogicCont &tllcont, NBEdge *replaced, NBEdge *by)
constructor
Definition: GNENet.h:763
bool myShapesSaved
Flag to check if shapes hast o be saved.
Definition: GNENet.h:708
A window containing a gl-object&#39;s parameter.
void changeEdgeEndpoints(GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID)
modifies endpoins of the given edge
Definition: GNENet.cpp:1509
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
Definition: GNENet.cpp:1525
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:1519
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
Definition: GNENet.cpp:864
void requireRecompute()
inform the net about the need for recomputation
Definition: GNENet.cpp:1232
void duplicateLane(GNELane *lane, GNEUndoList *undoList)
duplicates lane
Definition: GNENet.cpp:544
NBEdge * myReplaced
replaced NBEdge
Definition: GNENet.h:800
void saveShapes(const std::string &filename)
save shapes elements of the network
Definition: GNENet.cpp:2042
void finishMoveSelection(GNEUndoList *undoList)
register changes to junction and edge positions with the undoList
Definition: GNENet.cpp:1582
NBNetBuilder * getNetBuilder() const
get net builder
Definition: GNENet.cpp:1274