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 GNEJunction;
83 friend class GNEEdge;
84 friend class GNEDataSet;
85 friend class GNEDataInterval;
86 friend class GNEChange_Junction;
87 friend class GNEChange_EdgeType;
88 friend class GNEChange_Edge;
90 friend class GNEChange_Shape;
93 friend class GNEChange_DataSet;
96 friend class GNEChange_MeanData;
97 friend class GNETLSEditorFrame;
98
99 public:
102
105
108
111
115 int getNumberOfNetworkElements() const;
116
118 int getNumberOfDemandElements() const;
119
121 int getNumberOfDataElements() const;
122
124
127
133 GNEAttributeCarrier* retrieveAttributeCarrier(const GUIGlID id, bool hardFail = true) const;
134
138 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(SumoXMLTag tag = SUMO_TAG_NOTHING);
139
141 std::vector<GNEAttributeCarrier*> retrieveAttributeCarriers(Supermode supermode, const bool onlySelected);
142
144 std::vector<GNEAttributeCarrier*> getSelectedAttributeCarriers(const bool ignoreCurrentSupermode);
145
147
150
155 GNEJunction* retrieveJunction(const std::string& id, bool hardFail = true) const;
156
158 const std::map<const std::string, GNEJunction*>& getJunctions() const;
159
161 std::vector<GNEJunction*> getSelectedJunctions() const;
162
165
167 void clearJunctions();
168
170 void addPrefixToJunctions(const std::string& prefix);
171
173 void updateJunctionID(GNEJunction* junction, const std::string& newID);
174
177
179
182
187 GNECrossing* retrieveCrossing(const GUIGlObject* glObject, bool hardFail = true) const;
188
190 const std::unordered_map<const GUIGlObject*, GNECrossing*>& getCrossings() const;
191
193 std::vector<GNECrossing*> getSelectedCrossings() const;
194
197
199
202
207 GNEWalkingArea* retrieveWalkingArea(const GUIGlObject* glObject, bool hardFail = true) const;
208
210 const std::unordered_map<const GUIGlObject*, GNEWalkingArea*>& getWalkingAreas() const;
211
213 std::vector<GNEWalkingArea*> getSelectedWalkingAreas() const;
214
217
219
222
227 GNEEdgeType* retrieveEdgeType(const std::string& id, bool hardFail = true) const;
228
231
233 const std::map<const std::string, GNEEdgeType*>& getEdgeTypes() const;
234
236 void clearEdgeTypes();
237
239 void updateEdgeTypeID(GNEEdgeType* edgeType, const std::string& newID);
240
242 std::string generateEdgeTypeID() const;
243
245
248
253 GNEEdge* retrieveEdge(const std::string& id, bool hardFail = true) const;
254
260 std::vector<GNEEdge*> retrieveEdges(GNEJunction* from, GNEJunction* to) const;
261
263 const std::map<const std::string, GNEEdge*>& getEdges() const;
264
268 std::vector<GNEEdge*> getSelectedEdges() const;
269
272
274 void clearEdges();
275
277 void addPrefixToEdges(const std::string& prefix);
278
280 void updateEdgeID(GNEEdge* edge, const std::string& newID);
281
283 int getNumberOfSelectedEdges() const;
284
286
289
295 GNELane* retrieveLane(const std::string& id, bool hardFail = true, bool checkVolatileChange = false) const;
296
302 GNELane* retrieveLane(const GUIGlObject* glObject, bool hardFail = true) const;
303
305 const std::unordered_map<const GUIGlObject*, GNELane*>& getLanes() const;
306
308 std::vector<GNELane*> getSelectedLanes() const;
309
311 int getNumberOfSelectedLanes() const;
312
314
317
322 GNEConnection* retrieveConnection(const std::string& id, bool hardFail = true) const;
323
329 GNEConnection* retrieveConnection(const GUIGlObject* glObject, bool hardFail = true) const;
330
332 const std::unordered_map<const GUIGlObject*, GNEConnection*>& getConnections() const;
333
335 std::vector<GNEConnection*> getSelectedConnections() const;
336
339
341
344
350 GNEInternalLane* retrieveInternalLane(const GUIGlObject* glObject, bool hardFail = true) const;
351
353
356
362 GNEAdditional* retrieveAdditional(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
363
370 GNEAdditional* retrieveAdditionals(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
371
376 GNEAdditional* retrieveAdditional(const GUIGlObject* glObject, bool hardFail = true) const;
377
383 GNEAdditional* retrieveRerouterInterval(const std::string& rerouterID, const SUMOTime begin, const SUMOTime end) const;
384
386 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> >& getAdditionals() const;
387
389 std::vector<GNEAdditional*> getSelectedAdditionals() const;
390
392 std::vector<GNEAdditional*> getSelectedShapes() const;
393
395 int getNumberOfAdditionals() const;
396
398 void clearAdditionals();
399
401 void updateAdditionalID(GNEAdditional* additional, const std::string& newID);
402
404 std::string generateAdditionalID(SumoXMLTag type) const;
405
408
411
413 int getNumberOfSelectedPolygons() const;
414
417
420
422 int getNumberOfSelectedPOIs() const;
423
425 int getNumberOfSelectedTAZs() const;
426
429
431 int getNumberOfSelectedTAZSinks() const;
432
434 int getNumberOfSelectedWires() const;
435
437
440
445 GNEDemandElement* retrieveDemandElement(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
446
452 GNEDemandElement* retrieveDemandElements(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;
453
458 GNEDemandElement* retrieveDemandElement(const GUIGlObject* glObject, bool hardFail = true) const;
459
461 std::vector<GNEDemandElement*> getSelectedDemandElements() const;
462
464 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> >& getDemandElements() const;
465
467 std::string generateDemandElementID(SumoXMLTag tag) const;
468
471
473 void clearDemandElements();
474
476 void updateDemandElementID(GNEDemandElement* demandElement, const std::string& newID);
477
479 void addDefaultVTypes();
480
482 int getStopIndex();
483
486
488 int getNumberOfSelectedRoutes() const;
489
491 int getNumberOfSelectedVehicles() const;
492
494 int getNumberOfSelectedPersons() const;
495
498
500 int getNumberOfSelectedWalks() const;
501
503 int getNumberOfSelectedRides() const;
504
507
510
513
515 int getNumberOfSelectedStops() const;
516
518
521
525 GNEDataSet* retrieveDataSet(const std::string& id, bool hardFail = true) const;
526
528 const std::map<const std::string, GNEDataSet*>& getDataSets() const;
529
531 std::string generateDataSetID(const std::string& prefix) const;
532
534
537
541 GNEDataInterval* retrieveDataInterval(const GNEAttributeCarrier* AC, bool hardFail = true) const;
542
544 const std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*>& getDataIntervals() const;
545
547
550
554 GNEGenericData* retrieveGenericData(const GUIGlObject* glObject, bool hardFail = true) const;
555
557 std::vector<GNEGenericData*> getSelectedGenericDatas() const;
558
560 const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> >& getGenericDatas() const;
561
563 std::vector<GNEGenericData*> retrieveGenericDatas(const SumoXMLTag genericDataTag, const double begin, const double end);
564
566 int getNumberOfGenericDatas() const;
567
570
573
576
578 std::set<std::string> retrieveGenericDataParameters(const std::string& genericDataTag, const double begin, const double end) const;
579
581 std::set<std::string> retrieveGenericDataParameters(const std::string& dataSetID, const std::string& genericDataTag,
582 const std::string& beginStr, const std::string& endStr) const;
583
585
588
594 GNEMeanData* retrieveMeanData(SumoXMLTag type, const std::string& id, bool hardFail = true) const;
595
597 const std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> >& getMeanDatas() const;
598
600 int getNumberOfMeanDatas() const;
601
603 void clearMeanDatas();
604
606 std::string generateMeanDataID(SumoXMLTag type) const;
607
609
610 protected:
613
615 void insertJunction(GNEJunction* junction);
616
618 void deleteSingleJunction(GNEJunction* junction);
619
621
624
626 void insertEdgeType(GNEEdgeType* edgeType);
627
629 void deleteEdgeType(GNEEdgeType* edgeType);
630
632
636 void insertEdge(GNEEdge* edge);
637
639 void deleteSingleEdge(GNEEdge* edge);
640
642
645
647 void insertLane(GNELane* lane);
648
650 void deleteLane(GNELane* lane);
651
653
656
658 void insertCrossing(GNECrossing* crossing);
659
661 void deleteCrossing(GNECrossing* crossing);
662
664
667
669 void insertWalkingArea(GNEWalkingArea* walkingArea);
670
672 void deleteWalkingArea(GNEWalkingArea* walkingArea);
673
675
678
680 void insertConnection(GNEConnection* connection);
681
683 void deleteConnection(GNEConnection* connection);
684
686
689
691 void insertInternalLane(GNEInternalLane* internalLane);
692
694 void deleteInternalLane(GNEInternalLane* internalLane);
695
697
700
702 void insertAdditional(GNEAdditional* additional);
703
705 void deleteAdditional(GNEAdditional* additional);
706
708
711
713 void insertDemandElement(GNEDemandElement* demandElement);
714
716 void deleteDemandElement(GNEDemandElement* demandElement, const bool updateFrames);
717
719
722
724 void insertDataSet(GNEDataSet* dataSet);
725
727 void deleteDataSet(GNEDataSet* dataSet);
728
730
733
735 void insertDataInterval(const GNEAttributeCarrier* AC, GNEDataInterval* dataInterval);
736
738 void deleteDataInterval(GNEDataInterval* dataInterval);
739
741
744
746 void insertGenericData(GNEGenericData* genericData);
747
749 void deleteGenericData(GNEGenericData* genericData);
750
752
755
757 void insertMeanData(GNEMeanData* meanData);
758
760 void deleteMeanData(GNEMeanData* meanData);
761
763
765 void updateDemandElementFrames(const GNETagProperties& tagProperty);
766
767 private:
770
773
776
779
782
784 std::map<const std::string, GNEJunction*> myJunctions;
785
787 std::unordered_map<const GUIGlObject*, GNECrossing*> myCrossings;
788
790 std::unordered_map<const GUIGlObject*, GNEWalkingArea*> myWalkingAreas;
791
793 std::map<const std::string, GNEEdgeType*> myEdgeTypes;
794
796 std::map<const std::string, GNEEdge*> myEdges;
797
799 std::unordered_map<const GUIGlObject*, GNELane*> myLanes;
800
802 std::unordered_map<const GUIGlObject*, GNEConnection*> myConnections;
803
805 std::unordered_map<const GUIGlObject*, GNEInternalLane*> myInternalLanes;
806
808 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEAdditional*> > myAdditionalIDs;
809
811 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> > myAdditionals;
812
814 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEDemandElement*> > myDemandElementIDs;
815
817 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> > myDemandElements;
818
820 std::map<const std::string, GNEDataSet*> myDataSets;
821
823 std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*> myDataIntervals;
824
826 std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> > myGenericDatas;
827
829 std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> > myMeanDatas;
830
833
836 };
837
840
841 public:
843 SavingStatus();
844
847
850
852 void SumoConfigSaved();
853
855 bool isSumoConfigSaved() const;
856
858
861
864
866 void neteditConfigSaved();
867
869 bool isNeteditConfigSaved() const;
870
872
875
877 void requireSaveNetwork();
878
880 void networkSaved();
881
883 bool isNetworkSaved() const;
884
886
889
891 void requireSaveTLS();
892
894 void TLSSaved();
895
897 bool isTLSSaved() const;
898
900
903
905 void requireSaveEdgeType();
906
908 void edgeTypeSaved();
909
911 bool isEdgeTypeSaved() const;
912
914
917
920
922 void additionalsSaved();
923
925 bool isAdditionalsSaved() const;
926
928
931
934
936 void demandElementsSaved();
937
939 bool isDemandElementsSaved() const;
940
942
945
948
950 void dataElementsSaved();
951
953 bool isDataElementsSaved() const;
954
956
959
962
964 void meanDatasSaved();
965
967 bool isMeanDatasSaved() const;
968
970
971 private:
973 bool mySumoConfigSaved = true;
974
977
979 bool myNetworkSaved = true;
980
982 bool myTLSSaved = true;
983
985 bool myEdgeTypeSaved = true;
986
988 bool myAdditionalSaved = true;
989
992
995
998
1000 SavingStatus(const SavingStatus&) = delete;
1001
1004 };
1005
1008 FXDECLARE_ABSTRACT(GNEChange_ReplaceEdgeInTLS)
1009
1010 public:
1013
1016
1018 void undo();
1019
1021 void redo();
1022
1024 std::string undoName() const;
1025
1027 std::string redoName() const;
1028
1030 bool trueChange();
1031
1032 private:
1035
1038
1041 };
1042};
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
std::map< const std::string, GNEJunction * > myJunctions
map with the ID and pointer to junctions of net
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
std::map< const std::string, GNEEdgeType * > myEdgeTypes
map with the ID and pointer to edgeTypes 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
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
const std::map< const std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag tag=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
void clearEdgeTypes()
clear edgeTypes
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
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
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.
const std::map< const std::string, GNEJunction * > & getJunctions() const
get junctions
void updateEdgeID(GNEEdge *edge, const std::string &newID)
update edge ID in container
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)
int getNumberOfSelectedEdges() const
get number of selected edges
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::map< const std::string, GNEEdge * > myEdges
map with the ID and pointer to edges 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::map< const std::string, GNEEdgeType * > & getEdgeTypes() const
map with the ID and pointer to edgeTypes 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 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.