Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUILoadThread.h
Go to the documentation of this file.
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/****************************************************************************/
21// Class describing the thread that performs the loading of a simulation
22/****************************************************************************/
23#pragma once
24#include <config.h>
25
31
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
37class GUINet;
38class GUIEvent;
39
40
41// ===========================================================================
42// class definitions
43// ===========================================================================
48public:
51 FXEX::MFXThreadEvent& ev, const bool isLibsumo);
52
54 virtual ~GUILoadThread();
55
58 FXint run();
59
61 void loadConfigOrNet(const std::string& file);
62
64 void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
65
66 const std::string& getFileName() const;
67
68protected:
74 void submitEndAndCleanup(GUINet* net, const SUMOTime simStartTime, const SUMOTime simEndTime,
75 const std::vector<std::string>& guiSettingsFiles = std::vector<std::string>(),
76 const bool osgView = false,
77 const bool viewportFromRegistry = false);
78
79protected:
82
84 std::string myFile;
85
87 std::string myTitle;
88
92
94
96
98 const bool myAmLibsumo;
99
100};
long long int SUMOTime
Definition GUI.h:36
The main window of the SUMO-gui.
void submitEndAndCleanup(GUINet *net, const SUMOTime simStartTime, const SUMOTime simEndTime, const std::vector< std::string > &guiSettingsFiles=std::vector< std::string >(), const bool osgView=false, const bool viewportFromRegistry=false)
Closes the loading process.
OutputDevice * myWarningRetriever
std::string myFile
the path to load the simulation from
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
virtual ~GUILoadThread()
destructor
void loadConfigOrNet(const std::string &file)
begins the loading of the given file
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
const std::string & getFileName() const
std::string myTitle
the title string for the application
OutputDevice * myMessageRetriever
GUIApplicationWindow * myParent
the parent window to inform about the loading
FXEX::MFXThreadEvent & myEventThrow
const bool myAmLibsumo
whether we are running in libsumo
MFXSynchQue< GUIEvent * > & myEventQue
A MSNet extended by some values for usage within the gui.
Definition GUINet.h:82
Static storage of an output device and its base (abstract) implementation.