LCOV - code coverage report
Current view: top level - src/gui - GUIEvent_SimulationLoaded.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 8 8 100.0 %
Date: 2024-05-18 15:37:58 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /****************************************************************************/
       2             : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3             : // Copyright (C) 2002-2024 German Aerospace Center (DLR) and others.
       4             : // This program and the accompanying materials are made available under the
       5             : // terms of the Eclipse Public License 2.0 which is available at
       6             : // https://www.eclipse.org/legal/epl-2.0/
       7             : // This Source Code may also be made available under the following Secondary
       8             : // Licenses when the conditions for such availability set forth in the Eclipse
       9             : // Public License 2.0 are satisfied: GNU General Public License, version 2
      10             : // or later which is available at
      11             : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      12             : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      13             : /****************************************************************************/
      14             : /// @file    GUIEvent_SimulationLoaded.h
      15             : /// @author  Daniel Krajzewicz
      16             : /// @author  Sascha Krieg
      17             : /// @author  Michael Behrisch
      18             : /// @author  Jakob Erdmann
      19             : /// @date    Sept 2002
      20             : ///
      21             : // Event sent when the simulation has been loaded by GUILoadThread
      22             : /****************************************************************************/
      23             : #pragma once
      24             : #include <config.h>
      25             : 
      26             : #include <string>
      27             : #include <iostream>
      28             : #include <utils/gui/events/GUIEvent.h>
      29             : #include <utils/common/SUMOTime.h>
      30             : 
      31             : 
      32             : // ===========================================================================
      33             : // class declarations
      34             : // ===========================================================================
      35             : class GUINet;
      36             : 
      37             : 
      38             : // ===========================================================================
      39             : // class definitions
      40             : // ===========================================================================
      41             : /**
      42             :  * @class  GUIEvent_SimulationLoaded
      43             :  *
      44             :  * Throw to GUIApplicationWindow from GUILoadThread after a simulation has
      45             :  * been loaded or the loading process failed
      46             :  */
      47             : class GUIEvent_SimulationLoaded : public GUIEvent {
      48             : public:
      49             :     /// constructor
      50        7278 :     GUIEvent_SimulationLoaded(GUINet* net,
      51             :                               SUMOTime startTime, SUMOTime endTime,
      52             :                               const std::string& file,
      53             :                               const std::vector<std::string>& settingsFiles,
      54             :                               const bool osgView,
      55             :                               const bool viewportFromRegistry)
      56        7278 :         : GUIEvent(GUIEventType::SIMULATION_LOADED),
      57        7278 :           myNet(net), myBegin(startTime), myEnd(endTime),
      58        7278 :           myFile(file), mySettingsFiles(settingsFiles),
      59        7278 :           myOsgView(osgView),
      60        7278 :           myViewportFromRegistry(viewportFromRegistry)
      61        7278 :     { }
      62             : 
      63             :     /// destructor
      64       14556 :     ~GUIEvent_SimulationLoaded() { }
      65             : 
      66             : public:
      67             :     /// the loaded net
      68             :     GUINet*  myNet;
      69             : 
      70             :     /// the time the simulation shall start with
      71             :     const SUMOTime myBegin;
      72             : 
      73             :     /// the time the simulation shall end with
      74             :     const SUMOTime myEnd;
      75             : 
      76             :     /// the name of the loaded file
      77             :     const std::string myFile;
      78             : 
      79             :     /// the name of the settings file to load
      80             :     const std::vector<std::string> mySettingsFiles;
      81             : 
      82             :     /// whether to load the OpenSceneGraph view
      83             :     const bool myOsgView;
      84             : 
      85             :     /// @brief whether loading viewport from registry
      86             :     const bool myViewportFromRegistry;
      87             : 
      88             : private:
      89             :     /// @brief Invalidated assignment operator
      90             :     GUIEvent_SimulationLoaded& operator=(const GUIEvent_SimulationLoaded& s);
      91             : };

Generated by: LCOV version 1.14