50 GNETagProperties::TagType::SHAPE | GNETagProperties::TagType::SYMBOL | GNETagProperties::TagType::TAZELEMENT | GNETagProperties::TagType::WIRE);
51 for (
const auto& additionalTag : additionalTags) {
52 myAdditionals.insert(std::make_pair(additionalTag.getTag(), std::set<GNEAdditional*>()));
56 for (
const auto& demandElementTag : demandElementTags) {
57 myDemandElements.insert(std::make_pair(demandElementTag.getTag(), std::set<GNEDemandElement*>()));
60 for (
const auto& stopTag : stopTags) {
61 myDemandElements.insert(std::make_pair(stopTag.getTag(), std::set<GNEDemandElement*>()));
65 for (
const auto& genericDataElementTag : genericDataElementTags) {
66 myGenericDatas.insert(std::make_pair(genericDataElementTag.getTag(), std::set<GNEGenericData*>()));
73 for (
const auto& edgeType : myEdgeTypes) {
74 edgeType.second->decRef(
"GNENetHelper::~GNENet");
76 WRITE_DEBUG(
"Deleting unreferenced " + edgeType.second->getTagStr() +
" '" + edgeType.second->getID() +
"' in AttributeCarriers destructor");
77 delete edgeType.second;
80 for (
const auto& edge : myEdges) {
81 edge.second->decRef(
"GNENetHelper::~GNENet");
83 WRITE_DEBUG(
"Deleting unreferenced " + edge.second->getTagStr() +
" '" + edge.second->getID() +
"' in AttributeCarriers destructor");
87 for (
const auto& junction : myJunctions) {
88 junction.second->decRef(
"GNENetHelper::~GNENet");
90 WRITE_DEBUG(
"Deleting unreferenced " + junction.second->getTagStr() +
" '" + junction.second->getID() +
"' in AttributeCarriers destructor");
91 delete junction.second;
94 for (
const auto& additionalTag : myAdditionals) {
95 for (
const auto& additional : additionalTag.second) {
99 WRITE_DEBUG(
"Deleting unreferenced " + additional->getTagStr() +
" in AttributeCarriers destructor");
104 for (
const auto& demandElementTag : myDemandElements) {
105 for (
const auto& demandElement : demandElementTag.second) {
107 demandElement->decRef();
109 if (demandElement->getTagProperty().isVehicleType()) {
112 WRITE_DEBUG(
"Deleting unreferenced " + demandElement->getTagStr() +
" in AttributeCarriers destructor");
115 WRITE_DEBUG(
"Deleting unreferenced " + demandElement->getTagStr() +
" in AttributeCarriers destructor");
117 delete demandElement;
121 for (
const auto& dataSet : myDataSets) {
125 WRITE_DEBUG(
"Deleting unreferenced " + dataSet->getTagStr() +
" in AttributeCarriers destructor");
133 std::map<std::string, GNEEdge*> newEdgeMap;
134 std::map<std::string, GNEJunction*> newJunctionMap;
136 for (
const auto& edge : myEdges) {
137 edge.second->setMicrosimID(edge.second->getNBEdge()->getID());
138 newEdgeMap[edge.second->getNBEdge()->getID()] = edge.second;
140 for (
const auto& junction : myJunctions) {
141 newJunctionMap[junction.second->getNBNode()->getID()] = junction.second;
142 junction.second->setMicrosimID(junction.second->getNBNode()->getID());
144 myEdges = newEdgeMap;
145 myJunctions = newJunctionMap;
162 for (
const auto& lane : myEdges.at(AC->
getID())->getLanes()) {
196 if (
object !=
nullptr) {
202 throw ProcessError(
"GUIGlObject does not match the declared type");
206 }
else if (hardFail) {
207 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
214std::vector<GNEAttributeCarrier*>
216 std::vector<GNEAttributeCarrier*> result;
218 for (
const auto& junction : myJunctions) {
219 result.push_back(junction.second);
222 for (
const auto& edge : myEdges) {
223 result.push_back(edge.second);
226 for (
const auto& lane : myLanes) {
227 result.push_back(lane);
230 for (
const auto& connection : myConnections) {
231 result.push_back(connection);
234 for (
const auto& crossing : myCrossings) {
235 result.push_back(crossing);
238 for (
const auto& walkingArea : myWalkingAreas) {
239 result.push_back(walkingArea);
242 for (
const auto& additional : myAdditionals.at(tag)) {
243 result.push_back(additional);
246 for (
const auto& demandElemet : myDemandElements.at(tag)) {
247 result.push_back(demandElemet);
250 for (
const auto& dataSet : myDataSets) {
251 result.push_back(dataSet);
254 for (
const auto& dataInterval : myDataIntervals) {
255 result.push_back(dataInterval);
258 for (
const auto& genericData : myGenericDatas.at(tag)) {
259 result.push_back(genericData);
266std::vector<GNEAttributeCarrier*>
268 std::vector<GNEAttributeCarrier*> result;
272 for (
const auto& junction : myJunctions) {
273 if (!onlySelected || junction.second->isAttributeCarrierSelected()) {
274 result.push_back(junction.second);
277 for (
const auto& crossing : myCrossings) {
278 if (!onlySelected || crossing->isAttributeCarrierSelected()) {
279 result.push_back(crossing);
282 for (
const auto& edge : myEdges) {
283 if (!onlySelected || edge.second->isAttributeCarrierSelected()) {
284 result.push_back(edge.second);
287 for (
const auto& lane : myLanes) {
288 if (!onlySelected || lane->isAttributeCarrierSelected()) {
289 result.push_back(lane);
292 for (
const auto& connection : myConnections) {
293 if (!onlySelected || connection->isAttributeCarrierSelected()) {
294 result.push_back(connection);
297 for (
const auto& additionalSet : myAdditionals) {
298 for (
const auto& additional : additionalSet.second) {
299 if (!onlySelected || additional->isAttributeCarrierSelected()) {
300 result.push_back(additional);
305 for (
const auto& demandElementSet : myDemandElements) {
306 for (
const auto& demandElement : demandElementSet.second) {
307 if (!onlySelected || demandElement->isAttributeCarrierSelected()) {
308 result.push_back(demandElement);
313 for (
const auto& dataSet : myDataSets) {
314 if (!onlySelected || dataSet->isAttributeCarrierSelected()) {
315 result.push_back(dataSet);
318 for (
const auto& dataInterval : myDataIntervals) {
319 if (!onlySelected || dataInterval->isAttributeCarrierSelected()) {
320 result.push_back(dataInterval);
323 for (
const auto& genericDataSet : myGenericDatas) {
324 for (
const auto& genericData : genericDataSet.second) {
325 if (!onlySelected || genericData->isAttributeCarrierSelected()) {
326 result.push_back(genericData);
335std::vector<GNEAttributeCarrier*>
338 const auto& editModes = myNet->getViewNet()->getEditModes();
340 std::vector<GNEAttributeCarrier*> result;
349 if (ignoreCurrentSupermode) {
359 result.push_back(AC);
369 if (myJunctions.count(
id)) {
370 return myJunctions.at(
id);
371 }
else if (hardFail) {
380const std::map<std::string, GNEJunction*>&
386std::vector<GNEJunction*>
388 std::vector<GNEJunction*> result;
390 for (
const auto& junction : myJunctions) {
391 if (junction.second->isAttributeCarrierSelected()) {
392 result.push_back(junction.second);
402 junction->
incRef(
"GNENet::registerJunction");
408 myNet->addGLObjectIntoGrid(junction);
425 if (myJunctions.count(junction->
getID()) == 0) {
426 throw ProcessError(junction->
getTagStr() +
" with ID='" + junction->
getID() +
"' doesn't exist in AttributeCarriers.junction");
427 }
else if (myJunctions.count(newID) != 0) {
428 throw ProcessError(
"There is another " + junction->
getTagStr() +
" with new ID='" + newID +
"' in myJunctions");
433 myNet->getNetBuilder()->getNodeCont().rename(junction->
getNBNode(), newID);
437 myJunctions[junction->
getID()] = junction;
441 myNet->requireSaveNet(
true);
449 for (
const auto& junction : myJunctions) {
450 if (junction.second->isAttributeCarrierSelected()) {
462 if (crossing && (myCrossings.count(crossing) > 0)) {
464 }
else if (hardFail) {
472const std::set<GNECrossing*>&
478std::vector<GNECrossing*>
480 std::vector<GNECrossing*> result;
482 for (
const auto& crossing : myCrossings) {
483 if (crossing->isAttributeCarrierSelected()) {
484 result.push_back(crossing);
493 if (myCrossings.insert(crossing).second ==
false) {
501 const auto finder = myCrossings.find(crossing);
502 if (finder == myCrossings.end()) {
505 myCrossings.erase(finder);
513 for (
const auto& crossing : myCrossings) {
514 if (crossing->isAttributeCarrierSelected()) {
526 if (walkingArea && (myWalkingAreas.count(walkingArea) > 0)) {
528 }
else if (hardFail) {
536const std::set<GNEWalkingArea*>&
538 return myWalkingAreas;
542std::vector<GNEWalkingArea*>
544 std::vector<GNEWalkingArea*> result;
546 for (
const auto& walkingArea : myWalkingAreas) {
547 if (walkingArea->isAttributeCarrierSelected()) {
548 result.push_back(walkingArea);
557 if (myWalkingAreas.insert(walkingArea).second ==
false) {
565 const auto finder = myWalkingAreas.find(walkingArea);
566 if (finder == myWalkingAreas.end()) {
569 myWalkingAreas.erase(finder);
577 for (
const auto& walkingArea : myWalkingAreas) {
578 if (walkingArea->isAttributeCarrierSelected()) {
588 if (myEdgeTypes.count(
id) > 0) {
589 return myEdgeTypes.at(
id);
590 }
else if (hardFail) {
602 edgeType->
incRef(
"GNENet::registerEdgeType");
609const std::map<std::string, GNEEdgeType*>&
622 if (myEdgeTypes.count(edgeType->
getID()) == 0) {
623 throw ProcessError(edgeType->
getTagStr() +
" with ID='" + edgeType->
getID() +
"' doesn't exist in AttributeCarriers.edgeType");
624 }
else if (myEdgeTypes.count(newID) != 0) {
625 throw ProcessError(
"There is another " + edgeType->
getTagStr() +
" with new ID='" + newID +
"' in myEdgeTypes");
628 myEdgeTypes.erase(edgeType->
getID());
630 myNet->getNetBuilder()->getTypeCont().updateEdgeTypeID(edgeType->
getID(), newID);
634 myEdgeTypes[edgeType->
getID()] = edgeType;
636 myNet->requireSaveNet(
true);
644 while (myEdgeTypes.count(
"edgeType_" +
toString(counter)) != 0) {
647 return (
"edgeType_" +
toString(counter));
653 if (myEdges.count(
id) > 0) {
654 return myEdges.at(
id);
655 }
else if (hardFail) {
666 if ((from ==
nullptr) || (to ==
nullptr)) {
669 std::vector<GNEEdge*> edges;
671 for (
const auto& edge : myEdges) {
672 if ((edge.second->getFromJunction() == from) && (edge.second->getToJunction() == to)) {
673 edges.push_back(edge.second);
680const std::map<std::string, GNEEdge*>&
688 std::vector<GNEEdge*> result;
690 for (
const auto& edge : myEdges) {
691 if (edge.second->isAttributeCarrierSelected()) {
692 result.push_back(edge.second);
701 edge->
incRef(
"GNENet::registerEdge");
708 myNet->addGLObjectIntoGrid(edge);
710 for (
const auto& lane : edge->
getLanes()) {
727 if (myEdges.count(edge->
getID()) == 0) {
729 }
else if (myEdges.count(newID) != 0) {
730 throw ProcessError(
"There is another " + edge->
getTagStr() +
" with new ID='" + newID +
"' in myEdges");
735 myNet->getNetBuilder()->getEdgeCont().rename(edge->
getNBEdge(), newID);
739 myEdges[edge->
getID()] = edge;
741 for (
const auto& lane : edge->
getLanes()) {
742 lane->updateConnectionIDs();
745 myNet->requireSaveNet(
true);
753 for (
const auto& edge : myEdges) {
754 if (edge.second->isAttributeCarrierSelected()) {
765 const GNEEdge* edge = retrieveEdge(edge_id,
false);
766 if (edge !=
nullptr) {
769 for (
auto laneIt : edge->
getLanes()) {
770 if (laneIt->getID() ==
id) {
775 if (lane ==
nullptr) {
782 if (checkVolatileChange && (myNet->getEdgesAndNumberOfLanes().count(edge_id) == 1) &&
783 myNet->getEdgesAndNumberOfLanes().at(edge_id) != (
int)edge->
getLanes().size()) {
788 }
else if (hardFail) {
800 if (lane && (myLanes.count(lane) > 0)) {
802 }
else if (hardFail) {
810const std::set<GNELane*>&
818 std::vector<GNELane*> result;
820 for (
const auto& lane : myLanes) {
821 if (lane->isAttributeCarrierSelected()) {
822 result.push_back(lane);
831 if (myLanes.insert(lane).second ==
false) {
839 const auto finder = myLanes.find(lane);
840 if (finder == myLanes.end()) {
843 myLanes.erase(finder);
851 for (
const auto& lane : myLanes) {
852 if (lane->isAttributeCarrierSelected()) {
863 for (
const auto& connection : myConnections) {
864 if (connection->getID() ==
id) {
881 if (connection && (myConnections.count(connection) > 0)) {
883 }
else if (hardFail) {
891const std::set<GNEConnection*>&
893 return myConnections;
897std::vector<GNEConnection*>
899 std::vector<GNEConnection*> result;
901 for (
const auto& connection : myConnections) {
902 if (connection->isAttributeCarrierSelected()) {
903 result.push_back(connection);
912 if (myConnections.insert(connection).second ==
false) {
920 const auto finder = myConnections.find(connection);
921 if (finder == myConnections.end()) {
924 myConnections.erase(finder);
932 for (
const auto& connection : myConnections) {
933 if (connection->isAttributeCarrierSelected()) {
943 for (
const auto& additional : myAdditionals.at(type)) {
944 if (additional->getID() ==
id) {
949 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
962 }
else if (hardFail) {
963 throw ProcessError(
"Attempted to retrieve non-existant additional (AttributeCarrier)");
989 throw ProcessError(
"Attempted to retrieve non-existant rerouter interval");
993const std::map<SumoXMLTag, std::set<GNEAdditional*> >&
995 return myAdditionals;
999std::vector<GNEAdditional*>
1001 std::vector<GNEAdditional*> result;
1003 for (
const auto& additionalsTags : myAdditionals) {
1004 for (
const auto& additional : additionalsTags.second) {
1005 if (additional->isAttributeCarrierSelected()) {
1006 result.push_back(additional);
1014std::vector<GNEAdditional*>
1016 std::vector<GNEAdditional*> result;
1018 for (
const auto& additionalsTags : myAdditionals) {
1019 for (
const auto& additional : additionalsTags.second) {
1020 if (additional->getTagProperty().isShapeElement() && additional->isAttributeCarrierSelected()) {
1021 result.push_back(additional);
1032 for (
const auto& additionalsTag : myAdditionals) {
1033 counter += (int)additionalsTag.second.size();
1042 for (
const auto& additionalsTags : myAdditionals) {
1043 for (
const auto& additional : additionalsTags.second) {
1044 myNet->removeGLObjectFromGrid(additional);
1048 for (
auto& additionals : myAdditionals) {
1049 additionals.second.clear();
1061 prefix = oc.
getString(
"busStop-prefix");
1063 prefix = oc.
getString(
"trainStop-prefix");
1065 prefix = oc.
getString(
"containerStop-prefix");
1067 prefix = oc.
getString(
"chargingStation-prefix");
1069 prefix = oc.
getString(
"parkingArea-prefix");
1071 prefix = oc.
getString(
"e1Detector-prefix");
1073 prefix = oc.
getString(
"e2Detector-prefix");
1075 prefix = oc.
getString(
"e3Detector-prefix");
1077 prefix = oc.
getString(
"e1InstantDetector-prefix");
1079 prefix = oc.
getString(
"rerouter-prefix");
1081 prefix = oc.
getString(
"calibrator-prefix");
1083 prefix = oc.
getString(
"routeProbe-prefix");
1087 prefix = oc.
getString(
"tractionSubstation-prefix");
1089 prefix = oc.
getString(
"overheadWire-prefix");
1091 prefix = oc.
getString(
"polygon-prefix");
1111 while ((retrieveAdditional(
SUMO_TAG_POI, prefix +
"_" +
toString(counter),
false) !=
nullptr) ||
1122 while (retrieveAdditional(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1126 return (prefix +
"_" +
toString(counter));
1133 for (
const auto& additionalsTags : myAdditionals) {
1134 for (
const auto& additional : additionalsTags.second) {
1135 if (additional->isAttributeCarrierSelected()) {
1146 return getNumberOfSelectedAdditionals() - getNumberOfSelectedPolygons() -
1147 getNumberOfSelectedPOIs() - getNumberOfSelectedTAZs() - getNumberOfSelectedTAZSources() -
1148 getNumberOfSelectedTAZSinks() - getNumberOfSelectedWires();
1156 if (poly->isAttributeCarrierSelected()) {
1168 if (
POI->isAttributeCarrierSelected()) {
1173 if (POILane->isAttributeCarrierSelected()) {
1178 if (
POIGEO->isAttributeCarrierSelected()) {
1190 if (
TAZ->isAttributeCarrierSelected()) {
1202 if (TAZSource->isAttributeCarrierSelected()) {
1214 if (TAZSink->isAttributeCarrierSelected()) {
1225 for (
const auto& additionalsTags : myAdditionals) {
1226 for (
const auto& additional : additionalsTags.second) {
1227 if (additional->isAttributeCarrierSelected() && additional->getTagProperty().isWireElement()) {
1238 for (
const auto& demandElement : myDemandElements.at(type)) {
1239 if (demandElement->getID() ==
id) {
1240 return demandElement;
1244 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1255 if (demandElement && (myDemandElements.at(AC->
getTagProperty().
getTag()).count(demandElement) > 0)) {
1256 return demandElement;
1257 }
else if (hardFail) {
1258 throw ProcessError(
"Attempted to retrieve non-existant demand element (AttributeCarrier)");
1265std::vector<GNEDemandElement*>
1267 std::vector<GNEDemandElement*> result;
1269 for (
const auto& demandElementTag : myDemandElements) {
1270 for (
const auto& demandElement : demandElementTag.second) {
1271 if (demandElement->isAttributeCarrierSelected()) {
1272 result.push_back(demandElement);
1280const std::map<SumoXMLTag, std::set<GNEDemandElement*> >&
1282 return myDemandElements;
1289 for (
const auto& demandElementTag : myDemandElements) {
1292 for (
const auto& vType : demandElementTag.second) {
1298 counter += (int)demandElementTag.second.size();
1319 }
else if (tagProperty.isVehicle() && !tagProperty.isFlow()) {
1320 prefix = oc.
getString(
"vehicle-prefix");
1321 }
else if (tagProperty.isPerson()) {
1322 if (tagProperty.isFlow()) {
1323 prefix = oc.
getString(
"personflow-prefix");
1327 }
else if (tagProperty.isContainer()) {
1328 if (tagProperty.isFlow()) {
1329 prefix = oc.
getString(
"containerflow-prefix");
1331 prefix = oc.
getString(
"container-prefix");
1333 }
else if (tagProperty.isFlow()) {
1338 if (tagProperty.isPerson()) {
1345 return (prefix +
"_" +
toString(counter));
1346 }
else if (tagProperty.isContainer()) {
1353 return (prefix +
"_" +
toString(counter));
1354 }
else if (tagProperty.isVehicle() || tagProperty.isFlow()) {
1367 return (prefix +
"_" +
toString(counter));
1369 while (retrieveDemandElement(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1373 return (prefix +
"_" +
toString(counter));
1392 for (
const auto& demandElementsTags : myDemandElements) {
1393 for (
const auto& demandElement : demandElementsTags.second) {
1394 myNet->removeGLObjectFromGrid(demandElement);
1398 for (
auto& demandElements : myDemandElements) {
1399 demandElements.second.clear();
1409 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1414 defaultBikeType->
incRef(
"GNENet::DEFAULT_BIKETYPE_ID");
1419 defaultTaxiType->
incRef(
"GNENet::DEFAULT_TAXITYPE_ID");
1424 defaultPersonType->
incRef(
"GNENet::DEFAULT_PEDTYPE_ID");
1428 myDemandElements.at(defaultContainerType->
getTagProperty().
getTag()).insert(defaultContainerType);
1429 defaultContainerType->
incRef(
"GNENet::DEFAULT_CONTAINERTYPE_ID");
1434 return myStopIndex++;
1441 for (
const auto& demandElementsTags : myDemandElements) {
1442 for (
const auto& demandElement : demandElementsTags.second) {
1443 if (demandElement->isAttributeCarrierSelected()) {
1457 if (route->isAttributeCarrierSelected()) {
1463 if (vehicle->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1468 if (flow->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1481 if (vehicle->isAttributeCarrierSelected()) {
1485 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1486 if (trip->isAttributeCarrierSelected()) {
1491 if (vehicle->isAttributeCarrierSelected()) {
1495 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1496 if (flow->isAttributeCarrierSelected()) {
1501 if (flow->isAttributeCarrierSelected()) {
1506 if (flow->isAttributeCarrierSelected()) {
1519 if (person->isAttributeCarrierSelected()) {
1524 if (personFlow->isAttributeCarrierSelected()) {
1537 for (
const auto& personPlan : person->getChildDemandElements()) {
1538 if (personPlan->getTagProperty().isPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1544 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1545 if (personPlan->getTagProperty().isPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1559 for (
const auto& personPlan : person->getChildDemandElements()) {
1560 if (personPlan->getTagProperty().isWalk() && personPlan->isAttributeCarrierSelected()) {
1566 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1567 if (personPlan->getTagProperty().isWalk() && personPlan->isAttributeCarrierSelected()) {
1581 for (
const auto& personPlan : person->getChildDemandElements()) {
1582 if (personPlan->getTagProperty().isRide() && personPlan->isAttributeCarrierSelected()) {
1588 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1589 if (personPlan->getTagProperty().isRide() && personPlan->isAttributeCarrierSelected()) {
1603 if (container->isAttributeCarrierSelected()) {
1608 if (containerFlow->isAttributeCarrierSelected()) {
1621 for (
const auto& containerPlan : container->getChildDemandElements()) {
1622 if (containerPlan->getTagProperty().isTransportPlan() && containerPlan->isAttributeCarrierSelected()) {
1628 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1629 if (containerPlan->getTagProperty().isTransportPlan() && containerPlan->isAttributeCarrierSelected()) {
1643 for (
const auto& containerPlan : container->getChildDemandElements()) {
1644 if (containerPlan->getTagProperty().isTranshipPlan() && containerPlan->isAttributeCarrierSelected()) {
1650 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1651 if (containerPlan->getTagProperty().isTranshipPlan() && containerPlan->isAttributeCarrierSelected()) {
1665 if (route->isAttributeCarrierSelected()) {
1670 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1671 for (
const auto& stop : trip->getChildDemandElements()) {
1672 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1678 for (
const auto& stop : vehicle->getChildDemandElements().front()->getChildDemandElements()) {
1679 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1684 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1685 for (
const auto& stop : flow->getChildDemandElements()) {
1686 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1692 for (
const auto& stop : flow->getChildDemandElements().front()->getChildDemandElements()) {
1693 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1700 for (
const auto& personPlan : person->getChildDemandElements()) {
1701 if (personPlan->getTagProperty().isStopPerson() && personPlan->isAttributeCarrierSelected()) {
1707 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1708 if (personPlan->getTagProperty().isStopPerson() && personPlan->isAttributeCarrierSelected()) {
1715 for (
const auto& containerPlan : container->getChildDemandElements()) {
1716 if (containerPlan->getTagProperty().isStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1722 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1723 if (containerPlan->getTagProperty().isStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1734 for (
const auto& dataSet : myDataSets) {
1735 if (dataSet->getID() ==
id) {
1740 throw ProcessError(
"Attempted to retrieve non-existant data set");
1751 if (dataSet && (myDataSets.count(dataSet) > 0)) {
1753 }
else if (hardFail) {
1754 throw ProcessError(
"Attempted to retrieve non-existant data set");
1761const std::set<GNEDataSet*>&
1771 while (retrieveDataSet(prefix + dataSetTagStr +
"_" +
toString(counter),
false) !=
nullptr) {
1774 return (prefix + dataSetTagStr +
"_" +
toString(counter));
1782 if (dataInterval && (myDataIntervals.count(dataInterval) > 0)) {
1783 return dataInterval;
1784 }
else if (hardFail) {
1785 throw ProcessError(
"Attempted to retrieve non-existant data interval");
1792const std::set<GNEDataInterval*>&
1794 return myDataIntervals;
1800 if (myDataIntervals.insert(dataInterval).second ==
false) {
1804 myNet->getViewNet()->getIntervalBar().markForUpdate();
1810 const auto finder = myDataIntervals.find(dataInterval);
1811 if (finder == myDataIntervals.end()) {
1814 myDataIntervals.erase(finder);
1817 myNet->getViewNet()->getIntervalBar().markForUpdate();
1825 if (genericData && (myGenericDatas.at(AC->
getTagProperty().
getTag()).count(genericData) > 0)) {
1827 }
else if (hardFail) {
1828 throw ProcessError(
"Attempted to retrieve non-existant data set");
1835std::vector<GNEGenericData*>
1837 std::vector<GNEGenericData*> result;
1839 for (
const auto& genericDataTag : myGenericDatas) {
1840 for (
const auto& genericData : genericDataTag.second) {
1841 if (genericData->isAttributeCarrierSelected()) {
1842 result.push_back(genericData);
1850const std::map<SumoXMLTag, std::set<GNEGenericData*> >&
1852 return myGenericDatas;
1856std::vector<GNEGenericData*>
1859 std::vector<GNEGenericData*> genericDatas;
1861 for (
const auto& genericData : myGenericDatas.at(genericDataTag)) {
1863 if ((genericData->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
1864 (genericData->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
1865 genericDatas.push_back(genericData);
1868 return genericDatas;
1877 if (genericData->isAttributeCarrierSelected()) {
1890 if (genericData->isAttributeCarrierSelected()) {
1903 if (genericData->isAttributeCarrierSelected()) {
1913 if (myGenericDatas.at(genericData->
getTagProperty().
getTag()).insert(genericData).second ==
false) {
1917 myNet->getViewNet()->getIntervalBar().markForUpdate();
1923 const auto finder = myGenericDatas.at(genericData->
getTagProperty().
getTag()).find(genericData);
1930 myNet->getViewNet()->getIntervalBar().markForUpdate();
1934std::set<std::string>
1937 std::set<std::string> attributesSolution;
1939 std::vector<GNEGenericData*> genericDatas;
1941 for (
const auto& interval : myDataIntervals) {
1945 for (
const auto& genericData : interval->getGenericDataChildren()) {
1946 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
1947 genericDatas.push_back(genericData);
1953 for (
const auto& genericData : genericDatas) {
1954 for (
const auto& attribute : genericData->getParametersMap()) {
1955 attributesSolution.insert(attribute.first);
1958 return attributesSolution;
1962std::set<std::string>
1964 const std::string& beginStr,
const std::string& endStr)
const {
1966 std::set<std::string> attributesSolution;
1968 std::vector<GNEDataSet*> dataSets;
1969 std::vector<GNEDataInterval*> dataIntervals;
1971 GNEDataSet* retrievedDataSet = retrieveDataSet(dataSetID,
false);
1973 if (dataSetID.empty()) {
1975 dataSets.reserve(myDataSets.size());
1976 for (
const auto& dataSet : myDataSets) {
1977 dataSets.push_back(dataSet);
1979 }
else if (retrievedDataSet) {
1980 dataSets.push_back(retrievedDataSet);
1982 return attributesSolution;
1985 int numberOfIntervals = 0;
1986 for (
const auto& dataSet : dataSets) {
1987 numberOfIntervals += (int)dataSet->getDataIntervalChildren().size();
1990 dataIntervals.reserve(numberOfIntervals);
1992 for (
const auto& dataSet : dataSets) {
1993 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
1995 if (beginStr.empty() && endStr.empty()) {
1996 dataIntervals.push_back(dataInterval.second);
1997 }
else if (endStr.empty()) {
1999 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2000 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) {
2001 dataIntervals.push_back(dataInterval.second);
2003 }
else if (beginStr.empty()) {
2005 const double end = GNEAttributeCarrier::parse<double>(endStr);
2006 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end) {
2007 dataIntervals.push_back(dataInterval.second);
2011 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2012 const double end = GNEAttributeCarrier::parse<double>(endStr);
2013 if ((dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2014 (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2015 dataIntervals.push_back(dataInterval.second);
2021 for (
const auto& dataInterval : dataIntervals) {
2022 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
2024 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2025 for (
const auto& attribute : genericData->getParametersMap()) {
2026 attributesSolution.insert(attribute.first);
2031 return attributesSolution;
2037 myNet->getNetBuilder()->getNodeCont().insert(junction->
getNBNode());
2038 registerJunction(junction);
2045 myNet->getViewNet()->removeFromAttributeCarrierInspected(junction);
2046 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(junction);
2048 myNet->removeGLObjectFromGrid(junction);
2050 myNet->getNetBuilder()->getNodeCont().extract(junction->
getNBNode());
2051 junction->
decRef(
"GNENet::deleteSingleJunction");
2058 return (myEdgeTypes.count(edgeType->
getID()) > 0);
2065 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2069 if (myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
2070 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2073 createEdgeFrame->getEdgeTypeSelector()->setCurrentEdgeType(edgeType);
2080 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2082 myNet->getViewNet()->removeFromAttributeCarrierInspected(edgeType);
2083 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edgeType);
2087 if (createEdgeFrame->getEdgeTypeSelector()->getEdgeTypeSelected() == edgeType) {
2088 createEdgeFrame->getEdgeTypeSelector()->clearEdgeTypeSelected();
2091 createEdgeFrame->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2098 myNet->getNetBuilder()->getEdgeCont().insert(nbe);
2110 myNet->getViewNet()->removeFromAttributeCarrierInspected(edge);
2111 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edge);
2113 myNet->removeGLObjectFromGrid(edge);
2116 for (
const auto& lane : edge->
getLanes()) {
2120 myNet->getNetBuilder()->getEdgeCont().extract(myNet->getNetBuilder()->getDistrictCont(), edge->
getNBEdge());
2121 edge->
decRef(
"GNENet::deleteSingleEdge");
2142 return std::find(additionalElementTag.begin(), additionalElementTag.end(), additional) != additionalElementTag.end();
2152 if (myAdditionals.at(additional->
getTagProperty().
getTag()).insert(additional).second ==
false) {
2157 myNet->addGLObjectIntoGrid(additional);
2160 if (myNet->isUpdateGeometryEnabled()) {
2164 myNet->requireSaveAdditionals(
true);
2177 myNet->getViewNet()->removeFromAttributeCarrierInspected(additional);
2178 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(additional);
2183 myNet->removeGLObjectFromGrid(additional);
2186 myNet->getPathManager()->removePath(additional);
2188 myNet->requireSaveAdditionals(
true);
2195 if (demandElement) {
2199 return std::find(demandElementTag.begin(), demandElementTag.end(), demandElement) != demandElementTag.end();
2209 if (myDemandElements.at(demandElement->
getTagProperty().
getTag()).insert(demandElement).second ==
false) {
2213 myNet->addGLObjectIntoGrid(demandElement);
2215 if (myNet->isUpdateGeometryEnabled()) {
2219 myNet->requireSaveDemandElements(
true);
2226 auto itFind = myDemandElements.at(demandElement->
getTagProperty().
getTag()).find(demandElement);
2232 myNet->getViewNet()->removeFromAttributeCarrierInspected(demandElement);
2233 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(demandElement);
2234 myNet->getViewNet()->getViewParent()->getPersonPlanFrame()->getPersonHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2236 if (myNet->getViewNet()->getLastCreatedRoute() == demandElement) {
2237 myNet->getViewNet()->setLastCreatedRoute(
nullptr);
2242 myNet->removeGLObjectFromGrid(demandElement);
2244 myNet->getPathManager()->removePath(demandElement);
2246 myNet->requireSaveDemandElements(
true);
2254 if (myDataSets.find(dataSet) != myDataSets.end()) {
2268 if (myDataSets.insert(dataSet).second ==
false) {
2272 myNet->requireSaveDataElements(
true);
2274 myNet->getViewNet()->getIntervalBar().markForUpdate();
2281 const auto itFind = myDataSets.find(dataSet);
2283 if (itFind == myDataSets.end()) {
2287 myNet->getViewNet()->removeFromAttributeCarrierInspected(dataSet);
2288 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataSet);
2290 myDataSets.erase(itFind);
2292 myNet->requireSaveDataElements(
true);
2294 myNet->getViewNet()->getIntervalBar().markForUpdate();
2304 myReplaced(replaced),
2315 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1,
true);
2322 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1,
true);
2328 return "Redo replace in TLS";
2334 return "Undo replace in TLS";
2340 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..)
GUISelectedStorage gSelected
A global holder of selected objects.
std::string time2string(SUMOTime t)
convert SUMOTime to string
@ SVC_IGNORING
vehicles ignoring classes
@ 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_TAXITYPE_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
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions (used in NETEDIT)
@ SUMO_TAG_TRACTION_SUBSTATION
A traction substation.
@ 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
@ 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_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route (used in NETEDIT)
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions (used in NETEDIT)
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ SUMO_TAG_CONNECTION
connectio 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_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 (used in NETEDIT)
@ GNE_TAG_POILANE
Point of interest over Lane.
@ 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
@ 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
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)
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
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.
An Element which don't belong to GNENet but has influence in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
A road/street connecting two junctions (netedit-version)
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
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
void setMicrosimID(const std::string &newID)
override to also set lane ids
An Element which don't belong to GNENet but has influence in the simulation.
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)
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
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
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
std::vector< GNEEdge * > retrieveEdges(GNEJunction *from, GNEJunction *to) const
get all edges by from and to GNEJunction
void insertWalkingArea(GNEWalkingArea *walkingArea)
insert walkingArea
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::map< SumoXMLTag, std::set< GNEGenericData * > > & getGenericDatas() const
get all generic datas
const std::set< GNELane * > & getLanes() const
get lanes
const std::set< GNEConnection * > & getConnections() const
get connections
int getNumberOfSelectedConnections() const
get number of selected connections
void deleteDataSet(GNEDataSet *dataSet)
delete demand element element of GNENet container
void insertLane(GNELane *lane)
insert lane
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 GNENet containers
std::vector< GNEAdditional * > getSelectedShapes() const
get selected shapes
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
std::map< SumoXMLTag, std::set< GNEDemandElement * > > myDemandElements
map with the tag and pointer to demand elements of net
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
void insertDataSet(GNEDataSet *dataSet)
Insert a demand element element int GNENet container.
bool dataSetExist(GNEDataSet *dataSet) const
return true if given demand element exist
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
void insertGenericData(GNEGenericData *genericData)
insert generic data
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with GNENet containers
bool demandElementExist(GNEDemandElement *demandElement) const
return true if given demand element exist
int getNumberOfSelectedPersonTrips() const
get number of selected person trips
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
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 deleteDemandElement(GNEDemandElement *demandElement)
delete demand element element of GNENet container
void deleteEdgeType(GNEEdgeType *edgeType)
deletes edgeType
std::string generateDataSetID(const std::string &prefix) const
generate data set id
void deleteConnection(GNEConnection *connection)
delete connection
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
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
std::map< SumoXMLTag, std::set< GNEGenericData * > > myGenericDatas
map with the tag and pointer to all generic datas
void deleteSingleJunction(GNEJunction *junction)
deletes a single junction
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction in GNENet containers
const std::set< GNEDataSet * > & getDataSets() const
get demand elements
int getNumberOfSelectedWalkingAreas() const
get number of selected walkingAreas
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
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
~AttributeCarriers()
destructor
void insertCrossing(GNECrossing *crossing)
insert crossing
int getNumberOfSelectedWires() const
get number of selected Wires
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
int getNumberOfSelectedTransport() const
get number of selected transports
GNEDataInterval * retrieveDataInterval(GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the data interval.
std::vector< GNELane * > getSelectedLanes() const
get selected lanes
void insertConnection(GNEConnection *connection)
insert connection
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 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
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)
deletes a single edge
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
const std::set< GNEDataInterval * > & getDataIntervals() const
get all data intervals of network
void deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet 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
int getNumberOfAdditionals() const
get number of additionals
const std::set< GNECrossing * > & getCrossings() const
get crossings
void insertEdge(GNEEdge *edge)
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element element int GNENet container.
const std::map< SumoXMLTag, std::set< GNEAdditional * > > & getAdditionals() const
get additionals
void updateEdgeID(GNEEdge *edge, const std::string &newID)
update edge ID in container
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
int getNumberOfSelectedTAZSources() const
get number of selected TAZSources
bool additionalExist(const GNEAdditional *additional) const
return true if given additional exist
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
void insertEdgeType(GNEEdgeType *edgeType)
inserts a single edgeType into the net and into the underlying netbuild-container
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
void clearEdges()
clear edges
void insertJunction(GNEJunction *junction)
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
std::map< SumoXMLTag, std::set< GNEAdditional * > > myAdditionals
map with the tag and pointer to additional elements of net
void insertDataInterval(GNEDataInterval *dataInterval)
insert data interval
int getNumberOfSelectedTAZSinks() const
get number of selected TAZSinks
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
GNECrossing * retrieveCrossing(GNEAttributeCarrier *AC, bool hardFail=true) const
get Crossing by AC
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
void deleteCrossing(GNECrossing *crossing)
delete crossing
GNEGenericData * retrieveGenericData(GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the generic data.
GNEDemandElement * getDefaultType() const
get default type
bool edgeTypeExist(const GNEEdgeType *edgeType) const
GNEWalkingArea * retrieveWalkingArea(GNEAttributeCarrier *AC, bool hardFail=true) const
get WalkingArea by AC
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
GNEConnection * retrieveConnection(const std::string &id, bool hardFail=true) const
get Connection by id
const std::set< GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
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
A NBNetBuilder extended by visualisation and editing capabilities.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increase reference.
bool isNetworkElement() const
return true if tag correspond to a network element
bool isDataElement() const
return true if tag correspond to a data 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)
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.
A storage for options typed value containers)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
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.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID