Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNENetHelper.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Helper for GNENet
19//
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
25#include <netbuild/NBEdge.h>
27#include <netbuild/NBVehicle.h>
33#include <utils/geom/Boundary.h>
35#include <utils/geom/Triangle.h>
41
42// ===========================================================================
43// class declarations
44// ===========================================================================
45
46class GNEAdditional;
49class GNEConnection;
50class GNECrossing;
51class GNEDataInterval;
52class GNEDataSet;
54class GNEEdge;
55class GNEEdgeType;
56class GNEJunction;
57class GNELane;
58class GNELaneType;
59class GNEMeanData;
60class GNENet;
62class GNEPOI;
63class GNEPoly;
64class GNEUndoList;
65class GNEViewNet;
66class GNEWalkingArea;
67class NBNetBuilder;
68
69// ===========================================================================
70// class definitions
71// ===========================================================================
72
74
77
80 friend class GNERouteHandler;
81 friend class GNEDataHandler;
82 friend class GNEMeanDataHandler;
83 friend class GNEJunction;
84 friend class GNEEdge;
85 friend class GNEDataSet;
86 friend class GNEDataInterval;
87 friend class GNEChange_Junction;
88 friend class GNEChange_EdgeType;
89 friend class GNEChange_Edge;
92 friend class GNEChange_Shape;
95 friend class GNEChange_DataSet;
98 friend class GNEChange_MeanData;
99 friend class GNETLSEditorFrame;
100
101 public:
104
107
110
112 bool isNetworkElementAroundTriangle(GNEAttributeCarrier* AC, const Triangle& triangle) const;
113
117 int getNumberOfNetworkElements() const;
118
120 int getNumberOfDemandElements() const;
121
123 int getNumberOfDataElements() const;
124
126
129
135 GNEAttributeCarrier* retrieveAttributeCarrier(const GUIGlID id, bool hardFail = true) const;
136
141 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(SumoXMLTag tag = SUMO_TAG_NOTHING);
142
144 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(Supermode supermode, const bool onlySelected);
145
147 std::vector<GNEAttributeCarrier*> getSelectedAttributeCarriers(const bool ignoreCurrentSupermode);
148
150
153
158 GNEJunction* retrieveJunction(const std::string& id, bool hardFail = true) const;
159
161 const std::map<std::string, GNEJunction*>& getJunctions() const;
162
164 std::vector<GNEJunction*> getSelectedJunctions() const;
165
168
170 void clearJunctions();
171
173 void addPrefixToJunctions(const std::string& prefix);
174
176 void updateJunctionID(GNEJunction* junction, const std::string& newID);
177
180
182
185
190 GNECrossing* retrieveCrossing(const GUIGlObject* glObject, bool hardFail = true) const;
191
193 const std::unordered_map<const GUIGlObject*, GNECrossing*>& getCrossings() const;
194
196 std::vector<GNECrossing*> getSelectedCrossings() const;
197
200
202
205
210 GNEWalkingArea* retrieveWalkingArea(const GUIGlObject* glObject, bool hardFail = true) const;
211
213 const std::unordered_map<const GUIGlObject*, GNEWalkingArea*>& getWalkingAreas() const;
214
216 std::vector<GNEWalkingArea*> getSelectedWalkingAreas() const;
217
220
222
225
230 GNEEdgeType* retrieveEdgeType(const std::string& id, bool hardFail = true) const;
231
234
236 const std::map<std::string, GNEEdgeType*>& getEdgeTypes() const;
237
239 void clearEdgeTypes();
240
242 void updateEdgeTypeID(GNEEdgeType* edgeType, const std::string& newID);
243
245 std::string generateEdgeTypeID() const;
246
248
251
256 GNEEdge* retrieveEdge(const std::string& id, bool hardFail = true) const;
257
263 std::vector<GNEEdge*> retrieveEdges(GNEJunction* from, GNEJunction* to) const;
264
266 const std::map<std::string, GNEEdge*>& getEdges() const;
267
271 std::vector<GNEEdge*> getSelectedEdges() const;
272
275
277 void clearEdges();
278
280 void addPrefixToEdges(const std::string& prefix);
281
283 std::string generateEdgeID() const;
284
286 void updateEdgeID(GNEEdge* edge, const std::string& newID);
287
289 int getNumberOfSelectedEdges() const;
290
292
295
301 GNELane* retrieveLane(const std::string& id, bool hardFail = true, bool checkVolatileChange = false) const;
302
308 GNELane* retrieveLane(const GUIGlObject* glObject, bool hardFail = true) const;
309
311 const std::unordered_map<const GUIGlObject*, GNELane*>& getLanes() const;
312
314 std::vector<GNELane*> getSelectedLanes() const;
315
317 int getNumberOfSelectedLanes() const;
318
320
323
328 GNEConnection* retrieveConnection(const std::string& id, bool hardFail = true) const;
329
335 GNEConnection* retrieveConnection(const GUIGlObject* glObject, bool hardFail = true) const;
336
338 const std::unordered_map<const GUIGlObject*, GNEConnection*>& getConnections() const;
339
341 std::vector<GNEConnection*> getSelectedConnections() const;
342
345
347
350
356 GNEInternalLane* retrieveInternalLane(const GUIGlObject* glObject, bool hardFail = true) const;
357
359
362
368 GNEAdditional* retrieveAdditional(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
369
376 GNEAdditional* retrieveAdditionals(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
377
382 GNEAdditional* retrieveAdditional(const GUIGlObject* glObject, bool hardFail = true) const;
383
389 GNEAdditional* retrieveRerouterInterval(const std::string& rerouterID, const SUMOTime begin, const SUMOTime end) const;
390
392 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*>, std::hash<int> >& getAdditionals() const;
393
395 std::vector<GNEAdditional*> getSelectedAdditionals() const;
396
398 std::vector<GNEAdditional*> getSelectedShapes() const;
399
401 int getNumberOfAdditionals() const;
402
404 void clearAdditionals();
405
407 void updateAdditionalID(GNEAdditional* additional, const std::string& newID);
408
410 std::string generateAdditionalID(SumoXMLTag type) const;
411
414
417
419 int getNumberOfSelectedPolygons() const;
420
423
426
428 int getNumberOfSelectedPOIs() const;
429
431 int getNumberOfSelectedTAZs() const;
432
434 int getNumberOfSelectedWires() const;
435
437
440
444 GNETAZSourceSink* retrieveTAZSourceSink(const GNEAttributeCarrier* sourceSink, bool hardFail = true) const;
445
447 const std::unordered_map<SumoXMLTag, std::unordered_map<const GNEAttributeCarrier*, GNETAZSourceSink*>, std::hash<int> >& getTAZSourceSinks() const;
448
450 int getNumberOfTAZSourceSinks() const;
451
453 void clearTAZSourceSinks();
454
456
459
464 GNEDemandElement* retrieveDemandElement(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
465
471 GNEDemandElement* retrieveDemandElements(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
472
477 GNEDemandElement* retrieveDemandElement(const GUIGlObject* glObject, bool hardFail = true) const;
478
480 std::vector<GNEDemandElement*> getSelectedDemandElements() const;
481
483 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*>, std::hash<int> >& getDemandElements() const;
484
486 std::string generateDemandElementID(SumoXMLTag tag) const;
487
490
492 void clearDemandElements();
493
495 void updateDemandElementID(GNEDemandElement* demandElement, const std::string& newID);
496
498 void addDefaultVTypes();
499
501 int getStopIndex();
502
505
507 int getNumberOfSelectedRoutes() const;
508
510 int getNumberOfSelectedVehicles() const;
511
513 int getNumberOfSelectedPersons() const;
514
517
519 int getNumberOfSelectedWalks() const;
520
522 int getNumberOfSelectedRides() const;
523
526
529
532
534 int getNumberOfSelectedStops() const;
535
537
540
544 GNEDataSet* retrieveDataSet(const std::string& id, bool hardFail = true) const;
545
547 const std::map<const std::string, GNEDataSet*>& getDataSets() const;
548
550 std::string generateDataSetID() const;
551
553
556
560 GNEDataInterval* retrieveDataInterval(const GNEAttributeCarrier* AC, bool hardFail = true) const;
561
563 const std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*>& getDataIntervals() const;
564
566
569
573 GNEGenericData* retrieveGenericData(const GUIGlObject* glObject, bool hardFail = true) const;
574
576 std::vector<GNEGenericData*> getSelectedGenericDatas() const;
577
579 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*>, std::hash<int> >& getGenericDatas() const;
580
582 std::vector<GNEGenericData*> retrieveGenericDatas(const SumoXMLTag genericDataTag, const double begin, const double end);
583
585 int getNumberOfGenericDatas() const;
586
589
592
595
597 std::set<std::string> retrieveGenericDataParameters(const std::string& genericDataTag, const double begin, const double end) const;
598
600 std::set<std::string> retrieveGenericDataParameters(const std::string& dataSetID, const std::string& genericDataTag,
601 const std::string& beginStr, const std::string& endStr) const;
602
604
607
613 GNEMeanData* retrieveMeanData(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
614
616 const std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*>, std::hash<int> >& getMeanDatas() const;
617
619 int getNumberOfMeanDatas() const;
620
622 void clearMeanDatas();
623
625 void updateMeanDataID(GNEMeanData* meanData, const std::string& newID);
626
628 std::string generateMeanDataID(SumoXMLTag type) const;
629
631
632 protected:
635
637 void insertJunction(GNEJunction* junction);
638
640 void deleteSingleJunction(GNEJunction* junction);
641
643
646
648 void insertEdgeType(GNEEdgeType* edgeType);
649
651 void deleteEdgeType(GNEEdgeType* edgeType);
652
654
658 void insertEdge(GNEEdge* edge);
659
661 void deleteSingleEdge(GNEEdge* edge);
662
664
667
669 void insertLane(GNELane* lane);
670
672 void deleteLane(GNELane* lane);
673
675
678
680 void insertCrossing(GNECrossing* crossing);
681
683 void deleteCrossing(GNECrossing* crossing);
684
686
689
691 void insertWalkingArea(GNEWalkingArea* walkingArea);
692
694 void deleteWalkingArea(GNEWalkingArea* walkingArea);
695
697
700
702 void insertConnection(GNEConnection* connection);
703
705 void deleteConnection(GNEConnection* connection);
706
708
711
713 void insertInternalLane(GNEInternalLane* internalLane);
714
716 void deleteInternalLane(GNEInternalLane* internalLane);
717
719
722
724 void insertAdditional(GNEAdditional* additional);
725
727 void deleteAdditional(GNEAdditional* additional);
728
730
733
735 void insertTAZSourceSink(GNETAZSourceSink* sourceSink);
736
738 void deleteTAZSourceSink(GNETAZSourceSink* sourceSink);
739
741
744
746 void insertDemandElement(GNEDemandElement* demandElement);
747
749 void deleteDemandElement(GNEDemandElement* demandElement, const bool updateFrames);
750
752
755
757 void insertDataSet(GNEDataSet* dataSet);
758
760 void deleteDataSet(GNEDataSet* dataSet);
761
763
766
768 void insertDataInterval(const GNEAttributeCarrier* AC, GNEDataInterval* dataInterval);
769
771 void deleteDataInterval(GNEDataInterval* dataInterval);
772
774
777
779 void insertGenericData(GNEGenericData* genericData);
780
782 void deleteGenericData(GNEGenericData* genericData);
783
785
788
790 void insertMeanData(GNEMeanData* meanData);
791
793 void deleteMeanData(GNEMeanData* meanData);
794
796
798 void updateDemandElementFrames(const GNETagProperties* tagProperty);
799
801 void retrieveAttributeCarriersRecursively(const GNETagProperties* tag, std::vector<GNEAttributeCarrier*>& ACs);
802
803 private:
806
809
812
815
818
821
823 std::map<std::string, GNEJunction*> myJunctions;
824
826 std::unordered_map<const GUIGlObject*, GNECrossing*> myCrossings;
827
829 std::unordered_map<const GUIGlObject*, GNEWalkingArea*> myWalkingAreas;
830
832 std::map<std::string, GNEEdgeType*> myEdgeTypes;
833
835 std::map<std::string, GNEEdge*> myEdges;
836
838 std::unordered_map<const GUIGlObject*, GNELane*> myLanes;
839
841 std::unordered_map<const GUIGlObject*, GNEConnection*> myConnections;
842
844 std::unordered_map<const GUIGlObject*, GNEInternalLane*> myInternalLanes;
845
847 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEAdditional*>, std::hash<int> > myAdditionalIDs;
848
850 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*>, std::hash<int> > myAdditionals;
851
853 std::unordered_map<SumoXMLTag, std::unordered_map<const GNEAttributeCarrier*, GNETAZSourceSink*>, std::hash<int> > myTAZSourceSinks;
854
856 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEDemandElement*>, std::hash<int> > myDemandElementIDs;
857
859 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*>, std::hash<int> > myDemandElements;
860
862 std::map<const std::string, GNEDataSet*> myDataSets;
863
865 std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*> myDataIntervals;
866
868 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*>, std::hash<int> > myGenericDatas;
869
871 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*>, std::hash<int> > myMeanDatas;
872
875
878
881 };
882
885
886 public:
888 ACTemplate(GNENet* net);
889
891 void buildTemplates();
892
894 ~ACTemplate();
895
897 std::map<SumoXMLTag, GNEAttributeCarrier*> getACTemplates() const;
898
901
903 GNEAttributeCarrier* getTemplateAC(const std::string& selectorText) const;
904
905 private:
907 GNENet* myNet = nullptr;
908
910 std::map<SumoXMLTag, GNEAttributeCarrier*> myTemplates;
911
913 ACTemplate() = delete;
914
916 ACTemplate(const ACTemplate&) = delete;
917
919 ACTemplate& operator=(const ACTemplate& src) = delete;
920 };
921
924
925 public:
927 typedef std::map<std::string, std::unordered_set<const GNEAttributeCarrier*> > ACsbyFilename;
928
931
933 void updateNeteditConfig();
934
937
939 void addAdditionalFilename(const GNEAttributeCarrier* additionalElement);
940
942 void updateAdditionalEmptyFilenames(const std::string& file);
943
945 const std::vector<std::string>& getAdditionalFilenames() const;
946
949
951 bool existAdditionalFilename(const std::string& file) const;
952
954
957
959 void addDemandFilename(const GNEAttributeCarrier* demandElement);
960
962 void updateDemandEmptyFilenames(const std::string& file);
963
965 const std::vector<std::string>& getDemandFilenames() const;
966
969
971 bool existDemandFilename(const std::string& file) const;
972
974
977
979 void addDataFilename(const GNEAttributeCarrier* dataElement);
980
982 void updateDataEmptyFilenames(const std::string& file);
983
985 const std::vector<std::string>& getDataFilenames() const;
986
989
991 bool existDataFilename(const std::string& file) const;
992
994
997
999 void addMeanDataFilename(const GNEAttributeCarrier* meanDataElement);
1000
1002 void updateMeanDataEmptyFilenames(const std::string& file);
1003
1005 const std::vector<std::string>& getMeanDataFilenames() const;
1006
1009
1011 bool existMeanDataFilename(const std::string& file) const;
1012
1014
1015 private:
1018
1020 std::vector<std::string> myAdditionalElementsSavingFiles;
1021
1023 std::vector<std::string> myDemandElementsSavingFiles;
1024
1026 std::vector<std::string> myDataElementsSavingFiles;
1027
1029 std::vector<std::string> myMeanDataElementsSavingFiles;
1030
1032 std::string parsingSavingFiles(const std::vector<std::string>& savingFiles) const;
1033
1036
1039
1042 };
1043
1046
1047 public:
1049 SavingStatus(GNENet* net);
1050
1053
1055 void requireSaveSumoConfig();
1056
1058 void SumoConfigSaved();
1059
1061 bool isSumoConfigSaved() const;
1062
1064
1067
1070
1072 void neteditConfigSaved();
1073
1075 bool isNeteditConfigSaved() const;
1076
1078
1081
1083 void requireSaveNetwork();
1084
1086 void networkSaved();
1087
1089 bool isNetworkSaved() const;
1090
1092
1095
1097 void requireSaveTLS();
1098
1100 void TLSSaved();
1101
1103 bool isTLSSaved() const;
1104
1106
1109
1111 void requireSaveEdgeType();
1112
1114 void edgeTypeSaved();
1115
1117 bool isEdgeTypeSaved() const;
1118
1120
1123
1126
1128 void additionalsSaved();
1129
1131 bool isAdditionalsSaved() const;
1132
1134
1137
1140
1142 void demandElementsSaved();
1143
1145 bool isDemandElementsSaved() const;
1146
1148
1151
1154
1156 void dataElementsSaved();
1157
1159 bool isDataElementsSaved() const;
1160
1162
1165
1167 void requireSaveMeanDatas();
1168
1170 void meanDatasSaved();
1171
1173 bool isMeanDatasSaved() const;
1174
1176
1179
1181 GNEDialog::Result askSaveNetwork(bool& abortSaving) const;
1182
1184 GNEDialog::Result askSaveAdditionalElements(bool& abortSaving) const;
1185
1187 GNEDialog::Result askSaveDemandElements(bool& abortSaving) const;
1188
1190 GNEDialog::Result askSaveDataElements(bool& abortSaving) const;
1191
1193 GNEDialog::Result askSaveMeanDataElements(bool& abortSaving) const;
1194
1196
1197 private:
1200
1203
1206
1208 bool myNetworkSaved = true;
1209
1211 bool myTLSSaved = true;
1212
1214 bool myEdgeTypeSaved = true;
1215
1218
1221
1224
1227
1229 SavingStatus() = delete;
1230
1232 SavingStatus(const SavingStatus&) = delete;
1233
1236 };
1237
1240 FXDECLARE_ABSTRACT(GNEChange_ReplaceEdgeInTLS)
1241
1242 public:
1245
1248
1250 void undo();
1251
1253 void redo();
1254
1256 std::string undoName() const;
1257
1259 std::string redoName() const;
1260
1262 bool trueChange();
1263
1264 private:
1267
1270
1273 };
1274};
Supermode
@brie enum for supermodes
long long int SUMOTime
Definition GUI.h:36
unsigned int GUIGlID
Definition GUIGlObject.h:44
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
The main window of Netedit.
the function-object for an editing operation (abstract base)
Definition GNEChange.h:56
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition GNECrossing.h:44
Result
list of possible results when closing the dialog
Definition GNEDialog.h:67
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
modul for AC Templates
std::map< SumoXMLTag, GNEAttributeCarrier * > myTemplates
map with templates
GNENet * myNet
pointer to net
ACTemplate & operator=(const ACTemplate &src)=delete
Invalidated assignment operator.
std::map< SumoXMLTag, GNEAttributeCarrier * > getACTemplates() const
get all AC templates
void buildTemplates()
build templates
ACTemplate()=delete
Invalidated default constructor.
ACTemplate(const ACTemplate &)=delete
Invalidated copy constructor.
GNEAttributeCarrier * getTemplateAC(const SumoXMLTag tag) const
get template AC by tag
struct used for saving all attribute carriers of net, in different formats
std::vector< GNEEdge * > retrieveEdges(GNEJunction *from, GNEJunction *to) const
get all edges by from and to GNEJunction
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * >, std::hash< int > > & getDemandElements() const
get demand elements
GNETAZSourceSink * retrieveTAZSourceSink(const GNEAttributeCarrier *sourceSink, bool hardFail=true) const
Returns the named sourceSink.
void insertWalkingArea(GNEWalkingArea *walkingArea)
insert walkingArea in container
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool hardFail=true) const
get a single attribute carrier based on a GLID
int getNumberOfSelectedAdditionals() const
get number of selected additionals (Including POIs, Polygons, TAZs and Wires)
const std::unordered_map< const GUIGlObject *, GNEConnection * > & getConnections() const
get connections
int getNumberOfSelectedJpsObstacles() const
get number of selected obstacles
int getNumberOfSelectedConnections() const
get number of selected connections
void deleteDataSet(GNEDataSet *dataSet)
delete data set of container
int myNumberOfDemandElements
number of demand elemements inserted in AttributeCarriers (excluding default vTypes)
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * >, std::hash< int > > myGenericDatas
map with the tag and pointer to all generic datas
void addPrefixToJunctions(const std::string &prefix)
add prefix to all junctions
void insertLane(GNELane *lane)
insert lane in container
int getNumberOfSelectedEdgeRelDatas() const
get number of selected edge rel datas
int getNumberOfSelectedCrossings() const
get number of selected crossings
GNEEdgeType * registerEdgeType(GNEEdgeType *edgeType)
registers a edge in containers
std::vector< GNEAdditional * > getSelectedShapes() const
get selected shapes
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
std::map< const std::string, GNEDataSet * > myDataSets
map with the ID and pointer to all datasets of net
void insertDataSet(GNEDataSet *dataSet)
Insert a data set in container.
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
void clearTAZSourceSinks()
clear sourceSinks
std::unordered_map< const GUIGlObject *, GNEInternalLane * > myInternalLanes
map with internal lanes
const std::unordered_map< const GUIGlObject *, GNECrossing * > & getCrossings() const
get crossings
void insertGenericData(GNEGenericData *genericData)
insert generic data in container
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with containers
void deleteDemandElement(GNEDemandElement *demandElement, const bool updateFrames)
delete demand element of container
void insertDataInterval(const GNEAttributeCarrier *AC, GNEDataInterval *dataInterval)
insert data interval in container
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * >, std::hash< int > > & getGenericDatas() const
get all generic datas
int getNumberOfSelectedPersonTrips() const
get number of selected person trips
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
int getNumberOfMeanDatas() const
get number of meanDatas
GNECrossing * retrieveCrossing(const GUIGlObject *glObject, bool hardFail=true) const
get Crossing by AC
void addPrefixToEdges(const std::string &prefix)
add prefix to all edges
void remapJunctionAndEdgeIds()
remap junction and edge IDs
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag tag=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
AttributeCarriers()=delete
Invalidated default constructor.
void clearEdgeTypes()
clear edgeTypes
std::map< std::string, GNEJunction * > myJunctions
map with the ID and pointer to junctions of net
std::string generateEdgeID() const
generate edge ID
int getNumberOfSelectedTranships() const
get number of selected tranships
const std::unordered_map< SumoXMLTag, std::unordered_map< const GNEAttributeCarrier *, GNETAZSourceSink * >, std::hash< int > > & getTAZSourceSinks() const
get sourceSinks
int getNumberOfSelectedVehicles() const
get number of selected vehicles
int getNumberOfSelectedWalks() const
get number of selected walks
void deleteEdgeType(GNEEdgeType *edgeType)
delete edge type from container
int getNumberOfSelectedJpsWalkableAreas() const
get number of selected walkable areas
void deleteInternalLane(GNEInternalLane *internalLane)
delete internalLane from container
std::unordered_map< const GUIGlObject *, GNEConnection * > myConnections
map with connetions
void deleteConnection(GNEConnection *connection)
delete connection from container
void clearAdditionals()
clear additionals
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::vector< GNEGenericData * > retrieveGenericDatas(const SumoXMLTag genericDataTag, const double begin, const double end)
retrieve generic datas within the given interval
void insertInternalLane(GNEInternalLane *internalLane)
insert internalLane in container
int getStopIndex()
get (and update) stop index
std::set< std::string > retrieveGenericDataParameters(const std::string &genericDataTag, const double begin, const double end) const
return a set of parameters for the given data Interval
std::vector< GNEWalkingArea * > getSelectedWalkingAreas() const
return all selected walkingAreas
GNENet * myNet
pointer to net
void deleteSingleJunction(GNEJunction *junction)
delete junction from container
GNEMeanData * retrieveMeanData(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named meanData.
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction in containers
const std::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * >, std::hash< int > > & getMeanDatas() const
get meanDatas
int getNumberOfSelectedWalkingAreas() const
get number of selected walkingAreas
GNEWalkingArea * retrieveWalkingArea(const GUIGlObject *glObject, bool hardFail=true) const
get WalkingArea by GlObject
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
const std::map< const std::string, GNEDataSet * > & getDataSets() const
get demand elements
int myNumberOfDataElements
number of data elemements inserted in AttributeCarriers
std::vector< GNEDemandElement * > getSelectedDemandElements() const
get selected demand elements
void updateJunctionID(GNEJunction *junction, const std::string &newID)
update junction ID in container
void deleteGenericData(GNEGenericData *genericData)
delete generic data of container
void insertCrossing(GNECrossing *crossing)
insert crossing in container
int getNumberOfSelectedWires() const
get number of selected Wires
std::string generateMeanDataID(SumoXMLTag type) const
generate meanData id
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * >, std::hash< int > > myMeanDatas
map with the tag and pointer to meanData elements of net
void insertMeanData(GNEMeanData *meanData)
Insert a meanData element in container.
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
int getNumberOfSelectedTAZs() const
get number of selected TAZs
void deleteWalkingArea(GNEWalkingArea *walkingArea)
delete walkingArea from container
int getNumberOfSelectedTransport() const
get number of selected transports
void updateMeanDataID(GNEMeanData *meanData, const std::string &newID)
update meanData ID in container
std::vector< GNELane * > getSelectedLanes() const
get selected lanes
void insertConnection(GNEConnection *connection)
insert connection in container
std::vector< GNEAdditional * > getSelectedAdditionals() const
get selected additionals
int getNumberOfSelectedJunctions() const
get number of selected junctions
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEAdditional * >, std::hash< int > > myAdditionalIDs
map with the tag and pointer to additional elements of net, sorted by IDs
int getNumberOfDataElements() const
get number of current data elements saved in AttributeCarriers
int getNumberOfGenericDatas() const
Return the number of generic datas.
void updateAdditionalID(GNEAdditional *additional, const std::string &newID)
update additional ID in container
int getNumberOfSelectedDemandElements() const
get number of selected demand elements
std::unordered_map< SumoXMLTag, std::unordered_map< const GNEAttributeCarrier *, GNETAZSourceSink * >, std::hash< int > > myTAZSourceSinks
map with the tag and pointer to TAZSourceSinks elements of net
int getNumberOfSelectedPersons() const
get number of selected persons
int getNumberOfSelectedPureAdditionals() const
get number of selected pure additionals (Except POIs, Polygons, TAZs and Wires)
GNEEdgeType * retrieveEdgeType(const std::string &id, bool hardFail=true) const
get edge type by id
AttributeCarriers(const AttributeCarriers &)=delete
Invalidated copy constructor.
int myNumberOfNetworkElements
number of network elemements inserted in AttributeCarriers
void deleteMeanData(GNEMeanData *meanData)
delete meanData element of container
GNEAdditional * retrieveAdditionals(const std::vector< SumoXMLTag > types, const std::string &id, bool hardFail=true) const
Returns the named additional.
int getNumberOfSelectedRoutes() const
get number of selected routes
void addDefaultVTypes()
add default VTypes
int getNumberOfSelectedPOIs() const
get number of selected POIs
void deleteSingleEdge(GNEEdge *edge)
delete edge from container
GNEDemandElement * retrieveDemandElements(const std::vector< SumoXMLTag > types, const std::string &id, bool hardFail=true) const
Returns the named demand element.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
void deleteAdditional(GNEAdditional *additional)
delete additional element of container
int getNumberOfDemandElements() const
get number of current demand elements saved in AttributeCarriers (default vTypes are NOT included)
int getNumberOfSelectedPolygons() const
get number of selected polygons
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * >, std::hash< int > > myAdditionals
map with the tag and pointer to additional elements of net
int getNumberOfAdditionals() const
get number of additionals
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEDemandElement * >, std::hash< int > > myDemandElementIDs
map with the tag and pointer to demand elements of net, sorted by IDs
void updateDemandElementID(GNEDemandElement *demandElement, const std::string &newID)
update demand element ID in container
bool isNetworkElementAroundTriangle(GNEAttributeCarrier *AC, const Triangle &triangle) const
check if shape of given AC (network element) is around the given triangle
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element in container.
void insertTAZSourceSink(GNETAZSourceSink *sourceSink)
Insert a sourceSink element in container.
void updateEdgeID(GNEEdge *edge, const std::string &newID)
update edge ID in container
std::map< std::string, GNEEdgeType * > myEdgeTypes
map with the ID and pointer to edgeTypes of net
GNEDataInterval * retrieveDataInterval(const GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the data interval.
std::vector< GNECrossing * > getSelectedCrossings() const
return all selected crossings
int getNumberOfSelectedLanes() const
get number of selected lanes
GNEAdditional * retrieveRerouterInterval(const std::string &rerouterID, const SUMOTime begin, const SUMOTime end) const
Returns the rerouter interval defined by given begin and end.
int getNumberOfSelectedEdgeDatas() const
get number of selected edge datas
void updateEdgeTypeID(GNEEdgeType *edgeType, const std::string &newID)
update edgeType ID in container
GNEInternalLane * retrieveInternalLane(const GUIGlObject *glObject, bool hardFail=true) const
get InternalLane by GUIGlObject
void updateDemandElementFrames(const GNETagProperties *tagProperty)
update demand element frames (called after insert/delete demand element)
void insertAdditional(GNEAdditional *additional)
Insert a additional element in container.
void retrieveAttributeCarriersRecursively(const GNETagProperties *tag, std::vector< GNEAttributeCarrier * > &ACs)
retrieve attribute carriers recursively
void insertEdgeType(GNEEdgeType *edgeType)
insert edge type in container
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
const std::unordered_map< const GUIGlObject *, GNELane * > & getLanes() const
get lanes
const std::unordered_map< const GNEAttributeCarrier *, GNEDataInterval * > & getDataIntervals() const
get all data intervals of network
int getNumberOfSelectedEdgeTAZRel() const
get number of selected edge TAZ Rels
std::vector< GNEGenericData * > getSelectedGenericDatas() const
get selected generic datas
void deleteLane(GNELane *lane)
delete lane from container
void insertJunction(GNEJunction *junction)
insert junction in container
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
int getNumberOfNetworkElements() const
functions related with number of elements sorted by categories
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
int getNumberOfSelectedEdges() const
get number of selected edges
const std::map< std::string, GNEEdgeType * > & getEdgeTypes() const
map with the ID and pointer to edgeTypes of net
void clearMeanDatas()
clear meanDatas
std::unordered_map< const GUIGlObject *, GNELane * > myLanes
map with lanes
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
std::vector< GNEConnection * > getSelectedConnections() const
get selected connections
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * >, std::hash< int > > myDemandElements
map with the tag and pointer to demand elements elements of net
void clearJunctions()
clear junctions
const std::unordered_map< const GUIGlObject *, GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
std::unordered_map< const GNEAttributeCarrier *, GNEDataInterval * > myDataIntervals
map with all data intervals of network
void deleteCrossing(GNECrossing *crossing)
delete crossing from container
std::unordered_map< const GUIGlObject *, GNEWalkingArea * > myWalkingAreas
set with walkingAreas
GNEDemandElement * getDefaultType() const
get default type
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * >, std::hash< int > > & getAdditionals() const
get additionals
std::map< std::string, GNEEdge * > myEdges
map with the ID and pointer to edges of net
GNEGenericData * retrieveGenericData(const GUIGlObject *glObject, bool hardFail=true) const
Returns the generic data.
AttributeCarriers & operator=(const AttributeCarriers &)=delete
Invalidated assignment operator.
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
int getNumberOfSelectedStops() const
get number of selected stops
std::string generateEdgeTypeID() const
generate edgeType id
void deleteDataInterval(GNEDataInterval *dataInterval)
delete data interval of container
GNEConnection * retrieveConnection(const std::string &id, bool hardFail=true) const
get Connection by id
std::unordered_map< const GUIGlObject *, GNECrossing * > myCrossings
set with crossings
int myNumberOfMeanDataElements
number of mean data elemements inserted in AttributeCarriers
void deleteTAZSourceSink(GNETAZSourceSink *sourceSink)
delete sourceSink element of container
int getNumberOfSelectedContainers() const
get number of selected containers
std::string generateDataSetID() const
generate data set id
int getNumberOfTAZSourceSinks() const
get number of TAZSourceSinks
class for GNEChange_ReplaceEdgeInTLS
std::string undoName() const
undo name
NBTrafficLightLogicCont & myTllcont
container for traffic light logic
std::string redoName() const
get Redo name
bool trueChange()
wether original and new value differ
modul for handling saving files
std::vector< std::string > myDemandElementsSavingFiles
vector with demand elements saving files
bool existMeanDataFilename(const std::string &file) const
check if the given meanData file was already registered
ACsbyFilename getMeanDatasByFilename()
get meanDatas sorted by filenames (and also clear unused filenames)
std::string parsingSavingFiles(const std::vector< std::string > &savingFiles) const
parsing saving files
const std::vector< std::string > & getAdditionalFilenames() const
get vector with additional elements saving files (starting with default)
SavingFilesHandler(const SavingFilesHandler &)=delete
Invalidated copy constructor.
std::vector< std::string > myDataElementsSavingFiles
vector with data elements saving files
void addDataFilename(const GNEAttributeCarrier *dataElement)
data elements
std::vector< std::string > myAdditionalElementsSavingFiles
vector with additional elements saving files
void updateMeanDataEmptyFilenames(const std::string &file)
update meanData elements with empty filenames with the given file
void addMeanDataFilename(const GNEAttributeCarrier *meanDataElement)
meanData elements
ACsbyFilename getDatasByFilename()
get datas sorted by filenames (and also clear unused filenames)
void updateAdditionalEmptyFilenames(const std::string &file)
update additional elements with empty filenames with the given file
const std::vector< std::string > & getDemandFilenames() const
get vector with demand elements saving files (starting with default)
bool existAdditionalFilename(const std::string &file) const
check if the given additional file was already registered
void updateDataEmptyFilenames(const std::string &file)
update data elements with empty filenames with the given file
std::vector< std::string > myMeanDataElementsSavingFiles
vector with mean data elements saving files
bool existDataFilename(const std::string &file) const
check if the given data file was already registered
void updateNeteditConfig()
update netedit config
ACsbyFilename getAdditionalsByFilename()
get additionals sorted by filenames (and also clear unused filenames)
ACsbyFilename getDemandsByFilename()
get demands sorted by filenames (and also clear unused filenames)
SavingFilesHandler & operator=(const SavingFilesHandler &)=delete
Invalidated assignment operator.
void updateDemandEmptyFilenames(const std::string &file)
update demand elements with empty filenames with the given file
const std::vector< std::string > & getMeanDataFilenames() const
get vector with meanData elements saving files (starting with default)
const std::vector< std::string > & getDataFilenames() const
get vector with data elements saving files (starting with default)
std::map< std::string, std::unordered_set< const GNEAttributeCarrier * > > ACsbyFilename
typedef used for group ACs by filename
GNENet * myNet
pointer to net
void addDemandFilename(const GNEAttributeCarrier *demandElement)
demand elements
SavingFilesHandler()=delete
Invalidated default constructor.
bool existDemandFilename(const std::string &file) const
check if the given demand file was already registered
void addAdditionalFilename(const GNEAttributeCarrier *additionalElement)
additional elements
modul for Saving status
void requireSaveTLS()
inform that TLS has to be saved
void dataElementsSaved()
mark demand elements as saved
SavingStatus & operator=(const SavingStatus &)=delete
Invalidated assignment operator.
bool isEdgeTypeSaved() const
check if edgeType are saved
bool myNetworkSaved
flag for network saved
void requireSaveNetwork()
inform that network has to be saved
void requireSaveEdgeType()
inform that edgeType has to be saved
bool isTLSSaved() const
check if TLS are saved
void demandElementsSaved()
mark demand elements as saved
bool myAdditionalSaved
flag for additional elements saved
bool myTLSSaved
flag for TLS saved
bool myNeteditConfigSaved
flag for netedit config saved
bool myDataElementSaved
flag for data elements saved
void SumoConfigSaved()
mark SumoConfig as saved
bool myEdgeTypeSaved
flag for edgeType saved
GNEDialog::Result askSaveDemandElements(bool &abortSaving) const
warns about unsaved changes in demand elements and gives the user the option to abort
void additionalsSaved()
mark additionals as saved
void requireSaveNeteditConfig()
inform that netedit config has to be saved
void requireSaveSumoConfig()
inform that SumoConfig has to be saved
bool mySumoConfigSaved
flag for SumoConfigSumoConfig saved
SavingStatus(const SavingStatus &)=delete
Invalidated copy constructor.
void TLSSaved()
mark TLS as saved
bool myMeanDataElementSaved
flag for meanData elements saved
bool isSumoConfigSaved() const
check if SumoConfig is saved
void neteditConfigSaved()
mark netedit config as saved
void requireSaveMeanDatas()
inform that mean data elements has to be saved
void meanDatasSaved()
mark mean data elements as saved
bool isDemandElementsSaved() const
check if demand elements are saved
void requireSaveAdditionals()
inform that additionals has to be saved
bool myDemandElementSaved
flag for demand elements saved
GNEDialog::Result askSaveNetwork(bool &abortSaving) const
warns about unsaved changes in network and gives the user the option to abort
bool isDataElementsSaved() const
check if data elements are saved
GNEDialog::Result askSaveAdditionalElements(bool &abortSaving) const
warns about unsaved changes in additionals and gives the user the option to abort
GNEDialog::Result askSaveDataElements(bool &abortSaving) const
warns about unsaved changes in data elements and gives the user the option to abort
bool isNetworkSaved() const
check if network is saved
bool isMeanDatasSaved() const
check if mean data elements are saved
void requireSaveDataElements()
inform that data elements has to be saved
bool isNeteditConfigSaved() const
check if netedit config is saved
GNENet * myNet
pointer to net
void networkSaved()
mark network as saved
GNEDialog::Result askSaveMeanDataElements(bool &abortSaving) const
warns about unsaved changes in meanData elements and gives the user the option to abort
bool isAdditionalsSaved() const
check if additionals are saved
SavingStatus()=delete
invalidate default constructor
void requireSaveDemandElements()
inform that demand elements has to be saved
void edgeTypeSaved()
mark edgeType as saved
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
The representation of a single edge during network building.
Definition NBEdge.h:92
Instance responsible for building networks.
A container for traffic light definitions and built programs.
A simple triangle defined in 3D.
Definition Triangle.h:35