Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSPushButton Class Referenceabstract

#include <MSPushButton.h>

Inheritance diagram for MSPushButton:
[legend]
Collaboration diagram for MSPushButton:
[legend]

Public Member Functions

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

Static Public Member Functions

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

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 34 of file MSPushButton.h.

Constructor & Destructor Documentation

◆ ~MSPushButton()

MSPushButton::~MSPushButton ( )
virtual

do not delete the MSEdge here

Definition at line 44 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 39 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 48 of file MSPushButton.cpp.

Referenced by MSSOTLTrafficLightLogic::isPushButtonPressed().

Here is the caller graph for this function:

◆ isActivated()

virtual bool MSPushButton::isActivated ( ) const
pure virtual

Checks if the pushbutton has been pressed.

Returns
true if pressed, false otherwise

Implemented in MSPedestrianPushButton.

Field Documentation

◆ m_crossingEdge

const MSEdge* MSPushButton::m_crossingEdge
protected

Definition at line 57 of file MSPushButton.h.

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

◆ m_edge

const MSEdge* MSPushButton::m_edge
protected

Definition at line 56 of file MSPushButton.h.

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


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