62 for (
const auto& additionalTagProperty : additionalTagProperties) {
63 myAdditionals.insert(std::make_pair(additionalTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEAdditional*>()));
65 myAdditionalIDs.insert(std::make_pair(additionalTagProperty.getTag(), std::map<const std::string, GNEAdditional*>()));
70 for (
const auto& demandElementTagProperty : demandElementTagProperties) {
71 myDemandElements.insert(std::make_pair(demandElementTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEDemandElement*>()));
72 if (demandElementTagProperty.hasAttribute(
SUMO_ATTR_ID)) {
73 myDemandElementIDs.insert(std::make_pair(demandElementTagProperty.getTag(), std::map<const std::string, GNEDemandElement*>()));
77 for (
const auto& stopTagProperty : stopTagProperties) {
78 myDemandElements.insert(std::make_pair(stopTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEDemandElement*>()));
82 for (
const auto& genericDataElementTagProperty : genericDataElementTagProperties) {
83 myGenericDatas.insert(std::make_pair(genericDataElementTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEGenericData*>()));
87 for (
const auto& meanDataTagProperty : meanDataTagProperties) {
88 myMeanDatas.insert(std::make_pair(meanDataTagProperty.getTag(), std::map<const std::string, GNEMeanData*>()));
95 for (
const auto& edgeType : myEdgeTypes) {
96 edgeType.second->decRef(
"GNENetHelper::~GNENet");
98 WRITE_DEBUG(
"Deleting unreferenced " + edgeType.second->getTagStr() +
" '" + edgeType.second->getID() +
"' in AttributeCarriers destructor");
99 delete edgeType.second;
102 for (
const auto& edge : myEdges) {
103 edge.second->decRef(
"GNENetHelper::~GNENet");
105 WRITE_DEBUG(
"Deleting unreferenced " + edge.second->getTagStr() +
" '" + edge.second->getID() +
"' in AttributeCarriers destructor");
109 for (
const auto& junction : myJunctions) {
110 junction.second->decRef(
"GNENetHelper::~GNENet");
112 WRITE_DEBUG(
"Deleting unreferenced " + junction.second->getTagStr() +
" '" + junction.second->getID() +
"' in AttributeCarriers destructor");
113 delete junction.second;
116 for (
const auto& additionalTag : myAdditionals) {
117 for (
const auto& additional : additionalTag.second) {
119 additional.second->decRef();
121 WRITE_DEBUG(
"Deleting unreferenced " + additional.second->getTagStr() +
" in AttributeCarriers destructor");
122 delete additional.second;
126 for (
const auto& demandElementTag : myDemandElements) {
127 for (
const auto& demandElement : demandElementTag.second) {
129 demandElement.second->decRef();
131 if (demandElement.second->getTagProperty().isType()) {
134 WRITE_DEBUG(
"Deleting unreferenced " + demandElement.second->getTagStr() +
" in AttributeCarriers destructor");
137 WRITE_DEBUG(
"Deleting unreferenced " + demandElement.second->getTagStr() +
" in AttributeCarriers destructor");
139 delete demandElement.second;
143 for (
const auto& dataSet : myDataSets) {
145 dataSet.second->decRef();
147 WRITE_DEBUG(
"Deleting unreferenced " + dataSet.second->getTagStr() +
" in AttributeCarriers destructor");
148 delete dataSet.second;
151 for (
const auto& meanDataTag : myMeanDatas) {
152 for (
const auto& meanData : meanDataTag.second) {
154 meanData.second->decRef();
156 WRITE_DEBUG(
"Deleting unreferenced " + meanData.second->getTagStr() +
" in AttributeCarriers destructor");
157 delete meanData.second;
165 std::map<std::string, GNEEdge*> newEdgeMap;
166 std::map<std::string, GNEJunction*> newJunctionMap;
168 for (
const auto& edge : myEdges) {
169 edge.second->setEdgeID(edge.second->getNBEdge()->getID());
170 newEdgeMap[edge.second->getNBEdge()->getID()] = edge.second;
172 for (
const auto& junction : myJunctions) {
173 newJunctionMap[junction.second->getNBNode()->getID()] = junction.second;
174 junction.second->setNetworkElementID(junction.second->getNBNode()->getID());
176 myEdges = newEdgeMap;
177 myJunctions = newJunctionMap;
194 for (
const auto& lane : myEdges.at(AC->
getID())->getLanes()) {
225 return myNumberOfNetworkElements;
231 return myNumberOfDemandElements;
237 return myNumberOfDataElements;
246 if (
object !=
nullptr) {
252 throw ProcessError(
"GUIGlObject does not match the declared type");
256 }
else if (hardFail) {
257 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
264std::vector<GNEAttributeCarrier*>
266 std::vector<GNEAttributeCarrier*> result;
268 for (
const auto& junction : myJunctions) {
269 result.push_back(junction.second);
272 for (
const auto& edge : myEdges) {
273 result.push_back(edge.second);
276 for (
const auto& lane : myLanes) {
277 result.push_back(lane.second);
280 for (
const auto& connection : myConnections) {
281 result.push_back(connection.second);
284 for (
const auto& crossing : myCrossings) {
285 result.push_back(crossing.second);
288 for (
const auto& walkingArea : myWalkingAreas) {
289 result.push_back(walkingArea.second);
292 for (
const auto& additional : myAdditionals.at(tag)) {
293 result.push_back(additional.second);
297 if (mergingPlans.size() > 0) {
298 for (
const auto& mergingPlan : mergingPlans) {
299 for (
const auto& demandElemet : myDemandElements.at(mergingPlan.getTag())) {
300 result.push_back(demandElemet.second);
304 for (
const auto& demandElemet : myDemandElements.at(tag)) {
305 result.push_back(demandElemet.second);
309 for (
const auto& dataSet : myDataSets) {
310 result.push_back(dataSet.second);
313 for (
const auto& dataInterval : myDataIntervals) {
314 result.push_back(dataInterval.second);
317 for (
const auto& genericData : myGenericDatas.at(tag)) {
318 result.push_back(genericData.second);
321 for (
const auto& meanData : myMeanDatas.at(tag)) {
322 result.push_back(meanData.second);
329std::vector<GNEAttributeCarrier*>
331 std::vector<GNEAttributeCarrier*> result;
335 for (
const auto& junction : myJunctions) {
336 if (!onlySelected || junction.second->isAttributeCarrierSelected()) {
337 result.push_back(junction.second);
340 for (
const auto& crossing : myCrossings) {
341 if (!onlySelected || crossing.second->isAttributeCarrierSelected()) {
342 result.push_back(crossing.second);
345 for (
const auto& edge : myEdges) {
346 if (!onlySelected || edge.second->isAttributeCarrierSelected()) {
347 result.push_back(edge.second);
350 for (
const auto& lane : myLanes) {
351 if (!onlySelected || lane.second->isAttributeCarrierSelected()) {
352 result.push_back(lane.second);
355 for (
const auto& connection : myConnections) {
356 if (!onlySelected || connection.second->isAttributeCarrierSelected()) {
357 result.push_back(connection.second);
360 for (
const auto& additionalSet : myAdditionals) {
361 for (
const auto& additional : additionalSet.second) {
362 if (!onlySelected || additional.second->isAttributeCarrierSelected()) {
363 result.push_back(additional.second);
368 for (
const auto& demandElementSet : myDemandElements) {
369 for (
const auto& demandElement : demandElementSet.second) {
370 if (!onlySelected || demandElement.second->isAttributeCarrierSelected()) {
371 result.push_back(demandElement.second);
376 for (
const auto& dataSet : myDataSets) {
377 if (!onlySelected || dataSet.second->isAttributeCarrierSelected()) {
378 result.push_back(dataSet.second);
381 for (
const auto& dataInterval : myDataIntervals) {
382 if (!onlySelected || dataInterval.second->isAttributeCarrierSelected()) {
383 result.push_back(dataInterval.second);
386 for (
const auto& genericDataSet : myGenericDatas) {
387 for (
const auto& genericData : genericDataSet.second) {
388 if (!onlySelected || genericData.second->isAttributeCarrierSelected()) {
389 result.push_back(genericData.second);
393 for (
const auto& meanDataSet : myMeanDatas) {
394 for (
const auto& meanData : meanDataSet.second) {
395 if (!onlySelected || meanData.second->isAttributeCarrierSelected()) {
396 result.push_back(meanData.second);
405std::vector<GNEAttributeCarrier*>
408 const auto& editModes = myNet->getViewNet()->getEditModes();
410 std::vector<GNEAttributeCarrier*> result;
418 if (ignoreCurrentSupermode) {
419 result.push_back(AC);
422 result.push_back(AC);
424 result.push_back(AC);
426 result.push_back(AC);
436 auto it = myJunctions.find(
id);
437 if (it != myJunctions.end()) {
442 throw UnknownElement(
"Attempted to retrieve non-existant junction " +
id);
449const std::map<std::string, GNEJunction*>&
455std::vector<GNEJunction*>
457 std::vector<GNEJunction*> result;
459 for (
const auto& junction : myJunctions) {
460 if (junction.second->isAttributeCarrierSelected()) {
461 result.push_back(junction.second);
471 junction->
incRef(
"GNENet::registerJunction");
474 myNumberOfNetworkElements++;
478 myNet->addGLObjectIntoGrid(junction);
496 auto junctionCopy = myJunctions;
500 for (
const auto& junction : junctionCopy) {
504 myJunctions[prefix + junction.first] = junction.second;
511 if (myJunctions.count(junction->
getID()) == 0) {
512 throw ProcessError(junction->
getTagStr() +
" with ID='" + junction->
getID() +
"' doesn't exist in AttributeCarriers.junction");
513 }
else if (myJunctions.count(newID) != 0) {
514 throw ProcessError(
"There is another " + junction->
getTagStr() +
" with new ID='" + newID +
"' in myJunctions");
519 myNet->getNetBuilder()->getNodeCont().rename(junction->
getNBNode(), newID);
523 myJunctions[junction->
getID()] = junction;
527 myNet->getSavingStatus()->requireSaveNetwork();
535 for (
const auto& junction : myJunctions) {
536 if (junction.second->isAttributeCarrierSelected()) {
546 auto it = myCrossings.find(glObject);
547 if (it != myCrossings.end()) {
559const std::unordered_map<const GUIGlObject*, GNECrossing*>&
565std::vector<GNECrossing*>
567 std::vector<GNECrossing*> result;
569 for (
const auto& crossing : myCrossings) {
570 if (crossing.second->isAttributeCarrierSelected()) {
571 result.push_back(crossing.second);
581 for (
const auto& crossing : myCrossings) {
582 if (crossing.second->isAttributeCarrierSelected()) {
592 auto it = myWalkingAreas.find(glObject);
593 if (it != myWalkingAreas.end()) {
605const std::unordered_map<const GUIGlObject*, GNEWalkingArea*>&
607 return myWalkingAreas;
611std::vector<GNEWalkingArea*>
613 std::vector<GNEWalkingArea*> result;
615 for (
const auto& walkingArea : myWalkingAreas) {
616 if (walkingArea.second->isAttributeCarrierSelected()) {
617 result.push_back(walkingArea.second);
627 for (
const auto& walkingArea : myWalkingAreas) {
628 if (walkingArea.second->isAttributeCarrierSelected()) {
638 if (myEdgeTypes.count(
id) > 0) {
639 return myEdgeTypes.at(
id);
640 }
else if (hardFail) {
642 throw UnknownElement(
"Attempted to retrieve non-existant EdgeType " +
id);
652 edgeType->
incRef(
"GNENet::registerEdgeType");
659const std::map<std::string, GNEEdgeType*>&
672 if (myEdgeTypes.count(edgeType->
getID()) == 0) {
673 throw ProcessError(edgeType->
getTagStr() +
" with ID='" + edgeType->
getID() +
"' doesn't exist in AttributeCarriers.edgeType");
674 }
else if (myEdgeTypes.count(newID) != 0) {
675 throw ProcessError(
"There is another " + edgeType->
getTagStr() +
" with new ID='" + newID +
"' in myEdgeTypes");
678 myEdgeTypes.erase(edgeType->
getID());
680 myNet->getNetBuilder()->getTypeCont().updateEdgeTypeID(edgeType->
getID(), newID);
684 myEdgeTypes[edgeType->
getID()] = edgeType;
686 myNet->getSavingStatus()->requireSaveNetwork();
694 while (myEdgeTypes.count(
"edgeType_" +
toString(counter)) != 0) {
697 return (
"edgeType_" +
toString(counter));
703 auto it = myEdges.find(
id);
704 if (it != myEdges.end()) {
709 throw UnknownElement(
"Attempted to retrieve non-existant edge " +
id);
718 if ((from ==
nullptr) || (to ==
nullptr)) {
721 std::vector<GNEEdge*> edges;
724 if (edgeTo->getToJunction() == to) {
725 edges.push_back(edgeTo);
732const std::map<std::string, GNEEdge*>&
740 std::vector<GNEEdge*> result;
742 for (
const auto& edge : myEdges) {
743 if (edge.second->isAttributeCarrierSelected()) {
744 result.push_back(edge.second);
753 edge->
incRef(
"GNENet::registerEdge");
757 myNumberOfNetworkElements++;
759 for (
const auto& lane : edge->
getLanes()) {
773 myNet->addGLObjectIntoGrid(edge);
787 auto edgeCopy = myEdges;
791 for (
const auto& edge : edgeCopy) {
795 myEdges[prefix + edge.first] = edge.second;
802 if (myEdges.count(edge->
getID()) == 0) {
804 }
else if (myEdges.count(newID) != 0) {
805 throw ProcessError(
"There is another " + edge->
getTagStr() +
" with new ID='" + newID +
"' in myEdges");
810 myNet->getNetBuilder()->getEdgeCont().rename(edge->
getNBEdge(), newID);
814 myEdges[edge->
getID()] = edge;
816 for (
const auto& lane : edge->
getLanes()) {
817 lane->updateConnectionIDs();
820 myNet->getSavingStatus()->requireSaveNetwork();
828 for (
const auto& edge : myEdges) {
829 if (edge.second->isAttributeCarrierSelected()) {
840 const GNEEdge* edge = retrieveEdge(edge_id,
false);
841 if (edge !=
nullptr) {
844 for (
auto laneIt : edge->
getLanes()) {
845 if (laneIt->getID() == id) {
850 if (lane ==
nullptr) {
857 if (checkVolatileChange && (myNet->getEdgesAndNumberOfLanes().count(edge_id) == 1) &&
858 myNet->getEdgesAndNumberOfLanes().at(edge_id) != (
int)edge->
getLanes().size()) {
863 }
else if (hardFail) {
873 auto it = myLanes.find(glObject);
874 if (it != myLanes.end()) {
886const std::unordered_map<const GUIGlObject*, GNELane*>&
894 std::vector<GNELane*> result;
896 for (
const auto& lane : myLanes) {
897 if (lane.second->isAttributeCarrierSelected()) {
898 result.push_back(lane.second);
908 for (
const auto& lane : myLanes) {
909 if (lane.second->isAttributeCarrierSelected()) {
920 for (
const auto& connection : myConnections) {
921 if (connection.second->getID() == id) {
922 return connection.second;
927 throw UnknownElement(
"Attempted to retrieve non-existant connection " +
id);
936 auto it = myConnections.find(glObject);
937 if (it != myConnections.end()) {
949const std::unordered_map<const GUIGlObject*, GNEConnection*>&
951 return myConnections;
955std::vector<GNEConnection*>
957 std::vector<GNEConnection*> result;
959 for (
const auto& connection : myConnections) {
960 if (connection.second->isAttributeCarrierSelected()) {
961 result.push_back(connection.second);
971 for (
const auto& connection : myConnections) {
972 if (connection.second->isAttributeCarrierSelected()) {
982 auto it = myInternalLanes.find(glObject);
983 if (it != myInternalLanes.end()) {
997 auto it = myAdditionalIDs.at(type).find(
id);
998 if (it != myAdditionalIDs.at(type).end()) {
1002 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
1011 for (
const auto& type : types) {
1012 auto it = myAdditionalIDs.at(type).find(
id);
1013 if (it != myAdditionalIDs.at(type).end()) {
1018 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
1028 for (
const auto& additionalTag : myAdditionals) {
1029 auto it = additionalTag.second.find(glObject);
1030 if (it != additionalTag.second.end()) {
1035 throw ProcessError(
"Attempted to retrieve non-existant additional (glObject)");
1061 throw ProcessError(
"Attempted to retrieve non-existant rerouter interval");
1065const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> >&
1067 return myAdditionals;
1071std::vector<GNEAdditional*>
1073 std::vector<GNEAdditional*> result;
1075 for (
const auto& additionalsTags : myAdditionals) {
1076 for (
const auto& additional : additionalsTags.second) {
1077 if (additional.second->isAttributeCarrierSelected()) {
1078 result.push_back(additional.second);
1086std::vector<GNEAdditional*>
1088 std::vector<GNEAdditional*> result;
1090 for (
const auto& additionalsTags : myAdditionals) {
1091 for (
const auto& additional : additionalsTags.second) {
1092 if (additional.second->getTagProperty().isShapeElement() && additional.second->isAttributeCarrierSelected()) {
1093 result.push_back(additional.second);
1104 for (
const auto& additionalsTag : myAdditionals) {
1105 counter += (int)additionalsTag.second.size();
1114 for (
const auto& additionalsTags : myAdditionals) {
1115 for (
const auto& additional : additionalsTags.second) {
1116 myNet->removeGLObjectFromGrid(additional.second);
1120 for (
auto& additionals : myAdditionals) {
1121 additionals.second.clear();
1123 for (
auto& additionals : myAdditionalIDs) {
1124 additionals.second.clear();
1132 const auto it = myAdditionalIDs.at(tag).find(additional->
getID());
1133 if (it == myAdditionalIDs.at(tag).end()) {
1134 throw ProcessError(additional->
getTagStr() +
" with ID='" + additional->
getID() +
"' doesn't exist in AttributeCarriers.additionals");
1137 myAdditionalIDs.at(tag).erase(it);
1140 myAdditionalIDs.at(tag)[newID] = additional;
1152 prefix = neteditOptions.getString(
"busStop-prefix");
1154 prefix = neteditOptions.getString(
"trainStop-prefix");
1156 prefix = neteditOptions.getString(
"containerStop-prefix");
1158 prefix = neteditOptions.getString(
"chargingStation-prefix");
1160 prefix = neteditOptions.getString(
"parkingArea-prefix");
1162 prefix = neteditOptions.getString(
"e1Detector-prefix");
1164 prefix = neteditOptions.getString(
"e2Detector-prefix");
1166 prefix = neteditOptions.getString(
"e3Detector-prefix");
1168 prefix = neteditOptions.getString(
"e1InstantDetector-prefix");
1170 prefix = neteditOptions.getString(
"rerouter-prefix");
1172 prefix = neteditOptions.getString(
"calibrator-prefix");
1174 prefix = neteditOptions.getString(
"routeProbe-prefix");
1176 prefix = neteditOptions.getString(
"vss-prefix");
1178 prefix = neteditOptions.getString(
"tractionSubstation-prefix");
1180 prefix = neteditOptions.getString(
"overheadWire-prefix");
1182 prefix = neteditOptions.getString(
"polygon-prefix");
1184 prefix = neteditOptions.getString(
"poi-prefix");
1188 prefix = neteditOptions.getString(
"jps.walkableArea-prefix");
1190 prefix = neteditOptions.getString(
"jps.obstacle-prefix");
1215 while (retrieveAdditional(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1220 return (prefix +
"_" +
toString(counter));
1227 for (
const auto& additionalsTags : myAdditionals) {
1228 for (
const auto& additional : additionalsTags.second) {
1229 if (additional.second->isAttributeCarrierSelected()) {
1240 return getNumberOfSelectedAdditionals() -
1242 getNumberOfSelectedPolygons() - getNumberOfSelectedPOIs() -
1244 getNumberOfSelectedJpsWalkableAreas() - getNumberOfSelectedJpsObstacles() -
1246 getNumberOfSelectedTAZs() - getNumberOfSelectedTAZSources() - getNumberOfSelectedTAZSinks() -
1248 getNumberOfSelectedWires();
1256 if (poly.second->isAttributeCarrierSelected()) {
1268 if (walkableArea.second->isAttributeCarrierSelected()) {
1280 if (obstacle.second->isAttributeCarrierSelected()) {
1292 if (
POI.second->isAttributeCarrierSelected()) {
1297 if (POILane.second->isAttributeCarrierSelected()) {
1302 if (
POIGEO.second->isAttributeCarrierSelected()) {
1314 if (
TAZ.second->isAttributeCarrierSelected()) {
1326 if (TAZSource.second->isAttributeCarrierSelected()) {
1338 if (TAZSink.second->isAttributeCarrierSelected()) {
1349 for (
const auto& additionalsTags : myAdditionals) {
1350 for (
const auto& additional : additionalsTags.second) {
1351 if (additional.second->isAttributeCarrierSelected() && additional.second->getTagProperty().isWireElement()) {
1362 auto it = myDemandElementIDs.at(type).find(
id);
1363 if (it != myDemandElementIDs.at(type).end()) {
1367 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1376 for (
const auto& type : types) {
1377 auto it = myDemandElementIDs.at(type).find(
id);
1378 if (it != myDemandElementIDs.at(type).end()) {
1383 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1393 for (
const auto& demandElementTag : myDemandElements) {
1394 auto it = demandElementTag.second.find(glObject);
1395 if (it != demandElementTag.second.end()) {
1400 throw ProcessError(
"Attempted to retrieve non-existant demandElement (glObject)");
1407std::vector<GNEDemandElement*>
1409 std::vector<GNEDemandElement*> result;
1411 for (
const auto& demandElementTag : myDemandElements) {
1412 for (
const auto& demandElement : demandElementTag.second) {
1413 if (demandElement.second->isAttributeCarrierSelected()) {
1414 result.push_back(demandElement.second);
1422const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> >&
1424 return myDemandElements;
1437 prefix = neteditOptions.getString(
"route-prefix");
1439 prefix = neteditOptions.getString(
"routeDistribution-prefix");
1441 prefix = neteditOptions.getString(
"vType-prefix");
1443 prefix = neteditOptions.getString(
"vTypeDistribution-prefix");
1445 prefix = neteditOptions.getString(
"trip-prefix");
1446 }
else if (tagProperty.isVehicle() && !tagProperty.isFlow()) {
1447 prefix = neteditOptions.getString(
"vehicle-prefix");
1448 }
else if (tagProperty.isPerson()) {
1449 if (tagProperty.isFlow()) {
1450 prefix = neteditOptions.getString(
"personflow-prefix");
1452 prefix = neteditOptions.getString(
"person-prefix");
1454 }
else if (tagProperty.isContainer()) {
1455 if (tagProperty.isFlow()) {
1456 prefix = neteditOptions.getString(
"containerflow-prefix");
1458 prefix = neteditOptions.getString(
"container-prefix");
1460 }
else if (tagProperty.isFlow()) {
1461 prefix = neteditOptions.getString(
"flow-prefix");
1486 while (retrieveDemandElement(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1491 return (prefix +
"_" +
toString(counter));
1509 for (
const auto& demandElementsTags : myDemandElements) {
1510 for (
const auto& demandElement : demandElementsTags.second) {
1511 myNet->removeGLObjectFromGrid(demandElement.second);
1515 for (
auto& demandElements : myDemandElements) {
1516 demandElements.second.clear();
1518 for (
auto& demandElements : myDemandElementIDs) {
1519 demandElements.second.clear();
1527 const auto it = myDemandElementIDs.at(tag).find(demandElement->
getID());
1528 if (it == myDemandElementIDs.at(tag).end()) {
1529 throw ProcessError(demandElement->
getTagStr() +
" with ID='" + demandElement->
getID() +
"' doesn't exist in AttributeCarriers.demandElements");
1532 myDemandElementIDs.at(tag).erase(it);
1535 myDemandElementIDs.at(tag)[newID] = demandElement;
1545 myDemandElementIDs.at(defaultVehicleType->
getTagProperty().
getTag()).insert(std::make_pair(defaultVehicleType->
getID(), defaultVehicleType));
1546 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1551 myDemandElementIDs.at(defaultBikeType->
getTagProperty().
getTag()).insert(std::make_pair(defaultBikeType->
getID(), defaultBikeType));
1553 defaultBikeType->
incRef(
"GNENet::DEFAULT_BIKETYPE_ID");
1558 myDemandElementIDs.at(defaultTaxiType->
getTagProperty().
getTag()).insert(std::make_pair(defaultTaxiType->
getID(), defaultTaxiType));
1560 defaultTaxiType->
incRef(
"GNENet::DEFAULT_TAXITYPE_ID");
1565 myDemandElementIDs.at(defaultRailType->
getTagProperty().
getTag()).insert(std::make_pair(defaultRailType->
getID(), defaultRailType));
1567 defaultRailType->
incRef(
"GNENet::DEFAULT_RAILTYPE_ID");
1572 myDemandElementIDs.at(defaultPersonType->
getTagProperty().
getTag()).insert(std::make_pair(defaultPersonType->
getID(), defaultPersonType));
1574 defaultPersonType->
incRef(
"GNENet::DEFAULT_PEDTYPE_ID");
1579 myDemandElementIDs.at(defaultContainerType->
getTagProperty().
getTag()).insert(std::make_pair(defaultContainerType->
getID(), defaultContainerType));
1581 defaultContainerType->
incRef(
"GNENet::DEFAULT_CONTAINERTYPE_ID");
1587 return myStopIndex++;
1594 for (
const auto& demandElementsTags : myDemandElements) {
1595 for (
const auto& demandElement : demandElementsTags.second) {
1596 if (demandElement.second->isAttributeCarrierSelected()) {
1610 if (route.second->isAttributeCarrierSelected()) {
1616 if (vehicle.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1621 if (flow.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1634 if (vehicle.second->isAttributeCarrierSelected()) {
1638 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1639 if (trip.second->isAttributeCarrierSelected()) {
1644 if (vehicle.second->isAttributeCarrierSelected()) {
1648 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1649 if (flow.second->isAttributeCarrierSelected()) {
1654 if (flow.second->isAttributeCarrierSelected()) {
1659 if (flow.second->isAttributeCarrierSelected()) {
1672 if (person.second->isAttributeCarrierSelected()) {
1677 if (personFlow.second->isAttributeCarrierSelected()) {
1690 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1691 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1697 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1698 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1712 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1713 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1719 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1720 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1734 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1735 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1741 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1742 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1756 if (container.second->isAttributeCarrierSelected()) {
1761 if (containerFlow.second->isAttributeCarrierSelected()) {
1774 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1775 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1781 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1782 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1796 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1797 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1803 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1804 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1818 if (route.second->isAttributeCarrierSelected()) {
1823 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1824 for (
const auto& stop : trip.second->getChildDemandElements()) {
1825 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1831 for (
const auto& stop : vehicle.second->getChildDemandElements().front()->getChildDemandElements()) {
1832 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1837 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1838 for (
const auto& stop : flow.second->getChildDemandElements()) {
1839 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1845 for (
const auto& stop : flow.second->getChildDemandElements().front()->getChildDemandElements()) {
1846 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1853 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1854 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1860 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1861 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1868 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1869 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1875 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1876 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1887 for (
const auto& dataSet : myDataSets) {
1888 if (dataSet.second->getID() == id) {
1889 return dataSet.second;
1893 throw ProcessError(
"Attempted to retrieve non-existant data set");
1900const std::map<const std::string, GNEDataSet*>&
1910 while (retrieveDataSet(prefix + dataSetTagStr +
"_" +
toString(counter),
false) !=
nullptr) {
1913 return (prefix + dataSetTagStr +
"_" +
toString(counter));
1919 if (myDataIntervals.count(AC)) {
1920 return myDataIntervals.at(AC);
1921 }
else if (hardFail) {
1922 throw ProcessError(
"Attempted to retrieve non-existant data interval");
1929const std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*>&
1931 return myDataIntervals;
1937 if (myDataIntervals.count(AC) > 0) {
1940 myDataIntervals[AC] = dataInterval;
1943 myNet->getViewNet()->getIntervalBar().markForUpdate();
1949 const auto finder = myDataIntervals.find(dataInterval);
1950 if (finder == myDataIntervals.end()) {
1953 myDataIntervals.erase(finder);
1956 myNet->getViewNet()->getInspectedElements().uninspectAC(dataInterval);
1958 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataInterval);
1960 myNet->getViewNet()->getIntervalBar().markForUpdate();
1967 for (
const auto& genericDataTag : myGenericDatas) {
1968 auto it = genericDataTag.second.find(glObject);
1969 if (it != genericDataTag.second.end()) {
1974 throw ProcessError(
"Attempted to retrieve non-existant generic (glObject)");
1981std::vector<GNEGenericData*>
1983 std::vector<GNEGenericData*> result;
1985 for (
const auto& genericDataTag : myGenericDatas) {
1986 for (
const auto& genericData : genericDataTag.second) {
1987 if (genericData.second->isAttributeCarrierSelected()) {
1988 result.push_back(genericData.second);
1996const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> >&
1998 return myGenericDatas;
2002std::vector<GNEGenericData*>
2005 std::vector<GNEGenericData*> genericDatas;
2007 for (
const auto& genericData : myGenericDatas.at(genericDataTag)) {
2009 if ((genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2010 (genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2011 genericDatas.push_back(genericData.second);
2014 return genericDatas;
2022 for (
const auto& genericDataTag : myGenericDatas) {
2023 counter += (int)genericDataTag.second.size();
2034 if (genericData.second->isAttributeCarrierSelected()) {
2047 if (genericData.second->isAttributeCarrierSelected()) {
2060 if (genericData.second->isAttributeCarrierSelected()) {
2076 myNet->getViewNet()->getIntervalBar().markForUpdate();
2082 const auto finder = myGenericDatas.at(genericData->
getTagProperty().
getTag()).find(genericData);
2089 myNet->getViewNet()->getInspectedElements().uninspectAC(genericData);
2091 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(genericData);
2093 myNet->getDataPathManager()->removePath(genericData);
2095 myNet->getViewNet()->getIntervalBar().markForUpdate();
2099std::set<std::string>
2102 std::set<std::string> attributesSolution;
2104 std::vector<GNEGenericData*> genericDatas;
2106 for (
const auto& interval : myDataIntervals) {
2110 for (
const auto& genericData : interval.second->getGenericDataChildren()) {
2111 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2112 genericDatas.push_back(genericData);
2118 for (
const auto& genericData : genericDatas) {
2119 for (
const auto& attribute : genericData->getParametersMap()) {
2120 attributesSolution.insert(attribute.first);
2123 return attributesSolution;
2127std::set<std::string>
2129 const std::string& beginStr,
const std::string& endStr)
const {
2131 std::set<std::string> attributesSolution;
2133 std::vector<GNEDataSet*> dataSets;
2134 std::vector<GNEDataInterval*> dataIntervals;
2136 GNEDataSet* retrievedDataSet = retrieveDataSet(dataSetID,
false);
2138 if (dataSetID.empty()) {
2140 dataSets.reserve(myDataSets.size());
2141 for (
const auto& dataSet : myDataSets) {
2142 dataSets.push_back(dataSet.second);
2144 }
else if (retrievedDataSet) {
2145 dataSets.push_back(retrievedDataSet);
2147 return attributesSolution;
2150 int numberOfIntervals = 0;
2151 for (
const auto& dataSet : dataSets) {
2152 numberOfIntervals += (int)dataSet->getDataIntervalChildren().size();
2155 dataIntervals.reserve(numberOfIntervals);
2157 for (
const auto& dataSet : dataSets) {
2158 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
2160 if (beginStr.empty() && endStr.empty()) {
2161 dataIntervals.push_back(dataInterval.second);
2162 }
else if (endStr.empty()) {
2164 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2165 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) {
2166 dataIntervals.push_back(dataInterval.second);
2168 }
else if (beginStr.empty()) {
2170 const double end = GNEAttributeCarrier::parse<double>(endStr);
2171 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end) {
2172 dataIntervals.push_back(dataInterval.second);
2176 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2177 const double end = GNEAttributeCarrier::parse<double>(endStr);
2178 if ((dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2179 (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2180 dataIntervals.push_back(dataInterval.second);
2186 for (
const auto& dataInterval : dataIntervals) {
2187 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
2189 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2190 for (
const auto& attribute : genericData->getParametersMap()) {
2191 attributesSolution.insert(attribute.first);
2196 return attributesSolution;
2202 for (
const auto& meanData : myMeanDatas.at(type)) {
2203 if (meanData.second->getID() == id) {
2204 return meanData.second;
2208 throw ProcessError(
"Attempted to retrieve non-existant meanData (string)");
2215const std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> >&
2223 return myNumberOfMeanDataElements;
2230 for (
auto& meanDatas : myMeanDatas) {
2231 meanDatas.second.clear();
2239 const auto it = myMeanDatas.at(tag).find(meanData->
getID());
2240 if (it == myMeanDatas.at(tag).end()) {
2241 throw ProcessError(meanData->
getTagStr() +
" with ID='" + meanData->
getID() +
"' doesn't exist in AttributeCarriers.meanDatas");
2244 myMeanDatas.at(tag).erase(it);
2245 myMeanDatas.at(tag)[newID] = meanData;
2257 prefix = neteditOptions.getString(
"meanDataEdge-prefix");
2259 prefix = neteditOptions.getString(
"meanDataLane-prefix");
2262 while (retrieveMeanData(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
2265 return (prefix +
"_" +
toString(counter));
2271 myNet->getNetBuilder()->getNodeCont().insert(junction->
getNBNode());
2272 registerJunction(junction);
2279 myNet->getViewNet()->getInspectedElements().uninspectAC(junction);
2281 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(junction);
2283 myNet->removeGLObjectFromGrid(junction);
2285 myNumberOfNetworkElements--;
2286 myNet->getNetBuilder()->getNodeCont().extract(junction->
getNBNode());
2287 junction->
decRef(
"GNENet::deleteSingleJunction");
2295 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2298 myNumberOfNetworkElements++;
2300 if (myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
2301 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2304 createEdgeFrame->getEdgeTypeSelector()->setCurrentEdgeType(edgeType);
2311 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2313 myNet->getViewNet()->getInspectedElements().uninspectAC(edgeType);
2315 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edgeType);
2318 myNumberOfNetworkElements--;
2320 if (createEdgeFrame->getEdgeTypeSelector()->getEdgeTypeSelected() == edgeType) {
2321 createEdgeFrame->getEdgeTypeSelector()->clearEdgeTypeSelected();
2324 createEdgeFrame->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2331 myNet->getNetBuilder()->getEdgeCont().insert(nbe);
2343 myNet->getViewNet()->getInspectedElements().uninspectAC(edge);
2345 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edge);
2347 myNet->removeGLObjectFromGrid(edge);
2349 myNumberOfNetworkElements--;
2351 for (
const auto& lane : edge->
getLanes()) {
2355 myNet->getNetBuilder()->getEdgeCont().extract(myNet->getNetBuilder()->getDistrictCont(), edge->
getNBEdge());
2356 edge->
decRef(
"GNENet::deleteSingleEdge");
2379 myNumberOfNetworkElements++;
2387 if (finder == myLanes.end()) {
2390 myLanes.erase(finder);
2391 myNumberOfNetworkElements--;
2393 myNet->getViewNet()->getInspectedElements().uninspectAC(lane);
2395 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(lane);
2406 myNumberOfNetworkElements++;
2413 const auto finder = myCrossings.find(crossing->
getGUIGlObject());
2414 if (finder == myCrossings.end()) {
2417 myCrossings.erase(finder);
2418 myNumberOfNetworkElements--;
2420 myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
2422 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(crossing);
2433 myNumberOfNetworkElements++;
2440 const auto finder = myWalkingAreas.find(walkingArea->
getGUIGlObject());
2441 if (finder == myWalkingAreas.end()) {
2444 myWalkingAreas.erase(finder);
2445 myNumberOfNetworkElements--;
2447 myNet->getViewNet()->getInspectedElements().uninspectAC(walkingArea);
2449 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(walkingArea);
2460 myNumberOfNetworkElements++;
2467 const auto finder = myConnections.find(connection->
getGUIGlObject());
2468 if (finder == myConnections.end()) {
2471 myConnections.erase(finder);
2472 myNumberOfNetworkElements--;
2474 myNet->getViewNet()->getInspectedElements().uninspectAC(connection);
2476 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(connection);
2487 myNumberOfNetworkElements++;
2494 const auto finder = myInternalLanes.find(internalLane->
getGUIGlObject());
2495 if (finder == myInternalLanes.end()) {
2498 myInternalLanes.erase(finder);
2499 myNumberOfNetworkElements--;
2507 if (myAdditionals.at(tag).count(additional) > 0) {
2510 myAdditionals.at(tag)[additional->
getGUIGlObject()] = additional;
2512 myAdditionalIDs.at(tag)[additional->
getID()] = additional;
2514 myNumberOfNetworkElements++;
2517 myNet->addGLObjectIntoGrid(additional);
2520 if (myNet->isUpdateGeometryEnabled()) {
2524 myNet->getSavingStatus()->requireSaveAdditionals();
2533 auto itFind = myAdditionals.at(tag).find(additional->
getGUIGlObject());
2535 if (itFind == myAdditionals.at(tag).end()) {
2539 myAdditionals.at(tag).erase(itFind);
2541 myAdditionalIDs.at(tag).erase(myAdditionalIDs.at(tag).find(additional->
getID()));
2543 myNumberOfNetworkElements--;
2545 myNet->getViewNet()->getInspectedElements().uninspectAC(additional);
2547 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(additional);
2550 myNet->removeGLObjectFromGrid(additional);
2553 myNet->getNetworkPathManager()->removePath(additional);
2555 myNet->getSavingStatus()->requireSaveAdditionals();
2563 if (myDemandElements.at(tag).count(demandElement) > 0) {
2566 myDemandElements.at(tag)[demandElement->
getGUIGlObject()] = demandElement;
2567 myNumberOfDemandElements++;
2569 myDemandElementIDs.at(tag)[demandElement->
getID()] = demandElement;
2572 myNet->addGLObjectIntoGrid(demandElement);
2574 if (myNet->isUpdateGeometryEnabled()) {
2578 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2584 myNet->getSavingStatus()->requireSaveDemandElements();
2592 auto viewParent = myNet->getViewNet()->getViewParent();
2594 auto itFind = myDemandElements.at(tag).find(demandElement->
getGUIGlObject());
2596 if (itFind == myDemandElements.at(tag).end()) {
2600 myDemandElements.at(tag).erase(itFind);
2602 myDemandElementIDs.at(tag).erase(myDemandElementIDs.at(tag).find(demandElement->
getID()));
2604 myNumberOfDemandElements--;
2606 myNet->removeGLObjectFromGrid(demandElement);
2608 myNet->getViewNet()->getInspectedElements().uninspectAC(demandElement);
2610 viewParent->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(demandElement);
2611 viewParent->getPersonPlanFrame()->getPersonHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2612 viewParent->getContainerPlanFrame()->getContainerHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2613 if (viewParent->getRouteDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2614 viewParent->getRouteDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2616 if (viewParent->getTypeDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2617 viewParent->getTypeDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2620 if (myNet->getViewNet()->getLastCreatedRoute() == demandElement) {
2621 myNet->getViewNet()->setLastCreatedRoute(
nullptr);
2624 myNet->getDemandPathManager()->removePath(demandElement);
2630 myNet->getSavingStatus()->requireSaveDemandElements();
2637 if (myDataSets.count(dataSet->
getID()) > 0) {
2640 myDataSets[dataSet->
getID()] = dataSet;
2641 myNumberOfDataElements++;
2643 myNet->getSavingStatus()->requireSaveDataElements();
2645 myNet->getViewNet()->getIntervalBar().markForUpdate();
2652 const auto finder = myDataSets.find(dataSet->
getID());
2653 if (finder == myDataSets.end()) {
2656 myDataSets.erase(finder);
2657 myNumberOfDataElements--;
2659 myNet->getViewNet()->getInspectedElements().uninspectAC(dataSet);
2661 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataSet);
2663 myNet->getSavingStatus()->requireSaveDataElements();
2665 myNet->getViewNet()->getIntervalBar().markForUpdate();
2676 myNumberOfMeanDataElements++;
2678 myNet->getSavingStatus()->requireSaveMeanDatas();
2692 myNet->getViewNet()->getInspectedElements().uninspectAC(meanData);
2694 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(meanData);
2697 myNumberOfMeanDataElements--;
2700 myNet->removeGLObjectFromGrid(meanData);
2703 myNet->getSavingStatus()->requireSaveMeanDatas();
2710 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2712 switch (myNet->getViewNet()->getEditModes().demandEditMode) {
2714 if (tagProperty.
isType()) {
2715 myNet->getViewNet()->getViewParent()->getVehicleFrame()->getTypeSelector()->refreshDemandElementSelector();
2719 if (tagProperty.
isType()) {
2720 myNet->getViewNet()->getViewParent()->getTypeFrame()->getTypeSelector()->refreshTypeSelector(
true);
2724 if (tagProperty.
isType()) {
2725 myNet->getViewNet()->getViewParent()->getTypeDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2730 myNet->getViewNet()->getViewParent()->getRouteDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2734 if (tagProperty.
isType()) {
2735 myNet->getViewNet()->getViewParent()->getPersonFrame()->getTypeSelector()->refreshDemandElementSelector();
2740 myNet->getViewNet()->getViewParent()->getPersonPlanFrame()->getPersonSelector()->refreshDemandElementSelector();
2744 if (tagProperty.
isType()) {
2745 myNet->getViewNet()->getViewParent()->getContainerFrame()->getTypeSelector()->refreshDemandElementSelector();
2750 myNet->getViewNet()->getViewParent()->getContainerPlanFrame()->getContainerSelector()->refreshDemandElementSelector();
2754 myNet->getViewNet()->getViewParent()->getStopFrame()->getStopParentSelector()->refreshDemandElementSelector();
2773 mySumoConfigSaved =
false;
2779 mySumoConfigSaved =
true;
2785 return mySumoConfigSaved;
2792 myNeteditConfigSaved =
false;
2798 myNeteditConfigSaved =
true;
2804 return myNeteditConfigSaved;
2810 myNetworkSaved =
false;
2812 myNeteditConfigSaved =
false;
2813 mySumoConfigSaved =
false;
2819 myNetworkSaved =
true;
2825 return myNetworkSaved;
2849 myEdgeTypeSaved =
false;
2855 myEdgeTypeSaved =
true;
2861 return myEdgeTypeSaved;
2867 myAdditionalSaved =
false;
2869 myNeteditConfigSaved =
false;
2870 mySumoConfigSaved =
false;
2876 myAdditionalSaved =
true;
2882 return myAdditionalSaved;
2888 myDemandElementSaved =
false;
2890 myNeteditConfigSaved =
false;
2891 mySumoConfigSaved =
false;
2897 myDemandElementSaved =
true;
2903 return myDemandElementSaved;
2909 myDataElementSaved =
false;
2911 myNeteditConfigSaved =
false;
2912 mySumoConfigSaved =
false;
2918 myDataElementSaved =
true;
2924 return myDataElementSaved;
2930 myMeanDataElementSaved =
false;
2932 myNeteditConfigSaved =
false;
2933 mySumoConfigSaved =
false;
2939 myMeanDataElementSaved =
true;
2945 return myMeanDataElementSaved;
2955 myReplaced(replaced),
2966 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1,
true);
2973 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1,
true);
2979 return TL(
"Redo replace in TLS");
2985 return TL(
"Undo replace in TLS");
2991 return myReplaced != myBy;
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_ROUTEDISTRIBUTION
Mode for editing route distributions.
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_TYPEDISTRIBUTION
Mode for editing type distributions.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_STOP
Mode for editing stops.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ DEMAND_TYPE
Mode for editing types.
GUISelectedStorage gSelected
A global holder of selected objects.
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
const long long int VTYPEPARS_VEHICLECLASS_SET
const std::string DEFAULT_TAXITYPE_ID
const std::string DEFAULT_RAILTYPE_ID
const std::string DEFAULT_PEDTYPE_ID
const std::set< std::string > DEFAULT_VTYPES
const std::string DEFAULT_VTYPE_ID
const std::string DEFAULT_CONTAINERTYPE_ID
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_TAXI
vehicle is a taxi
@ SVC_PEDESTRIAN
pedestrian
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions
@ SUMO_TAG_TRACTION_SUBSTATION
A traction substation.
@ GNE_TAG_TRIP_TAZS
a single trip definition that uses TAZs
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_MEANDATA_LANE
a lane based mean data detector
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route
@ SUMO_TAG_ROUTE_DISTRIBUTION
distribution of a route
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_CONNECTION
connectioon between two lanes
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_WALKINGAREA
walking area for pedestrians
@ GNE_TAG_CALIBRATOR_LANE
A calibrator placed over lane.
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_MEANDATA_EDGE
an edge based mean data detector
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_OVERHEAD_WIRE_SECTION
An overhead wire section.
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route
@ GNE_TAG_POILANE
Point of interest over Lane.
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
An Element which don't belong to GNENet but has influence in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
virtual Position getPositionInView() const =0
Returns position of additional in view.
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory, const bool mergeCommonPlans)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void unmarkForDrawingFront()
unmark for drawing front
static const std::vector< GNETagProperties > getTagPropertiesByMergingTag(SumoXMLTag mergingTag)
get tagProperties associated to the given merging tag
virtual GUIGlObject * getGUIGlObject()=0
the function-object for an editing operation (abstract base)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
An Element which don't belong to GNENet but has influence in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
virtual void computePathElement()=0
compute pathElement
A road/street connecting two junctions (netedit-version)
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void setResponsible(bool newVal)
set responsibility for deleting internal structures
NBEdge * getNBEdge() const
returns the internal NBEdge
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
void setEdgeID(const std::string &newID)
set edge ID
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
An Element which don't belong to GNENet but has influence in the simulation.
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
void setEdgeTemplate(const GNEEdge *edge)
set edge template
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void setResponsible(bool newVal)
set responsibility for deleting internal structures
void updateGeometry()
update pre-computed geometry information (including crossings)
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
NBNode * getNBNode() const
Return net build node.
void addOutgoingGNEEdge(GNEEdge *edge)
add outgoing GNEEdge
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
int getIndex() const
returns the index of the lane
An Element which don't belong to GNENet but has influence in the simulation.
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
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
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
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
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
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
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
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
~AttributeCarriers()
destructor
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
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 insertEdge(GNEEdge *edge)
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element in container.
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 clearEdges()
clear edges
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
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
void deleteCrossing(GNECrossing *crossing)
delete crossing from container
GNEDemandElement * getDefaultType() const
get default type
GNEGenericData * retrieveGenericData(const GUIGlObject *glObject, bool hardFail=true) const
Returns the generic data.
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
AttributeCarriers(GNENet *net)
constructor
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
int getNumberOfSelectedContainers() const
get number of selected containers
std::string undoName() const
undo name
GNEChange_ReplaceEdgeInTLS(NBTrafficLightLogicCont &tllcont, NBEdge *replaced, NBEdge *by)
constructor
~GNEChange_ReplaceEdgeInTLS()
destructor
std::string redoName() const
get Redo name
bool trueChange()
wether original and new value differ
void requireSaveTLS()
inform that TLS has to be saved
void dataElementsSaved()
mark demand elements as saved
bool isEdgeTypeSaved() const
check if edgeType are saved
SavingStatus()
constructor
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
void SumoConfigSaved()
mark SumoConfig as 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
void TLSSaved()
mark TLS as 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 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.
void setNetworkElementID(const std::string &newID)
set network element id
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increase reference.
bool isMeanData() const
return true if tag correspond to a mean data element
bool isContainer() const
return true if tag correspond to a container element
bool isGenericData() const
data elements
bool isNetworkElement() const
element sets
bool isDataElement() const
return true if tag correspond to a data element
bool isType() const
demand elements
bool isRoute() const
return true if tag correspond to a route element
bool isPlacedInRTree() const
return true if Tag correspond to an element that has to be placed in RTREE
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
bool isPerson() const
return true if tag correspond to a person element
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
const PositionVector & getShape() const
The shape of the additional element.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
void unblockObject(GUIGlID id)
Marks an object as unblocked.
GUIGlObject * getObjectBlocking(GUIGlID id) const
Returns the object from the container locking it.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
const std::unordered_set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
The representation of a single edge during network building.
NBNode * getToNode() const
Returns the destination node of the edge.
const std::string & getID() const
NBNode * getFromNode() const
Returns the origin node of the edge.
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
int buildCrossings()
build pedestrian crossings
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
const Position & getPosition() const
const PositionVector & getShape() const
retrieve the junction shape
A container for traffic light definitions and built programs.
const std::string & getID() const
Returns the id.
static const std::vector< SumoXMLTag > types
type namespace
static const std::vector< SumoXMLTag > busStops
busStops namespace
static const std::vector< SumoXMLTag > vehicles
vehicles namespace
static const std::vector< SumoXMLTag > laneAreaDetectors
lane area detectors namespace
static const std::vector< SumoXMLTag > POIs
POIs namespace.
static const std::vector< SumoXMLTag > routes
route namespace
static const std::vector< SumoXMLTag > persons
persons namespace
static const std::vector< SumoXMLTag > calibrators
calibrators namespace
static const std::vector< SumoXMLTag > polygons
polygon namespace
static const std::vector< SumoXMLTag > containers
containers namespace
static OptionsCont & getOptions()
Retrieves the options.
C++ TraCI client API implementation.
double z() const
Returns the z-position.
bool overlapsWith(const AbstractPoly &poly, double offset=0) const
Returns the information whether the given polygon overlaps with this.
bool around(const Position &p, double offset=0) const
Returns the information whether the position vector describes a polygon lying around the given point.
long long int parametersSet
Information for the router which parameter were set.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID