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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Event sent when the the simulation is over
19 /****************************************************************************/
20 #ifndef GUIEvent_SimulationEnded_h
21 #define GUIEvent_SimulationEnded_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
34 #include <utils/common/SUMOTime.h>
35 #include <microsim/MSNet.h>
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
48 public:
54  : GUIEvent(EVENT_SIMULATION_ENDED), myReason(reason), myStep(step) {}
55 
56 
59 
60 
65  return myStep;
66  }
67 
68 
73  return myReason;
74  }
75 
76 
77 protected:
80 
83 
84 
85 };
86 
87 
88 #endif
89 
90 /****************************************************************************/
91 
Event sent when the the simulation is over.
SUMOTime myStep
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:95
GUIEvent_SimulationEnded(MSNet::SimulationState reason, SUMOTime step)
Constructor.
MSNet::SimulationState myReason
The reason the simulation has ended.
Send when the simulation is over; The reason and the time step are stored within the event...
Definition: GUIEvent.h:62
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
long long int SUMOTime
Definition: TraCIDefs.h:51