/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIEvent_SimulationEnded.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Thu, 19 Jun 200317///18// Event sent when the simulation is over19/****************************************************************************/20#pragma once21#include <config.h>2223#include <utils/gui/events/GUIEvent.h>24#include <utils/common/SUMOTime.h>25#include <microsim/MSNet.h>262728// ===========================================================================29// class definitions30// ===========================================================================31/**32* @class GUIEvent_SimulationEnded33* @brief Event sent when the simulation is over34*35* Throw from GUIRunThread to GUIApplicationWindow.36*/37class GUIEvent_SimulationEnded : public GUIEvent {38public:39/** @brief Constructor40* @param[in] reason The reason the simulation has ended41* @param[in] step The time step the simulation has ended at42*/43GUIEvent_SimulationEnded(MSNet::SimulationState reason, SUMOTime step)44: GUIEvent(GUIEventType::SIMULATION_ENDED), myReason(reason), myStep(step) {}454647/// @brief Destructor48~GUIEvent_SimulationEnded() { }495051/** @brief Returns the time step the simulation has ended at52* @return The time step the simulation has ended at53*/54SUMOTime getTimeStep() const {55return myStep;56}575859/** @brief Returns the reason the simulation has ended due60* @return The reason the simulation has ended61*/62MSNet::SimulationState getReason() const {63return myReason;64}656667protected:68/// @brief The reason the simulation has ended69MSNet::SimulationState myReason;7071/// @brief The time step the simulation has ended at72SUMOTime myStep;737475};767778