Eclipse SUMO - Simulation of Urban MObility
MSPushButton Class Referenceabstract

#include <MSPushButton.h>

Inheritance diagram for MSPushButton:
Collaboration diagram for MSPushButton:

Public Member Functions

virtual bool isActivated () const =0
 Checks if the the pushbutton has been pressed. More...
 
virtual ~MSPushButton ()
 

Static Public Member Functions

static bool anyActive (const std::vector< MSPushButton *> &)
 Checks if any pushbutton in the vector is active. More...
 

Protected Member Functions

 MSPushButton (const MSEdge *edge, const MSEdge *crossingEdge)
 

Protected Attributes

const MSEdgem_crossingEdge
 
const MSEdgem_edge
 

Detailed Description

Abstract push button class

Definition at line 31 of file MSPushButton.h.

Constructor & Destructor Documentation

◆ ~MSPushButton()

MSPushButton::~MSPushButton ( )
virtual

do not delete the MSEdge here

Definition at line 32 of file MSPushButton.cpp.

◆ MSPushButton()

MSPushButton::MSPushButton ( const MSEdge edge,
const MSEdge crossingEdge 
)
protected

Protected constructor

Parameters
[in]edgethe edge where the push button is located
[in]crossingEdgethe crossing controlled by the push button

Definition at line 27 of file MSPushButton.cpp.

References m_crossingEdge, and m_edge.

Member Function Documentation

◆ anyActive()

bool MSPushButton::anyActive ( const std::vector< MSPushButton *> &  pushButtons)
static

Checks if any pushbutton in the vector is active.

Returns
True if at least one pushbutton is active, false otherwise

Definition at line 36 of file MSPushButton.cpp.

References MSPedestrianPushButton::m_crossingEdgeMap, and MSPedestrianPushButton::m_crossingEdgeMapLoaded.

Referenced by MSSOTLTrafficLightLogic::isPushButtonPressed().

◆ isActivated()

virtual bool MSPushButton::isActivated ( ) const
pure virtual

Checks if the the pushbutton has been pressed.

Returns
true if pressed, false otherwise

Implemented in MSPedestrianPushButton.

Referenced by MSPedestrianPushButton::~MSPedestrianPushButton().

Field Documentation

◆ m_crossingEdge

const MSEdge* MSPushButton::m_crossingEdge
protected

Definition at line 54 of file MSPushButton.h.

Referenced by MSPedestrianPushButton::isActivated(), and MSPushButton().

◆ m_edge

const MSEdge* MSPushButton::m_edge
protected

Definition at line 53 of file MSPushButton.h.

Referenced by MSPedestrianPushButton::isActivated(), and MSPushButton().


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