Eclipse SUMO - Simulation of Urban MObility
GUIEvent_SimulationEnded.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Event sent when the the simulation is over
16 /****************************************************************************/
17 #ifndef GUIEvent_SimulationEnded_h
18 #define GUIEvent_SimulationEnded_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
27 #include <utils/common/SUMOTime.h>
28 #include <microsim/MSNet.h>
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
41 public:
47  : GUIEvent(EVENT_SIMULATION_ENDED), myReason(reason), myStep(step) {}
48 
49 
52 
53 
58  return myStep;
59  }
60 
61 
66  return myReason;
67  }
68 
69 
70 protected:
73 
76 
77 
78 };
79 
80 
81 #endif
82 
83 /****************************************************************************/
84 
SUMOTime.h
MSNet.h
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GUIEvent_SimulationEnded::myStep
SUMOTime myStep
The time step the simulation has ended at.
Definition: GUIEvent_SimulationEnded.h:75
EVENT_SIMULATION_ENDED
@ EVENT_SIMULATION_ENDED
Send when the simulation is over;.
Definition: GUIEvent.h:62
GUIEvent_SimulationEnded
Event sent when the the simulation is over.
Definition: GUIEvent_SimulationEnded.h:40
MSNet::SimulationState
SimulationState
Possible states of a simulation - running or stopped with different reasons.
Definition: MSNet.h:96
GUIEvent_SimulationEnded::getReason
MSNet::SimulationState getReason() const
Returns the reason the simulation has ended due.
Definition: GUIEvent_SimulationEnded.h:65
GUIEvent_SimulationEnded::myReason
MSNet::SimulationState myReason
The reason the simulation has ended.
Definition: GUIEvent_SimulationEnded.h:72
GUIEvent_SimulationEnded::getTimeStep
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
Definition: GUIEvent_SimulationEnded.h:57
GUIEvent_SimulationEnded::GUIEvent_SimulationEnded
GUIEvent_SimulationEnded(MSNet::SimulationState reason, SUMOTime step)
Constructor.
Definition: GUIEvent_SimulationEnded.h:46
GUIEvent
Definition: GUIEvent.h:76
GUIEvent.h
GUIEvent_SimulationEnded::~GUIEvent_SimulationEnded
~GUIEvent_SimulationEnded()
Destructor.
Definition: GUIEvent_SimulationEnded.h:51
config.h