![]() |
Eclipse SUMO - Simulation of Urban MObility
|
class used to group all variables related with objects under cursor after a click over view More...
#include <GNEViewNetHelper.h>
Data Structures | |
| class | ObjectsContainer |
| objects container More... | |
Public Member Functions | |
| void | filterLockedElements (const GNEViewNetHelper::LockManager &lockManager, std::vector< GUIGlObjectType > forcedIgnoredTiped={}) |
| filter locked elements | |
| GNEAdditional * | getAdditionalFront () const |
| get front additional element or a pointer to nullptr | |
| GNEAttributeCarrier * | getAttributeCarrierFront () const |
| get front attribute carrier or a pointer to nullptr | |
| const std::vector< GNEAttributeCarrier * > & | getClickedAttributeCarriers () const |
| get vector with clicked ACs | |
| const std::vector< GNEDemandElement * > & | getClickedDemandElements () const |
| get vector with clicked Demand Elements | |
| const std::vector< GUIGlObject * > & | getClickedGLObjects () const |
| get vector with clicked GL objects | |
| const std::vector< GNEJunction * > & | getClickedJunctions () const |
| get vector with clicked junctions | |
| GNEConnection * | getConnectionFront () const |
| get front connection or a pointer to nullptr | |
| GNECrossing * | getCrossingFront () const |
| get front crossing or a pointer to nullptr | |
| GNEDemandElement * | getDemandElementFront () const |
| get front demand element or a pointer to nullptr | |
| GNEEdgeData * | getEdgeDataElementFront () const |
| get edge data element or a pointer to nullptr | |
| GNEEdge * | getEdgeFront () const |
| get front edge or a pointer to nullptr | |
| GNEEdgeRelData * | getEdgeRelDataElementFront () const |
| get edge rel data element or a pointer to nullptr | |
| GNEGenericData * | getGenericDataElementFront () const |
| get generic data element or a pointer to nullptr | |
| GUIGlID | getGlIDFront () const |
| get front GUI GL ID or a pointer to nullptr | |
| GUIGlObjectType | getGlTypeFront () const |
| get front GUI GL object type or a pointer to nullptr | |
| GUIGlObject * | getGUIGlObjectFront () const |
| get front attribute carrier or a pointer to nullptr | |
| GNEInternalLane * | getInternalLaneFront () const |
| get front internal lane or a pointer to nullptr | |
| GNEJunction * | getJunctionFront () const |
| get front junction or a pointer to nullptr | |
| GNELane * | getLaneFront () const |
| get front lane or a pointer to nullptr | |
| GNELane * | getLaneFrontNonLocked () const |
| get front lane or a pointer to nullptr checking if is locked | |
| const std::vector< GNELane * > & | getLanes () const |
| get lanes | |
| GNENetworkElement * | getNetworkElementFront () const |
| get front network element or a pointer to nullptr | |
| GNEPOI * | getPOIFront () const |
| get front POI or a pointer to nullptr | |
| GNEPoly * | getPolyFront () const |
| get front Poly or a pointer to nullptr | |
| GNETAZ * | getTAZFront () const |
| get front TAZ or a pointer to nullptr | |
| GNEWalkingArea * | getWalkingAreaFront () const |
| get front walkingArea or a pointer to nullptr | |
| ObjectsUnderCursor (GNEViewNet *viewNet) | |
| constructor | |
| void | shortDataElements () |
| short data elements by begin | |
| void | swapLane2Edge () |
| swap lane to edge | |
| void | updateObjectUnderCursor (const std::vector< GUIGlObject * > &GUIGlObjects) |
| update objects under cursor (Called only in onLeftBtnPress(...) function) | |
Protected Attributes | |
| ObjectsContainer | myEdgeObjects |
| objectContainer for objects selecting edges | |
| ObjectsContainer | myLaneObjects |
| objectContainer for objects selecting lanes | |
| bool | mySwapLane2edge |
| flag to enable/disable swap lane to edge | |
| const GNEViewNet * | myViewNet |
| pointer to viewNet | |
Private Member Functions | |
| std::vector< GUIGlObject * > | filterDuplicatedObjects (const std::vector< GUIGlObject * > &GUIGlObjects) const |
| filter duplicated objects | |
| ObjectsUnderCursor () | |
| default constructor | |
| ObjectsUnderCursor (const ObjectsUnderCursor &)=delete | |
| Invalidated copy constructor. | |
| ObjectsUnderCursor & | operator= (const ObjectsUnderCursor &)=delete |
| Invalidated assignment operator. | |
| void | processGUIGlObjects () |
| process GL objects | |
| void | sortGUIGlObjects (const std::vector< GUIGlObject * > &GUIGlObjects) |
| sort by altitude and update GUIGlObjects | |
| void | updateAdditionalElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update additional elements | |
| void | updateAttributeCarriers (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update attribute carrier elements | |
| void | updateDemandElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update demand elements | |
| void | updateGenericDataElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update generic data elements | |
| void | updateGUIGlObjects (ObjectsContainer &container) |
| updateGUIGlObjects | |
| void | updateNetworkElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update network elements | |
| void | updateShapeElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update shape elements | |
| void | updateTAZElements (ObjectsContainer &container, GNEAttributeCarrier *AC) |
| update TAZ elements | |
class used to group all variables related with objects under cursor after a click over view
Definition at line 215 of file GNEViewNetHelper.h.
| GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor | ( | GNEViewNet * | viewNet | ) |
constructor
Definition at line 210 of file GNEViewNetHelper.cpp.
|
private |
default constructor
Definition at line 1122 of file GNEViewNetHelper.cpp.
|
privatedelete |
Invalidated copy constructor.
|
private |
filter duplicated objects
Definition at line 739 of file GNEViewNetHelper.cpp.
| void GNEViewNetHelper::ObjectsUnderCursor::filterLockedElements | ( | const GNEViewNetHelper::LockManager & | lockManager, |
| std::vector< GUIGlObjectType > | forcedIgnoredTiped = {} |
||
| ) |
filter locked elements
Definition at line 240 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::LockManager::isObjectLocked().
Referenced by GNEViewNet::processLeftButtonPressData(), GNEViewNet::processLeftButtonPressDemand(), and GNEViewNet::processLeftButtonPressNetwork().
| GNEAdditional * GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront | ( | ) | const |
get front additional element or a pointer to nullptr
Definition at line 361 of file GNEViewNetHelper.cpp.
Referenced by GNEContainerFrame::addContainer(), GNEContainerPlanFrame::addContainerPlanElement(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEAdditionalFrame::createBaseAdditionalObject(), GNEWireFrame::createBaseWireObject(), GNETLSEditorFrame::editTLS(), and GNEViewNet::processLeftButtonPressNetwork().
| GNEAttributeCarrier * GNEViewNetHelper::ObjectsUnderCursor::getAttributeCarrierFront | ( | ) | const |
get front attribute carrier or a pointer to nullptr
Definition at line 325 of file GNEViewNetHelper.cpp.
Referenced by GNEContainerFrame::addContainer(), GNEPersonFrame::addPerson(), GNEInspectorFrame::inspectClickedElement(), GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEViewNet::processLeftButtonPressData(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), GNEInspectorFrame::processNetworkSupermodeClick(), and GNESelectorFrame::selectAttributeCarrier().
| const std::vector< GNEAttributeCarrier * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers | ( | ) | const |
get vector with clicked ACs
Definition at line 682 of file GNEViewNetHelper.cpp.
Referenced by GNEDeleteFrame::removeGeometryPoint(), and GNEOverlappedInspection::showOverlappedInspection().
| const std::vector< GNEDemandElement * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedDemandElements | ( | ) | const |
get vector with clicked Demand Elements
Definition at line 702 of file GNEViewNetHelper.cpp.
Referenced by GNEPersonPlanFrame::addPersonPlanElement().
| const std::vector< GUIGlObject * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedGLObjects | ( | ) | const |
get vector with clicked GL objects
Definition at line 672 of file GNEViewNetHelper.cpp.
Referenced by GNEViewNet::openObjectDialogAtCursor(), GNEDeleteFrame::removeAttributeCarrier(), and GNESelectorFrame::selectAttributeCarrier().
| const std::vector< GNEJunction * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedJunctions | ( | ) | const |
get vector with clicked junctions
Definition at line 692 of file GNEViewNetHelper.cpp.
Referenced by GNEJunction::commitMoveShape().
| GNEConnection * GNEViewNetHelper::ObjectsUnderCursor::getConnectionFront | ( | ) | const |
get front connection or a pointer to nullptr
Definition at line 547 of file GNEViewNetHelper.cpp.
Referenced by GNEProhibitionFrame::handleProhibitionClick(), and GNEViewNet::processLeftButtonPressNetwork().
| GNECrossing * GNEViewNetHelper::ObjectsUnderCursor::getCrossingFront | ( | ) | const |
get front crossing or a pointer to nullptr
Definition at line 511 of file GNEViewNetHelper.cpp.
| GNEDemandElement * GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront | ( | ) | const |
get front demand element or a pointer to nullptr
Definition at line 379 of file GNEViewNetHelper.cpp.
Referenced by GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), and GNEVehicleFrame::addVehicle().
| GNEEdgeData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeDataElementFront | ( | ) | const |
get edge data element or a pointer to nullptr
Definition at line 637 of file GNEViewNetHelper.cpp.
| GNEEdge * GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront | ( | ) | const |
get front edge or a pointer to nullptr
Definition at line 433 of file GNEViewNetHelper.cpp.
Referenced by GNEAdditionalFrame::addAdditional(), GNEContainerFrame::addContainer(), GNEContainerPlanFrame::addContainerPlanElement(), GNECrossingFrame::addCrossing(), GNEEdgeDataFrame::addEdgeData(), GNEEdgeRelDataFrame::addEdgeRelationData(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEVehicleFrame::addVehicle(), GNETAZFrame::processClick(), GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeGeometryPoint().
| GNEEdgeRelData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeRelDataElementFront | ( | ) | const |
get edge rel data element or a pointer to nullptr
Definition at line 655 of file GNEViewNetHelper.cpp.
| GNEGenericData * GNEViewNetHelper::ObjectsUnderCursor::getGenericDataElementFront | ( | ) | const |
get generic data element or a pointer to nullptr
Definition at line 397 of file GNEViewNetHelper.cpp.
| GUIGlID GNEViewNetHelper::ObjectsUnderCursor::getGlIDFront | ( | ) | const |
get front GUI GL ID or a pointer to nullptr
Definition at line 287 of file GNEViewNetHelper.cpp.
| GUIGlObjectType GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront | ( | ) | const |
get front GUI GL object type or a pointer to nullptr
Definition at line 297 of file GNEViewNetHelper.cpp.
References GLO_NETWORK.
| GUIGlObject * GNEViewNetHelper::ObjectsUnderCursor::getGUIGlObjectFront | ( | ) | const |
get front attribute carrier or a pointer to nullptr
Definition at line 307 of file GNEViewNetHelper.cpp.
| GNEInternalLane * GNEViewNetHelper::ObjectsUnderCursor::getInternalLaneFront | ( | ) | const |
get front internal lane or a pointer to nullptr
Definition at line 565 of file GNEViewNetHelper.cpp.
| GNEJunction * GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront | ( | ) | const |
get front junction or a pointer to nullptr
Definition at line 415 of file GNEViewNetHelper.cpp.
Referenced by GNEContainerFrame::addContainer(), GNECrossingFrame::addCrossing(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEVehicleFrame::addVehicle(), GNETLSEditorFrame::editTLS(), GNECreateEdgeFrame::processClick(), and GNEViewNet::processLeftButtonPressNetwork().
| GNELane * GNEViewNetHelper::ObjectsUnderCursor::getLaneFront | ( | ) | const |
get front lane or a pointer to nullptr
Definition at line 451 of file GNEViewNetHelper.cpp.
Referenced by GNEAdditionalFrame::addAdditional(), GNEStopFrame::addStop(), GNEWireFrame::addWire(), GNEShapeFrame::processClick(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), and GNEViewNet::processLeftButtonReleaseNetwork().
| GNELane * GNEViewNetHelper::ObjectsUnderCursor::getLaneFrontNonLocked | ( | ) | const |
get front lane or a pointer to nullptr checking if is locked
Definition at line 469 of file GNEViewNetHelper.cpp.
Referenced by GNEConnectorFrame::handleLaneClick(), and GNEViewNet::processLeftButtonPressNetwork().
| const std::vector< GNELane * > & GNEViewNetHelper::ObjectsUnderCursor::getLanes | ( | ) | const |
get lanes
Definition at line 501 of file GNEViewNetHelper.cpp.
Referenced by GNEConnectorFrame::handleLaneClick().
| GNENetworkElement * GNEViewNetHelper::ObjectsUnderCursor::getNetworkElementFront | ( | ) | const |
get front network element or a pointer to nullptr
Definition at line 343 of file GNEViewNetHelper.cpp.
Referenced by GNEViewNet::processLeftButtonPressNetwork().
| GNEPOI * GNEViewNetHelper::ObjectsUnderCursor::getPOIFront | ( | ) | const |
get front POI or a pointer to nullptr
Definition at line 583 of file GNEViewNetHelper.cpp.
Referenced by GNEViewNet::processLeftButtonPressNetwork().
| GNEPoly * GNEViewNetHelper::ObjectsUnderCursor::getPolyFront | ( | ) | const |
get front Poly or a pointer to nullptr
Definition at line 601 of file GNEViewNetHelper.cpp.
Referenced by GNEDeleteFrame::removeGeometryPoint().
| GNETAZ * GNEViewNetHelper::ObjectsUnderCursor::getTAZFront | ( | ) | const |
get front TAZ or a pointer to nullptr
Definition at line 619 of file GNEViewNetHelper.cpp.
Referenced by GNEVehicleFrame::addVehicle(), GNETAZFrame::processClick(), GNEDeleteFrame::removeGeometryPoint(), and GNETAZRelDataFrame::setTAZ().
| GNEWalkingArea * GNEViewNetHelper::ObjectsUnderCursor::getWalkingAreaFront | ( | ) | const |
get front walkingArea or a pointer to nullptr
Definition at line 529 of file GNEViewNetHelper.cpp.
|
privatedelete |
Invalidated assignment operator.
|
private |
process GL objects
Definition at line 1048 of file GNEViewNetHelper.cpp.
References GNEAttributeCarrier::getTagProperty(), GNETagProperties::isAdditionalElement(), GNETagProperties::isDemandElement(), GNETagProperties::isGenericData(), GNETagProperties::isNetworkElement(), GNETagProperties::isShapeElement(), and GNETagProperties::isTAZElement().
| void GNEViewNetHelper::ObjectsUnderCursor::shortDataElements | ( | ) |
short data elements by begin
Definition at line 268 of file GNEViewNetHelper.cpp.
References SUMO_ATTR_BEGIN, and SUMO_ATTR_END.
Referenced by GNEViewNet::onLeftBtnPress().
|
private |
sort by altitude and update GUIGlObjects
Definition at line 755 of file GNEViewNetHelper.cpp.
References Shape::getShapeLayer(), GLO_LANE, and GLO_NETWORKELEMENT.
| void GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge | ( | ) |
swap lane to edge
Definition at line 233 of file GNEViewNetHelper.cpp.
Referenced by GNEViewNet::processLeftButtonPressNetwork().
|
private |
update additional elements
Definition at line 911 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::additionals, GNENet::getAttributeCarriers(), GNEAttributeCarrier::getNet(), and GNENetHelper::AttributeCarriers::retrieveAdditional().
|
private |
update attribute carrier elements
Definition at line 787 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::attributeCarriers, GNEAttributeCarrier::getAttribute(), GNEAttributeCarrier::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNE_ATTR_PARENT, SUMO_TAG_EDGE, and SUMO_TAG_LANE.
|
private |
update demand elements
Definition at line 979 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::demandElements, GNENet::getAttributeCarriers(), GNEAttributeCarrier::getNet(), and GNENetHelper::AttributeCarriers::retrieveDemandElement().
|
private |
update generic data elements
Definition at line 994 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::edgeDatas, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::edgeRelDatas, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::genericDatas, GNEAttributeCarrier::getGUIGlObject(), GUIGlObject::getType(), GLO_EDGEDATA, and GLO_EDGERELDATA.
|
private |
updateGUIGlObjects
Definition at line 1034 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::attributeCarriers, and GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::GUIGlObjects.
|
private |
update network elements
Definition at line 814 of file GNEViewNetHelper.cpp.
References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::connections, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::crossings, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::edges, GNEAttributeCarrier::getGUIGlObject(), GUIGlObject::getType(), GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_JUNCTION, GLO_LANE, GLO_TLLOGIC, GLO_WALKINGAREA, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::internalLanes, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::junctions, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::lanes, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::networkElements, and GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::walkingAreas.
| void GNEViewNetHelper::ObjectsUnderCursor::updateObjectUnderCursor | ( | const std::vector< GUIGlObject * > & | GUIGlObjects | ) |
update objects under cursor (Called only in onLeftBtnPress(...) function)
Definition at line 217 of file GNEViewNetHelper.cpp.
Referenced by GNEViewNet::onLeftBtnPress(), GNEViewNet::onLeftBtnRelease(), GNEViewNet::openObjectDialogAtCursor(), GNEViewNet::processLeftButtonReleaseNetwork(), GNEViewNet::updateObjectsUnderCursor(), and GNECreateEdgeFrame::updateObjectsUnderSnappedCursor().
|
private |
update shape elements
Definition at line 926 of file GNEViewNetHelper.cpp.
References GNEAttributeCarrier::getGUIGlObject(), GUIGlObject::getType(), GLO_POI, GLO_POLYGON, GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::POIs, and GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::polys.
|
private |
update TAZ elements
Definition at line 959 of file GNEViewNetHelper.cpp.
References GNEAttributeCarrier::getGUIGlObject(), GUIGlObject::getType(), GLO_TAZ, TAZ, and GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::TAZs.
|
protected |
objectContainer for objects selecting edges
Definition at line 388 of file GNEViewNetHelper.h.
|
protected |
objectContainer for objects selecting lanes
Definition at line 391 of file GNEViewNetHelper.h.
|
protected |
flag to enable/disable swap lane to edge
Definition at line 394 of file GNEViewNetHelper.h.
|
protected |
pointer to viewNet
Definition at line 385 of file GNEViewNetHelper.h.