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

void filterLockedElements (const GNEViewNetHelper::LockManager &lockManager, std::vector< GUIGlObjectType > forcedIgnoredTiped={})
 filter locked elements More...
 
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...
 
const std::vector< GNEDemandElement * > & getClickedDemandElements () const
 get vector with clicked Demand Elements More...
 
const std::vector< GUIGlObject * > & getClickedGLObjects () const
 get vector with clicked GL objects 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...
 
GNELanegetLaneFrontNonLocked () const
 get front lane or a pointer to nullptr checking if is locked More...
 
const std::vector< GNELane * > & getLanes () const
 get lanes 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...
 
GNETAZgetTAZFront () const
 get front TAZ or a pointer to nullptr More...
 
GNEWalkingAreagetWalkingAreaFront () const
 get front walkingArea 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 processGUIGlObjects ()
 process GL objects 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 210 of file GNEViewNetHelper.h.

Constructor & Destructor Documentation

◆ ObjectsUnderCursor() [1/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( GNEViewNet viewNet)

constructor

Definition at line 210 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [2/3]

GNEViewNetHelper::ObjectsUnderCursor::ObjectsUnderCursor ( )
private

default constructor

Definition at line 1075 of file GNEViewNetHelper.cpp.

◆ ObjectsUnderCursor() [3/3]

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

Invalidated copy constructor.

Member Function Documentation

◆ filterLockedElements()

void GNEViewNetHelper::ObjectsUnderCursor::filterLockedElements ( const GNEViewNetHelper::LockManager lockManager,
std::vector< GUIGlObjectType forcedIgnoredTiped = {} 
)

filter locked elements

Definition at line 238 of file GNEViewNetHelper.cpp.

References GNEViewNetHelper::LockManager::isObjectLocked().

Referenced by GNEViewNet::processLeftButtonPressData(), GNEViewNet::processLeftButtonPressDemand(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getAdditionalFront()

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

get front additional element or a pointer to nullptr

Definition at line 340 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().

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 661 of file GNEViewNetHelper.cpp.

Referenced by GNEOverlappedInspection::showOverlappedInspection().

Here is the caller graph for this function:

◆ getClickedDemandElements()

const std::vector< GNEDemandElement * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedDemandElements ( ) const

get vector with clicked Demand Elements

Definition at line 671 of file GNEViewNetHelper.cpp.

Referenced by GNEPersonPlanFrame::addPersonPlanElement().

Here is the caller graph for this function:

◆ getClickedGLObjects()

const std::vector< GUIGlObject * > & GNEViewNetHelper::ObjectsUnderCursor::getClickedGLObjects ( ) const

get vector with clicked GL objects

Definition at line 651 of file GNEViewNetHelper.cpp.

Referenced by GNEViewNet::openObjectDialogAtCursor(), GNEDeleteFrame::removeAttributeCarrier(), and GNESelectorFrame::selectAttributeCarrier().

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 526 of file GNEViewNetHelper.cpp.

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

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 490 of file GNEViewNetHelper.cpp.

◆ getDemandElementFront()

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

get front demand element or a pointer to nullptr

Definition at line 358 of file GNEViewNetHelper.cpp.

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

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 616 of file GNEViewNetHelper.cpp.

◆ getEdgeFront()

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

◆ getEdgeRelDataElementFront()

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

get edge rel data element or a pointer to nullptr

Definition at line 634 of file GNEViewNetHelper.cpp.

◆ getGenericDataElementFront()

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

get generic data element or a pointer to nullptr

Definition at line 376 of file GNEViewNetHelper.cpp.

◆ getGlIDFront()

GUIGlID GNEViewNetHelper::ObjectsUnderCursor::getGlIDFront ( ) const

get front GUI GL ID or a pointer to nullptr

Definition at line 266 of file GNEViewNetHelper.cpp.

◆ getGlTypeFront()

GUIGlObjectType GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront ( ) const

get front GUI GL object type or a pointer to nullptr

Definition at line 276 of file GNEViewNetHelper.cpp.

References GLO_NETWORK.

◆ getGUIGlObjectFront()

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

get front attribute carrier or a pointer to nullptr

Definition at line 286 of file GNEViewNetHelper.cpp.

◆ getInternalLaneFront()

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

get front internal lane or a pointer to nullptr

Definition at line 544 of file GNEViewNetHelper.cpp.

◆ getJunctionFront()

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

get front junction or a pointer to nullptr

Definition at line 394 of file GNEViewNetHelper.cpp.

Referenced by GNEContainerFrame::addContainer(), GNECrossingFrame::addCrossing(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEVehicleFrame::addVehicle(), GNEJunction::commitMoveShape(), GNETLSEditorFrame::editTLS(), GNECreateEdgeFrame::processClick(), and GNEViewNet::processLeftButtonPressNetwork().

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 430 of file GNEViewNetHelper.cpp.

Referenced by GNEAdditionalFrame::addAdditional(), GNEStopFrame::addStop(), GNEWireFrame::addWire(), GNEShapeFrame::processClick(), GNEViewNet::processLeftButtonPressDemand(), GNEViewNet::processLeftButtonPressNetwork(), and GNEViewNet::processLeftButtonReleaseNetwork().

Here is the caller graph for this function:

◆ getLaneFrontNonLocked()

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

get front lane or a pointer to nullptr checking if is locked

Definition at line 448 of file GNEViewNetHelper.cpp.

Referenced by GNEConnectorFrame::handleLaneClick(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ getLanes()

const std::vector< GNELane * > & GNEViewNetHelper::ObjectsUnderCursor::getLanes ( ) const

get lanes

Definition at line 480 of file GNEViewNetHelper.cpp.

Referenced by GNEConnectorFrame::handleLaneClick().

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 322 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 562 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 580 of file GNEViewNetHelper.cpp.

Referenced by GNEDeleteFrame::removeGeometryPoint().

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 598 of file GNEViewNetHelper.cpp.

Referenced by GNETAZFrame::processClick(), GNEDeleteFrame::removeGeometryPoint(), and GNETAZRelDataFrame::setTAZ().

Here is the caller graph for this function:

◆ getWalkingAreaFront()

GNEWalkingArea * GNEViewNetHelper::ObjectsUnderCursor::getWalkingAreaFront ( ) const

get front walkingArea or a pointer to nullptr

Definition at line 508 of file GNEViewNetHelper.cpp.

◆ operator=()

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

Invalidated assignment operator.

◆ processGUIGlObjects()

◆ sortGUIGlObjects()

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

sort by altitude and update GUIGlObjects

Definition at line 708 of file GNEViewNetHelper.cpp.

References Shape::getShapeLayer(), GLO_LANE, and GLO_NETWORKELEMENT.

◆ swapLane2Edge()

void GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge ( )

swap lane to edge

Definition at line 231 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

◆ updateAttributeCarriers()

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

◆ updateDemandElements()

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

◆ 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 217 of file GNEViewNetHelper.cpp.

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

Here is the caller graph for this function:

◆ updateShapeElements()

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

◆ 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 377 of file GNEViewNetHelper.h.

◆ myLaneObjects

ObjectsContainer GNEViewNetHelper::ObjectsUnderCursor::myLaneObjects
protected

objectContainer for objects selecting lanes

Definition at line 380 of file GNEViewNetHelper.h.

◆ mySwapLane2edge

bool GNEViewNetHelper::ObjectsUnderCursor::mySwapLane2edge
protected

flag to enable/disable swap lane to edge

Definition at line 383 of file GNEViewNetHelper.h.

◆ myViewNet

const GNEViewNet* GNEViewNetHelper::ObjectsUnderCursor::myViewNet
protected

pointer to viewNet

Definition at line 374 of file GNEViewNetHelper.h.


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