62 for (
const auto& additionalTagProperty : additionalTagProperties) {
63 myAdditionals.insert(std::make_pair(additionalTagProperty.getTag(), std::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::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::map<const GUIGlObject*, GNEDemandElement*>()));
82 for (
const auto& genericDataElementTagProperty : genericDataElementTagProperties) {
83 myGenericDatas.insert(std::make_pair(genericDataElementTagProperty.getTag(), std::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()) {
228 if (
object !=
nullptr) {
234 throw ProcessError(
"GUIGlObject does not match the declared type");
238 }
else if (hardFail) {
239 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
246std::vector<GNEAttributeCarrier*>
248 std::vector<GNEAttributeCarrier*> result;
250 for (
const auto& junction : myJunctions) {
251 result.push_back(junction.second);
254 for (
const auto& edge : myEdges) {
255 result.push_back(edge.second);
258 for (
const auto& lane : myLanes) {
259 result.push_back(lane.second);
262 for (
const auto& connection : myConnections) {
263 result.push_back(connection.second);
266 for (
const auto& crossing : myCrossings) {
267 result.push_back(crossing.second);
270 for (
const auto& walkingArea : myWalkingAreas) {
271 result.push_back(walkingArea.second);
274 for (
const auto& additional : myAdditionals.at(tag)) {
275 result.push_back(additional.second);
279 if (mergingPlans.size() > 0) {
280 for (
const auto& mergingPlan : mergingPlans) {
281 for (
const auto& demandElemet : myDemandElements.at(mergingPlan.getTag())) {
282 result.push_back(demandElemet.second);
286 for (
const auto& demandElemet : myDemandElements.at(tag)) {
287 result.push_back(demandElemet.second);
291 for (
const auto& dataSet : myDataSets) {
292 result.push_back(dataSet.second);
295 for (
const auto& dataInterval : myDataIntervals) {
296 result.push_back(dataInterval.second);
299 for (
const auto& genericData : myGenericDatas.at(tag)) {
300 result.push_back(genericData.second);
303 for (
const auto& meanData : myMeanDatas.at(tag)) {
304 result.push_back(meanData.second);
311std::vector<GNEAttributeCarrier*>
313 std::vector<GNEAttributeCarrier*> result;
317 for (
const auto& junction : myJunctions) {
318 if (!onlySelected || junction.second->isAttributeCarrierSelected()) {
319 result.push_back(junction.second);
322 for (
const auto& crossing : myCrossings) {
323 if (!onlySelected || crossing.second->isAttributeCarrierSelected()) {
324 result.push_back(crossing.second);
327 for (
const auto& edge : myEdges) {
328 if (!onlySelected || edge.second->isAttributeCarrierSelected()) {
329 result.push_back(edge.second);
332 for (
const auto& lane : myLanes) {
333 if (!onlySelected || lane.second->isAttributeCarrierSelected()) {
334 result.push_back(lane.second);
337 for (
const auto& connection : myConnections) {
338 if (!onlySelected || connection.second->isAttributeCarrierSelected()) {
339 result.push_back(connection.second);
342 for (
const auto& additionalSet : myAdditionals) {
343 for (
const auto& additional : additionalSet.second) {
344 if (!onlySelected || additional.second->isAttributeCarrierSelected()) {
345 result.push_back(additional.second);
350 for (
const auto& demandElementSet : myDemandElements) {
351 for (
const auto& demandElement : demandElementSet.second) {
352 if (!onlySelected || demandElement.second->isAttributeCarrierSelected()) {
353 result.push_back(demandElement.second);
358 for (
const auto& dataSet : myDataSets) {
359 if (!onlySelected || dataSet.second->isAttributeCarrierSelected()) {
360 result.push_back(dataSet.second);
363 for (
const auto& dataInterval : myDataIntervals) {
364 if (!onlySelected || dataInterval.second->isAttributeCarrierSelected()) {
365 result.push_back(dataInterval.second);
368 for (
const auto& genericDataSet : myGenericDatas) {
369 for (
const auto& genericData : genericDataSet.second) {
370 if (!onlySelected || genericData.second->isAttributeCarrierSelected()) {
371 result.push_back(genericData.second);
375 for (
const auto& meanDataSet : myMeanDatas) {
376 for (
const auto& meanData : meanDataSet.second) {
377 if (!onlySelected || meanData.second->isAttributeCarrierSelected()) {
378 result.push_back(meanData.second);
387std::vector<GNEAttributeCarrier*>
390 const auto& editModes = myNet->getViewNet()->getEditModes();
392 std::vector<GNEAttributeCarrier*> result;
401 if (ignoreCurrentSupermode) {
411 result.push_back(AC);
421 auto it = myJunctions.find(
id);
422 if (it != myJunctions.end()) {
427 throw UnknownElement(
"Attempted to retrieve non-existant junction " +
id);
434const std::map<std::string, GNEJunction*>&
440std::vector<GNEJunction*>
442 std::vector<GNEJunction*> result;
444 for (
const auto& junction : myJunctions) {
445 if (junction.second->isAttributeCarrierSelected()) {
446 result.push_back(junction.second);
456 junction->
incRef(
"GNENet::registerJunction");
462 myNet->addGLObjectIntoGrid(junction);
480 auto junctionCopy = myJunctions;
484 for (
const auto& junction : junctionCopy) {
488 myJunctions[prefix + junction.first] = junction.second;
495 if (myJunctions.count(junction->
getID()) == 0) {
496 throw ProcessError(junction->
getTagStr() +
" with ID='" + junction->
getID() +
"' doesn't exist in AttributeCarriers.junction");
497 }
else if (myJunctions.count(newID) != 0) {
498 throw ProcessError(
"There is another " + junction->
getTagStr() +
" with new ID='" + newID +
"' in myJunctions");
503 myNet->getNetBuilder()->getNodeCont().rename(junction->
getNBNode(), newID);
507 myJunctions[junction->
getID()] = junction;
511 myNet->getSavingStatus()->requireSaveNetwork();
519 for (
const auto& junction : myJunctions) {
520 if (junction.second->isAttributeCarrierSelected()) {
530 auto it = myCrossings.find(glObject);
531 if (it != myCrossings.end()) {
543const std::map<const GUIGlObject*, GNECrossing*>&
549std::vector<GNECrossing*>
551 std::vector<GNECrossing*> result;
553 for (
const auto& crossing : myCrossings) {
554 if (crossing.second->isAttributeCarrierSelected()) {
555 result.push_back(crossing.second);
565 for (
const auto& crossing : myCrossings) {
566 if (crossing.second->isAttributeCarrierSelected()) {
576 auto it = myWalkingAreas.find(glObject);
577 if (it != myWalkingAreas.end()) {
589const std::map<const GUIGlObject*, GNEWalkingArea*>&
591 return myWalkingAreas;
595std::vector<GNEWalkingArea*>
597 std::vector<GNEWalkingArea*> result;
599 for (
const auto& walkingArea : myWalkingAreas) {
600 if (walkingArea.second->isAttributeCarrierSelected()) {
601 result.push_back(walkingArea.second);
611 for (
const auto& walkingArea : myWalkingAreas) {
612 if (walkingArea.second->isAttributeCarrierSelected()) {
622 if (myEdgeTypes.count(
id) > 0) {
623 return myEdgeTypes.at(
id);
624 }
else if (hardFail) {
626 throw UnknownElement(
"Attempted to retrieve non-existant EdgeType " +
id);
636 edgeType->
incRef(
"GNENet::registerEdgeType");
643const std::map<std::string, GNEEdgeType*>&
656 if (myEdgeTypes.count(edgeType->
getID()) == 0) {
657 throw ProcessError(edgeType->
getTagStr() +
" with ID='" + edgeType->
getID() +
"' doesn't exist in AttributeCarriers.edgeType");
658 }
else if (myEdgeTypes.count(newID) != 0) {
659 throw ProcessError(
"There is another " + edgeType->
getTagStr() +
" with new ID='" + newID +
"' in myEdgeTypes");
662 myEdgeTypes.erase(edgeType->
getID());
664 myNet->getNetBuilder()->getTypeCont().updateEdgeTypeID(edgeType->
getID(), newID);
668 myEdgeTypes[edgeType->
getID()] = edgeType;
670 myNet->getSavingStatus()->requireSaveNetwork();
678 while (myEdgeTypes.count(
"edgeType_" +
toString(counter)) != 0) {
681 return (
"edgeType_" +
toString(counter));
687 auto it = myEdges.find(
id);
688 if (it != myEdges.end()) {
693 throw UnknownElement(
"Attempted to retrieve non-existant edge " +
id);
702 if ((from ==
nullptr) || (to ==
nullptr)) {
705 std::vector<GNEEdge*> edges;
707 for (
const auto& edge : myEdges) {
708 if ((edge.second->getFromJunction() == from) && (edge.second->getToJunction() == to)) {
709 edges.push_back(edge.second);
716const std::map<std::string, GNEEdge*>&
724 std::vector<GNEEdge*> result;
726 for (
const auto& edge : myEdges) {
727 if (edge.second->isAttributeCarrierSelected()) {
728 result.push_back(edge.second);
737 edge->
incRef(
"GNENet::registerEdge");
742 for (
const auto& lane : edge->
getLanes()) {
756 myNet->addGLObjectIntoGrid(edge);
770 auto edgeCopy = myEdges;
774 for (
const auto& edge : edgeCopy) {
778 myEdges[prefix + edge.first] = edge.second;
785 if (myEdges.count(edge->
getID()) == 0) {
787 }
else if (myEdges.count(newID) != 0) {
788 throw ProcessError(
"There is another " + edge->
getTagStr() +
" with new ID='" + newID +
"' in myEdges");
793 myNet->getNetBuilder()->getEdgeCont().rename(edge->
getNBEdge(), newID);
797 myEdges[edge->
getID()] = edge;
799 for (
const auto& lane : edge->
getLanes()) {
800 lane->updateConnectionIDs();
803 myNet->getSavingStatus()->requireSaveNetwork();
811 for (
const auto& edge : myEdges) {
812 if (edge.second->isAttributeCarrierSelected()) {
823 const GNEEdge* edge = retrieveEdge(edge_id,
false);
824 if (edge !=
nullptr) {
827 for (
auto laneIt : edge->
getLanes()) {
828 if (laneIt->getID() == id) {
833 if (lane ==
nullptr) {
840 if (checkVolatileChange && (myNet->getEdgesAndNumberOfLanes().count(edge_id) == 1) &&
841 myNet->getEdgesAndNumberOfLanes().at(edge_id) != (
int)edge->
getLanes().size()) {
846 }
else if (hardFail) {
856 auto it = myLanes.find(glObject);
857 if (it != myLanes.end()) {
869const std::map<const GUIGlObject*, GNELane*>&
877 std::vector<GNELane*> result;
879 for (
const auto& lane : myLanes) {
880 if (lane.second->isAttributeCarrierSelected()) {
881 result.push_back(lane.second);
891 for (
const auto& lane : myLanes) {
892 if (lane.second->isAttributeCarrierSelected()) {
903 for (
const auto& connection : myConnections) {
904 if (connection.second->getID() == id) {
905 return connection.second;
910 throw UnknownElement(
"Attempted to retrieve non-existant connection " +
id);
919 auto it = myConnections.find(glObject);
920 if (it != myConnections.end()) {
932const std::map<const GUIGlObject*, GNEConnection*>&
934 return myConnections;
938std::vector<GNEConnection*>
940 std::vector<GNEConnection*> result;
942 for (
const auto& connection : myConnections) {
943 if (connection.second->isAttributeCarrierSelected()) {
944 result.push_back(connection.second);
954 for (
const auto& connection : myConnections) {
955 if (connection.second->isAttributeCarrierSelected()) {
965 auto it = myInternalLanes.find(glObject);
966 if (it != myInternalLanes.end()) {
980 auto it = myAdditionalIDs.at(type).find(
id);
981 if (it != myAdditionalIDs.at(type).end()) {
985 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
994 for (
const auto& type : types) {
995 auto it = myAdditionalIDs.at(type).find(
id);
996 if (it != myAdditionalIDs.at(type).end()) {
1001 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
1011 for (
const auto& additionalTag : myAdditionals) {
1012 auto it = additionalTag.second.find(glObject);
1013 if (it != additionalTag.second.end()) {
1018 throw ProcessError(
"Attempted to retrieve non-existant additional (glObject)");
1044 throw ProcessError(
"Attempted to retrieve non-existant rerouter interval");
1048const std::map<SumoXMLTag, std::map<const GUIGlObject*, GNEAdditional*> >&
1050 return myAdditionals;
1054std::vector<GNEAdditional*>
1056 std::vector<GNEAdditional*> result;
1058 for (
const auto& additionalsTags : myAdditionals) {
1059 for (
const auto& additional : additionalsTags.second) {
1060 if (additional.second->isAttributeCarrierSelected()) {
1061 result.push_back(additional.second);
1069std::vector<GNEAdditional*>
1071 std::vector<GNEAdditional*> result;
1073 for (
const auto& additionalsTags : myAdditionals) {
1074 for (
const auto& additional : additionalsTags.second) {
1075 if (additional.second->getTagProperty().isShapeElement() && additional.second->isAttributeCarrierSelected()) {
1076 result.push_back(additional.second);
1087 for (
const auto& additionalsTag : myAdditionals) {
1088 counter += (int)additionalsTag.second.size();
1097 for (
const auto& additionalsTags : myAdditionals) {
1098 for (
const auto& additional : additionalsTags.second) {
1099 myNet->removeGLObjectFromGrid(additional.second);
1103 for (
auto& additionals : myAdditionals) {
1104 additionals.second.clear();
1106 for (
auto& additionals : myAdditionalIDs) {
1107 additionals.second.clear();
1115 const auto it = myAdditionalIDs.at(tag).find(additional->
getID());
1116 if (it == myAdditionalIDs.at(tag).end()) {
1117 throw ProcessError(additional->
getTagStr() +
" with ID='" + additional->
getID() +
"' doesn't exist in AttributeCarriers.additionals");
1120 myAdditionalIDs.at(tag).erase(it);
1123 myAdditionalIDs.at(tag)[newID] = additional;
1135 prefix = neteditOptions.getString(
"busStop-prefix");
1137 prefix = neteditOptions.getString(
"trainStop-prefix");
1139 prefix = neteditOptions.getString(
"containerStop-prefix");
1141 prefix = neteditOptions.getString(
"chargingStation-prefix");
1143 prefix = neteditOptions.getString(
"parkingArea-prefix");
1145 prefix = neteditOptions.getString(
"e1Detector-prefix");
1147 prefix = neteditOptions.getString(
"e2Detector-prefix");
1149 prefix = neteditOptions.getString(
"e3Detector-prefix");
1151 prefix = neteditOptions.getString(
"e1InstantDetector-prefix");
1153 prefix = neteditOptions.getString(
"rerouter-prefix");
1155 prefix = neteditOptions.getString(
"calibrator-prefix");
1157 prefix = neteditOptions.getString(
"routeProbe-prefix");
1159 prefix = neteditOptions.getString(
"vss-prefix");
1161 prefix = neteditOptions.getString(
"tractionSubstation-prefix");
1163 prefix = neteditOptions.getString(
"overheadWire-prefix");
1165 prefix = neteditOptions.getString(
"polygon-prefix");
1167 prefix = neteditOptions.getString(
"poi-prefix");
1171 prefix = neteditOptions.getString(
"jps.walkableArea-prefix");
1173 prefix = neteditOptions.getString(
"jps.obstacle-prefix");
1198 while (retrieveAdditional(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1203 return (prefix +
"_" +
toString(counter));
1210 for (
const auto& additionalsTags : myAdditionals) {
1211 for (
const auto& additional : additionalsTags.second) {
1212 if (additional.second->isAttributeCarrierSelected()) {
1223 return getNumberOfSelectedAdditionals() -
1225 getNumberOfSelectedPolygons() - getNumberOfSelectedPOIs() -
1227 getNumberOfSelectedJpsWalkableAreas() - getNumberOfSelectedJpsObstacles() -
1229 getNumberOfSelectedTAZs() - getNumberOfSelectedTAZSources() - getNumberOfSelectedTAZSinks() -
1231 getNumberOfSelectedWires();
1239 if (poly.second->isAttributeCarrierSelected()) {
1251 if (walkableArea.second->isAttributeCarrierSelected()) {
1263 if (obstacle.second->isAttributeCarrierSelected()) {
1275 if (
POI.second->isAttributeCarrierSelected()) {
1280 if (POILane.second->isAttributeCarrierSelected()) {
1285 if (
POIGEO.second->isAttributeCarrierSelected()) {
1297 if (
TAZ.second->isAttributeCarrierSelected()) {
1309 if (TAZSource.second->isAttributeCarrierSelected()) {
1321 if (TAZSink.second->isAttributeCarrierSelected()) {
1332 for (
const auto& additionalsTags : myAdditionals) {
1333 for (
const auto& additional : additionalsTags.second) {
1334 if (additional.second->isAttributeCarrierSelected() && additional.second->getTagProperty().isWireElement()) {
1345 auto it = myDemandElementIDs.at(type).find(
id);
1346 if (it != myDemandElementIDs.at(type).end()) {
1350 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1359 for (
const auto& type : types) {
1360 auto it = myDemandElementIDs.at(type).find(
id);
1361 if (it != myDemandElementIDs.at(type).end()) {
1366 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1376 for (
const auto& demandElementTag : myDemandElements) {
1377 auto it = demandElementTag.second.find(glObject);
1378 if (it != demandElementTag.second.end()) {
1383 throw ProcessError(
"Attempted to retrieve non-existant demandElement (glObject)");
1390std::vector<GNEDemandElement*>
1392 std::vector<GNEDemandElement*> result;
1394 for (
const auto& demandElementTag : myDemandElements) {
1395 for (
const auto& demandElement : demandElementTag.second) {
1396 if (demandElement.second->isAttributeCarrierSelected()) {
1397 result.push_back(demandElement.second);
1405const std::map<SumoXMLTag, std::map<const GUIGlObject*, GNEDemandElement*> >&
1407 return myDemandElements;
1414 for (
const auto& demandElementTag : myDemandElements) {
1417 for (
const auto& vType : demandElementTag.second) {
1423 counter += (int)demandElementTag.second.size();
1439 prefix = neteditOptions.getString(
"route-prefix");
1441 prefix = neteditOptions.getString(
"routeDistribution-prefix");
1443 prefix = neteditOptions.getString(
"vType-prefix");
1445 prefix = neteditOptions.getString(
"vTypeDistribution-prefix");
1447 prefix = neteditOptions.getString(
"trip-prefix");
1448 }
else if (tagProperty.isVehicle() && !tagProperty.isFlow()) {
1449 prefix = neteditOptions.getString(
"vehicle-prefix");
1450 }
else if (tagProperty.isPerson()) {
1451 if (tagProperty.isFlow()) {
1452 prefix = neteditOptions.getString(
"personflow-prefix");
1454 prefix = neteditOptions.getString(
"person-prefix");
1456 }
else if (tagProperty.isContainer()) {
1457 if (tagProperty.isFlow()) {
1458 prefix = neteditOptions.getString(
"containerflow-prefix");
1460 prefix = neteditOptions.getString(
"container-prefix");
1462 }
else if (tagProperty.isFlow()) {
1463 prefix = neteditOptions.getString(
"flow-prefix");
1488 while (retrieveDemandElement(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1493 return (prefix +
"_" +
toString(counter));
1511 for (
const auto& demandElementsTags : myDemandElements) {
1512 for (
const auto& demandElement : demandElementsTags.second) {
1513 myNet->removeGLObjectFromGrid(demandElement.second);
1517 for (
auto& demandElements : myDemandElements) {
1518 demandElements.second.clear();
1520 for (
auto& demandElements : myDemandElementIDs) {
1521 demandElements.second.clear();
1529 const auto it = myDemandElementIDs.at(tag).find(demandElement->
getID());
1530 if (it == myDemandElementIDs.at(tag).end()) {
1531 throw ProcessError(demandElement->
getTagStr() +
" with ID='" + demandElement->
getID() +
"' doesn't exist in AttributeCarriers.demandElements");
1534 myDemandElementIDs.at(tag).erase(it);
1537 myDemandElementIDs.at(tag)[newID] = demandElement;
1547 myDemandElementIDs.at(defaultVehicleType->
getTagProperty().
getTag()).insert(std::make_pair(defaultVehicleType->
getID(), defaultVehicleType));
1548 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1553 myDemandElementIDs.at(defaultBikeType->
getTagProperty().
getTag()).insert(std::make_pair(defaultBikeType->
getID(), defaultBikeType));
1555 defaultBikeType->
incRef(
"GNENet::DEFAULT_BIKETYPE_ID");
1560 myDemandElementIDs.at(defaultTaxiType->
getTagProperty().
getTag()).insert(std::make_pair(defaultTaxiType->
getID(), defaultTaxiType));
1562 defaultTaxiType->
incRef(
"GNENet::DEFAULT_TAXITYPE_ID");
1567 myDemandElementIDs.at(defaultRailType->
getTagProperty().
getTag()).insert(std::make_pair(defaultRailType->
getID(), defaultRailType));
1569 defaultRailType->
incRef(
"GNENet::DEFAULT_RAILTYPE_ID");
1574 myDemandElementIDs.at(defaultPersonType->
getTagProperty().
getTag()).insert(std::make_pair(defaultPersonType->
getID(), defaultPersonType));
1576 defaultPersonType->
incRef(
"GNENet::DEFAULT_PEDTYPE_ID");
1581 myDemandElementIDs.at(defaultContainerType->
getTagProperty().
getTag()).insert(std::make_pair(defaultContainerType->
getID(), defaultContainerType));
1583 defaultContainerType->
incRef(
"GNENet::DEFAULT_CONTAINERTYPE_ID");
1589 return myStopIndex++;
1596 for (
const auto& demandElementsTags : myDemandElements) {
1597 for (
const auto& demandElement : demandElementsTags.second) {
1598 if (demandElement.second->isAttributeCarrierSelected()) {
1612 if (route.second->isAttributeCarrierSelected()) {
1618 if (vehicle.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1623 if (flow.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1636 if (vehicle.second->isAttributeCarrierSelected()) {
1640 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1641 if (trip.second->isAttributeCarrierSelected()) {
1646 if (vehicle.second->isAttributeCarrierSelected()) {
1650 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1651 if (flow.second->isAttributeCarrierSelected()) {
1656 if (flow.second->isAttributeCarrierSelected()) {
1661 if (flow.second->isAttributeCarrierSelected()) {
1674 if (person.second->isAttributeCarrierSelected()) {
1679 if (personFlow.second->isAttributeCarrierSelected()) {
1692 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1693 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1699 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1700 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1714 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1715 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1721 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1722 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1736 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1737 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1743 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1744 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1758 if (container.second->isAttributeCarrierSelected()) {
1763 if (containerFlow.second->isAttributeCarrierSelected()) {
1776 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1777 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1783 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1784 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1798 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1799 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1805 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1806 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1820 if (route.second->isAttributeCarrierSelected()) {
1825 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1826 for (
const auto& stop : trip.second->getChildDemandElements()) {
1827 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1833 for (
const auto& stop : vehicle.second->getChildDemandElements().front()->getChildDemandElements()) {
1834 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1839 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1840 for (
const auto& stop : flow.second->getChildDemandElements()) {
1841 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1847 for (
const auto& stop : flow.second->getChildDemandElements().front()->getChildDemandElements()) {
1848 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1855 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1856 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1862 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1863 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1870 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1871 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1877 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1878 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1889 for (
const auto& dataSet : myDataSets) {
1890 if (dataSet.second->getID() == id) {
1891 return dataSet.second;
1895 throw ProcessError(
"Attempted to retrieve non-existant data set");
1902const std::map<const std::string, GNEDataSet*>&
1912 while (retrieveDataSet(prefix + dataSetTagStr +
"_" +
toString(counter),
false) !=
nullptr) {
1915 return (prefix + dataSetTagStr +
"_" +
toString(counter));
1921 if (myDataIntervals.count(AC)) {
1922 return myDataIntervals.at(AC);
1923 }
else if (hardFail) {
1924 throw ProcessError(
"Attempted to retrieve non-existant data interval");
1931const std::map<const GNEAttributeCarrier*, GNEDataInterval*>&
1933 return myDataIntervals;
1939 if (myDataIntervals.count(AC) > 0) {
1942 myDataIntervals[AC] = dataInterval;
1945 myNet->getViewNet()->getIntervalBar().markForUpdate();
1951 const auto finder = myDataIntervals.find(dataInterval);
1952 if (finder == myDataIntervals.end()) {
1955 myDataIntervals.erase(finder);
1958 myNet->getViewNet()->removeFromAttributeCarrierInspected(dataInterval);
1959 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataInterval);
1961 myNet->getViewNet()->getIntervalBar().markForUpdate();
1968 for (
const auto& genericDataTag : myGenericDatas) {
1969 auto it = genericDataTag.second.find(glObject);
1970 if (it != genericDataTag.second.end()) {
1975 throw ProcessError(
"Attempted to retrieve non-existant generic (glObject)");
1982std::vector<GNEGenericData*>
1984 std::vector<GNEGenericData*> result;
1986 for (
const auto& genericDataTag : myGenericDatas) {
1987 for (
const auto& genericData : genericDataTag.second) {
1988 if (genericData.second->isAttributeCarrierSelected()) {
1989 result.push_back(genericData.second);
1997const std::map<SumoXMLTag, std::map<const GUIGlObject*, GNEGenericData*> >&
1999 return myGenericDatas;
2003std::vector<GNEGenericData*>
2006 std::vector<GNEGenericData*> genericDatas;
2008 for (
const auto& genericData : myGenericDatas.at(genericDataTag)) {
2010 if ((genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2011 (genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2012 genericDatas.push_back(genericData.second);
2015 return genericDatas;
2023 for (
const auto& genericDataTag : myGenericDatas) {
2024 counter += (int)genericDataTag.second.size();
2035 if (genericData.second->isAttributeCarrierSelected()) {
2048 if (genericData.second->isAttributeCarrierSelected()) {
2061 if (genericData.second->isAttributeCarrierSelected()) {
2077 myNet->getViewNet()->getIntervalBar().markForUpdate();
2083 const auto finder = myGenericDatas.at(genericData->
getTagProperty().
getTag()).find(genericData);
2090 myNet->getViewNet()->removeFromAttributeCarrierInspected(genericData);
2091 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(genericData);
2093 myNet->getViewNet()->getIntervalBar().markForUpdate();
2097std::set<std::string>
2100 std::set<std::string> attributesSolution;
2102 std::vector<GNEGenericData*> genericDatas;
2104 for (
const auto& interval : myDataIntervals) {
2108 for (
const auto& genericData : interval.second->getGenericDataChildren()) {
2109 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2110 genericDatas.push_back(genericData);
2116 for (
const auto& genericData : genericDatas) {
2117 for (
const auto& attribute : genericData->getParametersMap()) {
2118 attributesSolution.insert(attribute.first);
2121 return attributesSolution;
2125std::set<std::string>
2127 const std::string& beginStr,
const std::string& endStr)
const {
2129 std::set<std::string> attributesSolution;
2131 std::vector<GNEDataSet*> dataSets;
2132 std::vector<GNEDataInterval*> dataIntervals;
2134 GNEDataSet* retrievedDataSet = retrieveDataSet(dataSetID,
false);
2136 if (dataSetID.empty()) {
2138 dataSets.reserve(myDataSets.size());
2139 for (
const auto& dataSet : myDataSets) {
2140 dataSets.push_back(dataSet.second);
2142 }
else if (retrievedDataSet) {
2143 dataSets.push_back(retrievedDataSet);
2145 return attributesSolution;
2148 int numberOfIntervals = 0;
2149 for (
const auto& dataSet : dataSets) {
2150 numberOfIntervals += (int)dataSet->getDataIntervalChildren().size();
2153 dataIntervals.reserve(numberOfIntervals);
2155 for (
const auto& dataSet : dataSets) {
2156 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
2158 if (beginStr.empty() && endStr.empty()) {
2159 dataIntervals.push_back(dataInterval.second);
2160 }
else if (endStr.empty()) {
2162 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2163 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) {
2164 dataIntervals.push_back(dataInterval.second);
2166 }
else if (beginStr.empty()) {
2168 const double end = GNEAttributeCarrier::parse<double>(endStr);
2169 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end) {
2170 dataIntervals.push_back(dataInterval.second);
2174 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2175 const double end = GNEAttributeCarrier::parse<double>(endStr);
2176 if ((dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2177 (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2178 dataIntervals.push_back(dataInterval.second);
2184 for (
const auto& dataInterval : dataIntervals) {
2185 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
2187 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2188 for (
const auto& attribute : genericData->getParametersMap()) {
2189 attributesSolution.insert(attribute.first);
2194 return attributesSolution;
2200 for (
const auto& meanData : myMeanDatas.at(type)) {
2201 if (meanData.second->getID() == id) {
2202 return meanData.second;
2206 throw ProcessError(
"Attempted to retrieve non-existant meanData (string)");
2213const std::map<SumoXMLTag, std::map<const std::string, GNEMeanData*> >&
2222 for (
const auto& meanDatasTag : myMeanDatas) {
2223 counter += (int)meanDatasTag.second.size();
2232 for (
auto& meanDatas : myMeanDatas) {
2233 meanDatas.second.clear();
2245 prefix = neteditOptions.getString(
"meanDataEdge-prefix");
2247 prefix = neteditOptions.getString(
"meanDataLane-prefix");
2250 while (retrieveMeanData(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
2253 return (prefix +
"_" +
toString(counter));
2259 myNet->getNetBuilder()->getNodeCont().insert(junction->
getNBNode());
2260 registerJunction(junction);
2267 myNet->getViewNet()->removeFromAttributeCarrierInspected(junction);
2268 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(junction);
2270 myNet->removeGLObjectFromGrid(junction);
2272 myNet->getNetBuilder()->getNodeCont().extract(junction->
getNBNode());
2273 junction->
decRef(
"GNENet::deleteSingleJunction");
2281 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2285 if (myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
2286 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2289 createEdgeFrame->getEdgeTypeSelector()->setCurrentEdgeType(edgeType);
2296 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2298 myNet->getViewNet()->removeFromAttributeCarrierInspected(edgeType);
2299 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edgeType);
2303 if (createEdgeFrame->getEdgeTypeSelector()->getEdgeTypeSelected() == edgeType) {
2304 createEdgeFrame->getEdgeTypeSelector()->clearEdgeTypeSelected();
2307 createEdgeFrame->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2314 myNet->getNetBuilder()->getEdgeCont().insert(nbe);
2326 myNet->getViewNet()->removeFromAttributeCarrierInspected(edge);
2327 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edge);
2329 myNet->removeGLObjectFromGrid(edge);
2332 for (
const auto& lane : edge->
getLanes()) {
2336 myNet->getNetBuilder()->getEdgeCont().extract(myNet->getNetBuilder()->getDistrictCont(), edge->
getNBEdge());
2337 edge->
decRef(
"GNENet::deleteSingleEdge");
2367 if (finder == myLanes.end()) {
2370 myLanes.erase(finder);
2373 myNet->getViewNet()->removeFromAttributeCarrierInspected(lane);
2374 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(lane);
2390 const auto finder = myCrossings.find(crossing->
getGUIGlObject());
2391 if (finder == myCrossings.end()) {
2394 myCrossings.erase(finder);
2397 myNet->getViewNet()->removeFromAttributeCarrierInspected(crossing);
2398 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(crossing);
2414 const auto finder = myWalkingAreas.find(walkingArea->
getGUIGlObject());
2415 if (finder == myWalkingAreas.end()) {
2418 myWalkingAreas.erase(finder);
2421 myNet->getViewNet()->removeFromAttributeCarrierInspected(walkingArea);
2422 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(walkingArea);
2438 const auto finder = myConnections.find(connection->
getGUIGlObject());
2439 if (finder == myConnections.end()) {
2442 myConnections.erase(finder);
2459 const auto finder = myInternalLanes.find(internalLane->
getGUIGlObject());
2460 if (finder == myInternalLanes.end()) {
2463 myInternalLanes.erase(finder);
2471 if (myAdditionals.at(tag).count(additional) > 0) {
2474 myAdditionals.at(tag)[additional->
getGUIGlObject()] = additional;
2476 myAdditionalIDs.at(tag)[additional->
getID()] = additional;
2481 myNet->addGLObjectIntoGrid(additional);
2484 if (myNet->isUpdateGeometryEnabled()) {
2488 myNet->getSavingStatus()->requireSaveAdditionals();
2496 auto itFind = myAdditionals.at(tag).find(additional->
getGUIGlObject());
2498 if (itFind == myAdditionals.at(tag).end()) {
2502 myNet->getViewNet()->removeFromAttributeCarrierInspected(additional);
2503 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(additional);
2505 myAdditionals.at(tag).erase(itFind);
2507 myAdditionalIDs.at(tag).erase(myAdditionalIDs.at(tag).find(additional->
getID()));
2511 myNet->removeGLObjectFromGrid(additional);
2514 myNet->getNetworkPathManager()->removePath(additional);
2515 myNet->getDemandPathManager()->removePath(additional);
2517 myNet->getSavingStatus()->requireSaveAdditionals();
2524 if (myDemandElements.at(tag).count(demandElement) > 0) {
2527 myDemandElements.at(tag)[demandElement->
getGUIGlObject()] = demandElement;
2529 myDemandElementIDs.at(tag)[demandElement->
getID()] = demandElement;
2533 myNet->addGLObjectIntoGrid(demandElement);
2535 if (myNet->isUpdateGeometryEnabled()) {
2539 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2545 myNet->getSavingStatus()->requireSaveDemandElements();
2552 auto viewParent = myNet->getViewNet()->getViewParent();
2554 auto itFind = myDemandElements.at(tag).find(demandElement->
getGUIGlObject());
2556 if (itFind == myDemandElements.at(tag).end()) {
2560 myNet->getViewNet()->removeFromAttributeCarrierInspected(demandElement);
2561 viewParent->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(demandElement);
2562 viewParent->getPersonPlanFrame()->getPersonHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2563 viewParent->getContainerPlanFrame()->getContainerHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2564 if (viewParent->getRouteDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2565 viewParent->getRouteDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2567 if (viewParent->getTypeDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2568 viewParent->getTypeDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2571 if (myNet->getViewNet()->getLastCreatedRoute() == demandElement) {
2572 myNet->getViewNet()->setLastCreatedRoute(
nullptr);
2575 myDemandElements.at(tag).erase(itFind);
2577 myDemandElementIDs.at(tag).erase(myDemandElementIDs.at(tag).find(demandElement->
getID()));
2580 myNet->removeGLObjectFromGrid(demandElement);
2582 myNet->getNetworkPathManager()->removePath(demandElement);
2583 myNet->getDemandPathManager()->removePath(demandElement);
2589 myNet->getSavingStatus()->requireSaveDemandElements();
2595 if (myDataSets.count(dataSet->
getID()) > 0) {
2598 myDataSets[dataSet->
getID()] = dataSet;
2601 myNet->getSavingStatus()->requireSaveDataElements();
2603 myNet->getViewNet()->getIntervalBar().markForUpdate();
2609 const auto finder = myDataSets.find(dataSet->
getID());
2610 if (finder == myDataSets.end()) {
2613 myDataSets.erase(finder);
2616 myNet->getViewNet()->removeFromAttributeCarrierInspected(dataSet);
2617 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataSet);
2619 myNet->getSavingStatus()->requireSaveDataElements();
2621 myNet->getViewNet()->getIntervalBar().markForUpdate();
2633 myNet->getSavingStatus()->requireSaveMeanDatas();
2646 myNet->getViewNet()->removeFromAttributeCarrierInspected(meanData);
2647 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(meanData);
2652 myNet->removeGLObjectFromGrid(meanData);
2655 myNet->getSavingStatus()->requireSaveMeanDatas();
2661 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2663 switch (myNet->getViewNet()->getEditModes().demandEditMode) {
2665 if (tagProperty.
isType()) {
2666 myNet->getViewNet()->getViewParent()->getVehicleFrame()->getTypeSelector()->refreshDemandElementSelector();
2670 if (tagProperty.
isType()) {
2671 myNet->getViewNet()->getViewParent()->getTypeFrame()->getTypeSelector()->refreshTypeSelector(
true);
2675 if (tagProperty.
isType()) {
2676 myNet->getViewNet()->getViewParent()->getTypeDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2681 myNet->getViewNet()->getViewParent()->getRouteDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2685 if (tagProperty.
isType()) {
2686 myNet->getViewNet()->getViewParent()->getPersonFrame()->getTypeSelector()->refreshDemandElementSelector();
2691 myNet->getViewNet()->getViewParent()->getPersonPlanFrame()->getPersonSelector()->refreshDemandElementSelector();
2695 if (tagProperty.
isType()) {
2696 myNet->getViewNet()->getViewParent()->getContainerFrame()->getTypeSelector()->refreshDemandElementSelector();
2701 myNet->getViewNet()->getViewParent()->getContainerPlanFrame()->getContainerSelector()->refreshDemandElementSelector();
2705 myNet->getViewNet()->getViewParent()->getStopFrame()->getStopParentSelector()->refreshDemandElementSelector();
2724 mySumoConfigSaved =
false;
2730 mySumoConfigSaved =
true;
2736 return mySumoConfigSaved;
2743 myNeteditConfigSaved =
false;
2749 myNeteditConfigSaved =
true;
2755 return myNeteditConfigSaved;
2761 myNetworkSaved =
false;
2763 myNeteditConfigSaved =
false;
2764 mySumoConfigSaved =
false;
2770 myNetworkSaved =
true;
2776 return myNetworkSaved;
2800 myEdgeTypeSaved =
false;
2806 myEdgeTypeSaved =
true;
2812 return myEdgeTypeSaved;
2818 myAdditionalSaved =
false;
2820 myNeteditConfigSaved =
false;
2821 mySumoConfigSaved =
false;
2827 myAdditionalSaved =
true;
2833 return myAdditionalSaved;
2839 myDemandElementSaved =
false;
2841 myNeteditConfigSaved =
false;
2842 mySumoConfigSaved =
false;
2848 myDemandElementSaved =
true;
2854 return myDemandElementSaved;
2860 myDataElementSaved =
false;
2862 myNeteditConfigSaved =
false;
2863 mySumoConfigSaved =
false;
2869 myDataElementSaved =
true;
2875 return myDataElementSaved;
2881 myMeanDataElementSaved =
false;
2883 myNeteditConfigSaved =
false;
2884 mySumoConfigSaved =
false;
2890 myMeanDataElementSaved =
true;
2896 return myMeanDataElementSaved;
2906 myReplaced(replaced),
2917 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1,
true);
2924 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1,
true);
2930 return TL(
"Redo replace in TLS");
2936 return TL(
"Undo replace in TLS");
2942 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
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
@ 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,...
static const std::string True
true value in string format (used for comparing boolean values in getAttribute(......
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
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)
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)
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
std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEAdditional * > > myAdditionals
map with the tag and pointer to additional elements of net
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
const std::map< const GUIGlObject *, GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
void insertDataSet(GNEDataSet *dataSet)
Insert a data set in container.
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
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
const std::map< const GNEAttributeCarrier *, GNEDataInterval * > & getDataIntervals() const
get all data intervals of network
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::map< SumoXMLTag, std::map< const std::string, GNEDemandElement * > > myDemandElementIDs
map with the tag and pointer to demand elements of net, sorted by IDs
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
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
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEAdditional * > > & getAdditionals() const
get additionals
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
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 getNumberOfGenericDatas() const
Return the number of generic datas.
void updateAdditionalID(GNEAdditional *additional, const std::string &newID)
update additional ID in container
const std::map< const GUIGlObject *, GNECrossing * > & getCrossings() const
get crossings
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
std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEDemandElement * > > myDemandElements
map with the tag and pointer to additional elements of net
void deleteSingleEdge(GNEEdge *edge)
delete edge from container
std::map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > myMeanDatas
map with the tag and pointer to meanData elements of net
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
Return the number of demand elements.
int getNumberOfSelectedPolygons() const
get number of selected polygons
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEGenericData * > > & getGenericDatas() const
get all generic datas
int getNumberOfAdditionals() const
get number of additionals
void updateDemandElementID(GNEDemandElement *demandElement, const std::string &newID)
update demand element ID in container
const std::map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > & getMeanDatas() const
get meanDatas
void insertEdge(GNEEdge *edge)
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element in container.
const std::map< const GUIGlObject *, GNELane * > & getLanes() const
get lanes
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
std::map< SumoXMLTag, std::map< const std::string, GNEAdditional * > > myAdditionalIDs
map with the tag and pointer to additional elements of net, sorted by IDs
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.
void insertEdgeType(GNEEdgeType *edgeType)
insert edge type in container
const std::map< const GUIGlObject *, GNEConnection * > & getConnections() const
get connections
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
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 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
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
void clearJunctions()
clear junctions
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
void deleteDataInterval(GNEDataInterval *dataInterval)
delete data interval of container
GNEConnection * retrieveConnection(const std::string &id, bool hardFail=true) const
get Connection by id
std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEGenericData * > > myGenericDatas
map with the tag and pointer to all generic datas
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::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