Eclipse SUMO - Simulation of Urban MObility
GNEViewNetHelper::ObjectsUnderCursor Class Reference

class used to group all variables related with objects under cursor after a click over view More...

#include <GNEViewNetHelper.h>

Collaboration diagram for GNEViewNetHelper::ObjectsUnderCursor:
[legend]

Data Structures

class  ObjectsContainer
 objects container More...
 

Public Member Functions

GNEAdditionalgetAdditionalFront () const
 get front additional element or a pointer to nullptr More...
 
GNEAttributeCarriergetAttributeCarrierFront () const
 get front attribute carrier or a pointer to nullptr More...
 
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers () const
 get vector with clicked ACs More...
 
GNEConnectiongetConnectionFront () const
 get front connection or a pointer to nullptr More...
 
GNECrossinggetCrossingFront () const
 get front crossing or a pointer to nullptr More...
 
GNEDemandElementgetDemandElementFront () const
 get front demand element or a pointer to nullptr More...
 
GNEEdgeDatagetEdgeDataElementFront () const
 get edge data element or a pointer to nullptr More...
 
GNEEdgegetEdgeFront () const
 get front edge or a pointer to nullptr More...
 
GNEEdgeRelDatagetEdgeRelDataElementFront () const
 get edge rel data element or a pointer to nullptr More...
 
GNEGenericDatagetGenericDataElementFront () const
 get generic data element or a pointer to nullptr More...
 
GUIGlID getGlIDFront () const
 get front GUI GL ID or a pointer to nullptr More...
 
GUIGlObjectType getGlTypeFront () const
 get front GUI GL object type or a pointer to nullptr More...
 
GUIGlObjectgetGUIGlObjectFront () const
 get front attribute carrier or a pointer to nullptr More...
 
GNEInternalLanegetInternalLaneFront () const
 get front internal lane or a pointer to nullptr More...
 
GNEJunctiongetJunctionFront () const
 get front junction or a pointer to nullptr More...
 
GNELanegetLaneFront () const
 get front lane or a pointer to nullptr More...
 
GNENetworkElementgetNetworkElementFront () const
 get front network element or a pointer to nullptr More...
 
GNEPOIgetPOIFront () const
 get front POI or a pointer to nullptr More...
 
GNEPolygetPolyFront () const
 get front Poly or a pointer to nullptr More...
 
GNEShapegetShapeFront () const
 get front shape element or a pointer to nullptr More...
 
GNETAZElementgetTAZElementFront () const
 get front TAZElement or a pointer to nullptr More...
 
GNETAZgetTAZFront () const
 get front TAZ or a pointer to nullptr More...
 
 ObjectsUnderCursor (GNEViewNet *viewNet)
 constructor More...
 
void swapLane2Edge ()
 swap lane to edge More...
 
void updateObjectUnderCursor (const std::vector< GUIGlObject * > &GUIGlObjects)
 update objects under cursor (Called only in onLeftBtnPress(...) function) More...
 

Protected Attributes

ObjectsContainer myEdgeObjects
 objectContainer for objects selecting edges More...
 
ObjectsContainer myLaneObjects
 objectContainer for objects selecting lanes More...
 
bool mySwapLane2edge
 flag to enable/disable swap lane to edge More...
 
const GNEViewNetmyViewNet
 pointer to viewNet More...
 

Private Member Functions

 ObjectsUnderCursor ()
 default constructor More...
 
 ObjectsUnderCursor (const ObjectsUnderCursor &)=delete
 Invalidated copy constructor. More...
 
ObjectsUnderCursoroperator= (const ObjectsUnderCursor &)=delete
 Invalidated assignment operator. More...
 
void sortGUIGlObjects (const std::vector< GUIGlObject * > &GUIGlObjects)
 sort by altitude and update GUIGlObjects More...
 
void updateAdditionalElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update additional elements More...
 
void updateAttributeCarriers (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update attribute carrier elements More...
 
void updateDemandElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update demand elements More...
 
void updateGenericDataElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update generic data elements More...
 
void updateGUIGlObjects (ObjectsContainer &container)
 updateGUIGlObjects More...
 
void updateNetworkElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update network elements More...
 
void updateShapeElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update shape elements More...
 
void updateTAZElements (ObjectsContainer &container, GNEAttributeCarrier *AC)
 update TAZ elements More...
 

Detailed Description

class used to group all variables related with objects under cursor after a click over view

Definition at line 176 of file GNEViewNetHelper.h.

Constructor & Destructor Documentation

◆ ObjectsUnderCursor() [1/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( GNEViewNet viewNet)

constructor

Definition at line 58 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [2/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( )
private

default constructor

Definition at line 840 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [3/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( const ObjectsUnderCursor )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ getAdditionalFront()

GNEAdditional * GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront ( ) const

get front additional element or a pointer to nullptr

Definition at line 222 of file GNEViewNetHelper.cpp.

Referenced by GNEAdditionalFrame::addAdditional(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getAttributeCarrierFront()

GNEAttributeCarrier * GNEViewNetHelper::ObjectsUnderCursor::getAttributeCarrierFront ( ) const

◆ getClickedAttributeCarriers()

const std::vector< GNEAttributeCarrier * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers ( ) const

get vector with clicked ACs

Definition at line 510 of file GNEViewNetHelper.cpp.

Referenced by GNEInspectorFrame::inspectClickedElement(), and GNEFrameModuls::OverlappedInspection::showOverlappedInspection().

Here is the caller graph for this function:

◆ getConnectionFront()

GNEConnection * GNEViewNetHelper::ObjectsUnderCursor::getConnectionFront ( ) const

get front connection or a pointer to nullptr

Definition at line 384 of file GNEViewNetHelper.cpp.

Referenced by GNEProhibitionFrame::handleProhibitionClick(), GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getCrossingFront()

GNECrossing * GNEViewNetHelper::ObjectsUnderCursor::getCrossingFront ( ) const

get front crossing or a pointer to nullptr

Definition at line 366 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getDemandElementFront()

GNEDemandElement * GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront ( ) const

get front demand element or a pointer to nullptr

Definition at line 276 of file GNEViewNetHelper.cpp.

Referenced by GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEStopFrame::addStop(), GNEVehicleFrame::addVehicle(), GNEInspectorFrame::processDemandSupermodeClick(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getEdgeDataElementFront()

GNEEdgeData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeDataElementFront ( ) const

get edge data element or a pointer to nullptr

Definition at line 474 of file GNEViewNetHelper.cpp.

◆ getEdgeFront()

GNEEdge * GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront ( ) const

get front edge or a pointer to nullptr

Definition at line 330 of file GNEViewNetHelper.cpp.

Referenced by GNECrossingFrame::addCrossing(), GNEEdgeDataFrame::addEdgeData(), GNEEdgeRelDataFrame::addEdgeRelationData(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEVehicleFrame::addVehicle(), GNETAZFrame::processClick(), GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getEdgeRelDataElementFront()

GNEEdgeRelData * GNEViewNetHelper::ObjectsUnderCursor::getEdgeRelDataElementFront ( ) const

get edge rel data element or a pointer to nullptr

Definition at line 492 of file GNEViewNetHelper.cpp.

◆ getGenericDataElementFront()

GNEGenericData * GNEViewNetHelper::ObjectsUnderCursor::getGenericDataElementFront ( ) const

get generic data element or a pointer to nullptr

Definition at line 294 of file GNEViewNetHelper.cpp.

Referenced by GNEInspectorFrame::processDataSupermodeClick(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getGlIDFront()

GUIGlID GNEViewNetHelper::ObjectsUnderCursor::getGlIDFront ( ) const

get front GUI GL ID or a pointer to nullptr

Definition at line 148 of file GNEViewNetHelper.cpp.

◆ getGlTypeFront()

GUIGlObjectType GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront ( ) const

get front GUI GL object type or a pointer to nullptr

Definition at line 158 of file GNEViewNetHelper.cpp.

References GLO_NETWORK.

Referenced by GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEViewNet::processLeftButtonPressData(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), and GNEInspectorFrame::processNetworkSupermodeClick().

Here is the caller graph for this function:

◆ getGUIGlObjectFront()

GUIGlObject * GNEViewNetHelper::ObjectsUnderCursor::getGUIGlObjectFront ( ) const

get front attribute carrier or a pointer to nullptr

Definition at line 168 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::openObjectDialog().

Here is the caller graph for this function:

◆ getInternalLaneFront()

GNEInternalLane * GNEViewNetHelper::ObjectsUnderCursor::getInternalLaneFront ( ) const

get front internal lane or a pointer to nullptr

Definition at line 402 of file GNEViewNetHelper.cpp.

◆ getJunctionFront()

GNEJunction * GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront ( ) const

get front junction or a pointer to nullptr

Definition at line 312 of file GNEViewNetHelper.cpp.

Referenced by GNECrossingFrame::addCrossing(), GNEJunction::commitMoveShape(), GNETLSEditorFrame::editTLS(), GNECreateEdgeFrame::processClick(), GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getLaneFront()

GNELane * GNEViewNetHelper::ObjectsUnderCursor::getLaneFront ( ) const

get front lane or a pointer to nullptr

Definition at line 348 of file GNEViewNetHelper.cpp.

Referenced by GNEAdditionalFrame::addAdditional(), GNEStopFrame::addStop(), GNEConnectorFrame::handleLaneClick(), GNEPolygonFrame::processClick(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), GNEViewNet::processLeftButtonReleaseNetwork(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getNetworkElementFront()

GNENetworkElement * GNEViewNetHelper::ObjectsUnderCursor::getNetworkElementFront ( ) const

get front network element or a pointer to nullptr

Definition at line 204 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork(), and GNEDeleteFrame::removeGeometryPoint().

Here is the caller graph for this function:

◆ getPOIFront()

GNEPOI * GNEViewNetHelper::ObjectsUnderCursor::getPOIFront ( ) const

get front POI or a pointer to nullptr

Definition at line 420 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getPolyFront()

GNEPoly * GNEViewNetHelper::ObjectsUnderCursor::getPolyFront ( ) const

get front Poly or a pointer to nullptr

Definition at line 438 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeGeometryPoint().

Here is the caller graph for this function:

◆ getShapeFront()

GNEShape * GNEViewNetHelper::ObjectsUnderCursor::getShapeFront ( ) const

get front shape element or a pointer to nullptr

Definition at line 240 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getTAZElementFront()

GNETAZElement * GNEViewNetHelper::ObjectsUnderCursor::getTAZElementFront ( ) const

get front TAZElement or a pointer to nullptr

Definition at line 258 of file GNEViewNetHelper.cpp.

Referenced by GNETAZRelDataFrame::addTAZRelationData(), GNETAZFrame::processClick(), and GNEDeleteFrame::removeAttributeCarrier().

Here is the caller graph for this function:

◆ getTAZFront()

GNETAZ * GNEViewNetHelper::ObjectsUnderCursor::getTAZFront ( ) const

get front TAZ or a pointer to nullptr

Definition at line 456 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeGeometryPoint().

Here is the caller graph for this function:

◆ operator=()

ObjectsUnderCursor& GNEViewNetHelper::ObjectsUnderCursor::operator= ( const ObjectsUnderCursor )
privatedelete

Invalidated assignment operator.

◆ sortGUIGlObjects()

void GNEViewNetHelper::ObjectsUnderCursor::sortGUIGlObjects ( const std::vector< GUIGlObject * > &  GUIGlObjects)
private

sort by altitude and update GUIGlObjects

Definition at line 548 of file GNEViewNetHelper.cpp.

References GLO_LANE, and GLO_NETWORKELEMENT.

◆ swapLane2Edge()

void GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge ( )

swap lane to edge

Definition at line 141 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ updateAdditionalElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateAdditionalElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

update additional elements

Definition at line 687 of file GNEViewNetHelper.cpp.

References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::additionals.

◆ updateAttributeCarriers()

void GNEViewNetHelper::ObjectsUnderCursor::updateAttributeCarriers ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

◆ updateDemandElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateDemandElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

update demand elements

Definition at line 772 of file GNEViewNetHelper.cpp.

References GNEViewNetHelper::ObjectsUnderCursor::ObjectsContainer::demandElements.

◆ updateGenericDataElements()

◆ updateGUIGlObjects()

void GNEViewNetHelper::ObjectsUnderCursor::updateGUIGlObjects ( ObjectsContainer container)
private

◆ updateNetworkElements()

◆ updateObjectUnderCursor()

void GNEViewNetHelper::ObjectsUnderCursor::updateObjectUnderCursor ( const std::vector< GUIGlObject * > &  GUIGlObjects)

update objects under cursor (Called only in onLeftBtnPress(...) function)

Definition at line 65 of file GNEViewNetHelper.cpp.

References GNEAttributeCarrier::getTagProperty(), GNETagProperties::isAdditionalElement(), GNETagProperties::isDemandElement(), GNETagProperties::isGenericData(), GNETagProperties::isNetworkElement(), GNETagProperties::isShape(), and GNETagProperties::isTAZElement().

Referenced by GNEViewNet::onLeftBtnPress(), GNEViewNet::onLeftBtnRelease(), GNEViewNet::openObjectDialog(), GNEViewNet::processLeftButtonReleaseNetwork(), and GNECreateEdgeFrame::updateObjectsUnderSnappedCursor().

Here is the caller graph for this function:

◆ updateShapeElements()

◆ updateTAZElements()

void GNEViewNetHelper::ObjectsUnderCursor::updateTAZElements ( ObjectsContainer container,
GNEAttributeCarrier AC 
)
private

Field Documentation

◆ myEdgeObjects

ObjectsContainer GNEViewNetHelper::ObjectsUnderCursor::myEdgeObjects
protected

objectContainer for objects selecting edges

Definition at line 334 of file GNEViewNetHelper.h.

◆ myLaneObjects

ObjectsContainer GNEViewNetHelper::ObjectsUnderCursor::myLaneObjects
protected

objectContainer for objects selecting lanes

Definition at line 337 of file GNEViewNetHelper.h.

◆ mySwapLane2edge

bool GNEViewNetHelper::ObjectsUnderCursor::mySwapLane2edge
protected

flag to enable/disable swap lane to edge

Definition at line 340 of file GNEViewNetHelper.h.

◆ myViewNet

const GNEViewNet* GNEViewNetHelper::ObjectsUnderCursor::myViewNet
protected

pointer to viewNet

Definition at line 331 of file GNEViewNetHelper.h.


The documentation for this class was generated from the following files: