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-2024 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
24#include <unordered_map>
27#include <netbuild/NBEdge.h>
29#include <netbuild/NBVehicle.h>
33#include <utils/geom/Boundary.h>
40
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;
91 friend class GNEChange_Shape;
94 friend class GNEChange_DataSet;
97 friend class GNEChange_MeanData;
98 friend class GNETLSEditorFrame;
99
100 public:
103
106
109
112
116 int getNumberOfNetworkElements() const;
117
119 int getNumberOfDemandElements() const;
120
122 int getNumberOfDataElements() const;
123
125
128
134 GNEAttributeCarrier* retrieveAttributeCarrier(const GUIGlID id, bool hardFail = true) const;
135
139 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(SumoXMLTag tag = SUMO_TAG_NOTHING);
140
142 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(Supermode supermode, const bool onlySelected);
143
145 std::vector<GNEAttributeCarrier*> getSelectedAttributeCarriers(const bool ignoreCurrentSupermode);
146
148
151
156 GNEJunction* retrieveJunction(const std::string& id, bool hardFail = true) const;
157
159 const std::map<std::string, GNEJunction*>& getJunctions() const;
160
162 std::vector<GNEJunction*> getSelectedJunctions() const;
163
166
168 void clearJunctions();
169
171 void addPrefixToJunctions(const std::string& prefix);
172
174 void updateJunctionID(GNEJunction* junction, const std::string& newID);
175
178
180
183
188 GNECrossing* retrieveCrossing(const GUIGlObject* glObject, bool hardFail = true) const;
189
191 const std::unordered_map<const GUIGlObject*, GNECrossing*>& getCrossings() const;
192
194 std::vector<GNECrossing*> getSelectedCrossings() const;
195
198
200
203
208 GNEWalkingArea* retrieveWalkingArea(const GUIGlObject* glObject, bool hardFail = true) const;
209
211 const std::unordered_map<const GUIGlObject*, GNEWalkingArea*>& getWalkingAreas() const;
212
214 std::vector<GNEWalkingArea*> getSelectedWalkingAreas() const;
215
218
220
223
228 GNEEdgeType* retrieveEdgeType(const std::string& id, bool hardFail = true) const;
229
232
234 const std::map<std::string, GNEEdgeType*>& getEdgeTypes() const;
235
237 void clearEdgeTypes();
238
240 void updateEdgeTypeID(GNEEdgeType* edgeType, const std::string& newID);
241
243 std::string generateEdgeTypeID() const;
244
246
249
254 GNEEdge* retrieveEdge(const std::string& id, bool hardFail = true) const;
255
261 std::vector<GNEEdge*> retrieveEdges(GNEJunction* from, GNEJunction* to) const;
262
264 const std::map<std::string, GNEEdge*>& getEdges() const;
265
269 std::vector<GNEEdge*> getSelectedEdges() const;
270
273
275 void clearEdges();
276
278 void addPrefixToEdges(const std::string& prefix);
279
281 void updateEdgeID(GNEEdge* edge, const std::string& newID);
282
284 int getNumberOfSelectedEdges() const;
285
287
290
296 GNELane* retrieveLane(const std::string& id, bool hardFail = true, bool checkVolatileChange = false) const;
297
303 GNELane* retrieveLane(const GUIGlObject* glObject, bool hardFail = true) const;
304
306 const std::unordered_map<const GUIGlObject*, GNELane*>& getLanes() const;
307
309 std::vector<GNELane*> getSelectedLanes() const;
310
312 int getNumberOfSelectedLanes() const;
313
315
318
323 GNEConnection* retrieveConnection(const std::string& id, bool hardFail = true) const;
324
330 GNEConnection* retrieveConnection(const GUIGlObject* glObject, bool hardFail = true) const;
331
333 const std::unordered_map<const GUIGlObject*, GNEConnection*>& getConnections() const;
334
336 std::vector<GNEConnection*> getSelectedConnections() const;
337
340
342
345
351 GNEInternalLane* retrieveInternalLane(const GUIGlObject* glObject, bool hardFail = true) const;
352
354
357
363 GNEAdditional* retrieveAdditional(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
364
371 GNEAdditional* retrieveAdditionals(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
372
377 GNEAdditional* retrieveAdditional(const GUIGlObject* glObject, bool hardFail = true) const;
378
384 GNEAdditional* retrieveRerouterInterval(const std::string& rerouterID, const SUMOTime begin, const SUMOTime end) const;
385
387 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> >& getAdditionals() const;
388
390 std::vector<GNEAdditional*> getSelectedAdditionals() const;
391
393 std::vector<GNEAdditional*> getSelectedShapes() const;
394
396 int getNumberOfAdditionals() const;
397
399 void clearAdditionals();
400
402 void updateAdditionalID(GNEAdditional* additional, const std::string& newID);
403
405 std::string generateAdditionalID(SumoXMLTag type) const;
406
409
412
414 int getNumberOfSelectedPolygons() const;
415
418
421
423 int getNumberOfSelectedPOIs() const;
424
426 int getNumberOfSelectedTAZs() const;
427
430
432 int getNumberOfSelectedTAZSinks() const;
433
435 int getNumberOfSelectedWires() const;
436
438
441
446 GNEDemandElement* retrieveDemandElement(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
447
453 GNEDemandElement* retrieveDemandElements(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
454
459 GNEDemandElement* retrieveDemandElement(const GUIGlObject* glObject, bool hardFail = true) const;
460
462 std::vector<GNEDemandElement*> getSelectedDemandElements() const;
463
465 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> >& getDemandElements() const;
466
468 std::string generateDemandElementID(SumoXMLTag tag) const;
469
472
474 void clearDemandElements();
475
477 void updateDemandElementID(GNEDemandElement* demandElement, const std::string& newID);
478
480 void addDefaultVTypes();
481
483 int getStopIndex();
484
487
489 int getNumberOfSelectedRoutes() const;
490
492 int getNumberOfSelectedVehicles() const;
493
495 int getNumberOfSelectedPersons() const;
496
499
501 int getNumberOfSelectedWalks() const;
502
504 int getNumberOfSelectedRides() const;
505
508
511
514
516 int getNumberOfSelectedStops() const;
517
519
522
526 GNEDataSet* retrieveDataSet(const std::string& id, bool hardFail = true) const;
527
529 const std::map<const std::string, GNEDataSet*>& getDataSets() const;
530
532 std::string generateDataSetID(const std::string& prefix) const;
533
535
538
542 GNEDataInterval* retrieveDataInterval(const GNEAttributeCarrier* AC, bool hardFail = true) const;
543
545 const std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*>& getDataIntervals() const;
546
548
551
555 GNEGenericData* retrieveGenericData(const GUIGlObject* glObject, bool hardFail = true) const;
556
558 std::vector<GNEGenericData*> getSelectedGenericDatas() const;
559
561 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> >& getGenericDatas() const;
562
564 std::vector<GNEGenericData*> retrieveGenericDatas(const SumoXMLTag genericDataTag, const double begin, const double end);
565
567 int getNumberOfGenericDatas() const;
568
571
574
577
579 std::set<std::string> retrieveGenericDataParameters(const std::string& genericDataTag, const double begin, const double end) const;
580
582 std::set<std::string> retrieveGenericDataParameters(const std::string& dataSetID, const std::string& genericDataTag,
583 const std::string& beginStr, const std::string& endStr) const;
584
586
589
595 GNEMeanData* retrieveMeanData(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
596
598 const std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> >& getMeanDatas() const;
599
601 int getNumberOfMeanDatas() const;
602
604 void clearMeanDatas();
605
607 void updateMeanDataID(GNEMeanData* meanData, const std::string& newID);
608
610 std::string generateMeanDataID(SumoXMLTag type) const;
611
613
614 protected:
617
619 void insertJunction(GNEJunction* junction);
620
622 void deleteSingleJunction(GNEJunction* junction);
623
625
628
630 void insertEdgeType(GNEEdgeType* edgeType);
631
633 void deleteEdgeType(GNEEdgeType* edgeType);
634
636
640 void insertEdge(GNEEdge* edge);
641
643 void deleteSingleEdge(GNEEdge* edge);
644
646
649
651 void insertLane(GNELane* lane);
652
654 void deleteLane(GNELane* lane);
655
657
660
662 void insertCrossing(GNECrossing* crossing);
663
665 void deleteCrossing(GNECrossing* crossing);
666
668
671
673 void insertWalkingArea(GNEWalkingArea* walkingArea);
674
676 void deleteWalkingArea(GNEWalkingArea* walkingArea);
677
679
682
684 void insertConnection(GNEConnection* connection);
685
687 void deleteConnection(GNEConnection* connection);
688
690
693
695 void insertInternalLane(GNEInternalLane* internalLane);
696
698 void deleteInternalLane(GNEInternalLane* internalLane);
699
701
704
706 void insertAdditional(GNEAdditional* additional);
707
709 void deleteAdditional(GNEAdditional* additional);
710
712
715
717 void insertDemandElement(GNEDemandElement* demandElement);
718
720 void deleteDemandElement(GNEDemandElement* demandElement, const bool updateFrames);
721
723
726
728 void insertDataSet(GNEDataSet* dataSet);
729
731 void deleteDataSet(GNEDataSet* dataSet);
732
734
737
739 void insertDataInterval(const GNEAttributeCarrier* AC, GNEDataInterval* dataInterval);
740
742 void deleteDataInterval(GNEDataInterval* dataInterval);
743
745
748
750 void insertGenericData(GNEGenericData* genericData);
751
753 void deleteGenericData(GNEGenericData* genericData);
754
756
759
761 void insertMeanData(GNEMeanData* meanData);
762
764 void deleteMeanData(GNEMeanData* meanData);
765
767
769 void updateDemandElementFrames(const GNETagProperties& tagProperty);
770
771 private:
774
777
780
783
786
789
791 std::map<std::string, GNEJunction*> myJunctions;
792
794 std::unordered_map<const GUIGlObject*, GNECrossing*> myCrossings;
795
797 std::unordered_map<const GUIGlObject*, GNEWalkingArea*> myWalkingAreas;
798
800 std::map<std::string, GNEEdgeType*> myEdgeTypes;
801
803 std::map<std::string, GNEEdge*> myEdges;
804
806 std::unordered_map<const GUIGlObject*, GNELane*> myLanes;
807
809 std::unordered_map<const GUIGlObject*, GNEConnection*> myConnections;
810
812 std::unordered_map<const GUIGlObject*, GNEInternalLane*> myInternalLanes;
813
815 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEAdditional*> > myAdditionalIDs;
816
818 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> > myAdditionals;
819
821 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEDemandElement*> > myDemandElementIDs;
822
824 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> > myDemandElements;
825
827 std::map<const std::string, GNEDataSet*> myDataSets;
828
830 std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*> myDataIntervals;
831
833 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> > myGenericDatas;
834
836 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> > myMeanDatas;
837
840
843 };
844
847
848 public:
850 SavingStatus();
851
854
857
859 void SumoConfigSaved();
860
862 bool isSumoConfigSaved() const;
863
865
868
871
873 void neteditConfigSaved();
874
876 bool isNeteditConfigSaved() const;
877
879
882
884 void requireSaveNetwork();
885
887 void networkSaved();
888
890 bool isNetworkSaved() const;
891
893
896
898 void requireSaveTLS();
899
901 void TLSSaved();
902
904 bool isTLSSaved() const;
905
907
910
912 void requireSaveEdgeType();
913
915 void edgeTypeSaved();
916
918 bool isEdgeTypeSaved() const;
919
921
924
927
929 void additionalsSaved();
930
932 bool isAdditionalsSaved() const;
933
935
938
941
943 void demandElementsSaved();
944
946 bool isDemandElementsSaved() const;
947
949
952
955
957 void dataElementsSaved();
958
960 bool isDataElementsSaved() const;
961
963
966
969
971 void meanDatasSaved();
972
974 bool isMeanDatasSaved() const;
975
977
978 private:
980 bool mySumoConfigSaved = true;
981
984
986 bool myNetworkSaved = true;
987
989 bool myTLSSaved = true;
990
992 bool myEdgeTypeSaved = true;
993
995 bool myAdditionalSaved = true;
996
999
1002
1005
1007 SavingStatus(const SavingStatus&) = delete;
1008
1011 };
1012
1015 FXDECLARE_ABSTRACT(GNEChange_ReplaceEdgeInTLS)
1016
1017 public:
1020
1023
1025 void undo();
1026
1028 void redo();
1029
1031 std::string undoName() const;
1032
1034 std::string redoName() const;
1035
1037 bool trueChange();
1038
1039 private:
1042
1045
1048 };
1049};
Supermode
@brie enum for supermodes
long long int SUMOTime
Definition GUI.h:36
unsigned int GUIGlID
Definition GUIGlObject.h:43
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belong to GNENet but has influence in the simulation.
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
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
An Element which don't belong to GNENet but has influence in the simulation.
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
An Element which don't belong to GNENet but has influence in the simulation.
Definition GNEMeanData.h:33
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
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
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
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)
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::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > myMeanDatas
map with the tag and pointer to meanData elements of net
std::map< const std::string, GNEDataSet * > myDataSets
map with the ID and pointer to all datasets of net
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * > > & getAdditionals() const
get additionals
void insertDataSet(GNEDataSet *dataSet)
Insert a data set in container.
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
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
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
void clearEdgeTypes()
clear edgeTypes
std::map< std::string, GNEJunction * > myJunctions
map with the ID and pointer to junctions of net
int getNumberOfSelectedTranships() const
get number of selected tranships
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
std::string generateDataSetID(const std::string &prefix) const
generate data set id
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::unordered_map< const GUIGlObject *, GNEGenericData * > > & getGenericDatas() const
get all generic datas
int getNumberOfSelectedWalkingAreas() const
get number of selected walkingAreas
GNEWalkingArea * retrieveWalkingArea(const GUIGlObject *glObject, bool hardFail=true) const
get WalkingArea by GlObject
bool isNetworkElementAroundShape(GNEAttributeCarrier *AC, const PositionVector &shape) const
check if shape of given AC (network element) is around the given shape
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
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
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
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)
const std::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > & getMeanDatas() const
get meanDatas
int getNumberOfSelectedPolygons() const
get number of selected polygons
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEAdditional * > > myAdditionalIDs
map with the tag and pointer to additional elements of net, sorted by IDs
int getNumberOfAdditionals() const
get number of additionals
void updateDemandElementID(GNEDemandElement *demandElement, const std::string &newID)
update demand element ID in container
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand 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
int getNumberOfSelectedTAZSources() const
get number of selected TAZSources
void insertAdditional(GNEAdditional *additional)
Insert a additional element in container.
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > myDemandElements
map with the tag and pointer to additional elements of net
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
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEDemandElement * > > myDemandElementIDs
map with the tag and pointer to demand elements of net, sorted by IDs
int getNumberOfSelectedTAZSinks() const
get number of selected TAZSinks
void updateDemandElementFrames(const GNETagProperties &tagProperty)
update demand element frames (called after insert/delete demand element)
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
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
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
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * > > myGenericDatas
map with the tag and pointer to all generic datas
void deleteDataInterval(GNEDataInterval *dataInterval)
delete data interval of container
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * > > myAdditionals
map with the tag and pointer to additional elements of net
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
int getNumberOfSelectedContainers() const
get number of selected containers
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 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
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
bool isDataElementsSaved() const
check if data elements are saved
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
void networkSaved()
mark network as saved
bool isAdditionalsSaved() const
check if additionals are saved
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
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
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 list of positions.