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-2018 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 /****************************************************************************/
16 // Event sent when the the simulation is over
17 /****************************************************************************/
18 #ifndef GUIEvent_SimulationEnded_h
19 #define GUIEvent_SimulationEnded_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
28 #include <utils/common/SUMOTime.h>
29 #include <microsim/MSNet.h>
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
42 public:
48  : GUIEvent(EVENT_SIMULATION_ENDED), myReason(reason), myStep(step) {}
49 
50 
53 
54 
59  return myStep;
60  }
61 
62 
67  return myReason;
68  }
69 
70 
71 protected:
74 
77 
78 
79 };
80 
81 
82 #endif
83 
84 /****************************************************************************/
85 
Event sent when the the simulation is over.
SUMOTime myStep
The time step the simulation has ended at.
long long int SUMOTime
Definition: SUMOTime.h:36
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
MSNet::SimulationState getReason() const
Returns the reason the simulation has ended due.
SimulationState
Possible states of a simulation - running or stopped with different reasons.
Definition: MSNet.h:89
GUIEvent_SimulationEnded(MSNet::SimulationState reason, SUMOTime step)
Constructor.
MSNet::SimulationState myReason
The reason the simulation has ended.
Send when the simulation is over;.
Definition: GUIEvent.h:63