SUMO - Simulation of Urban MObility
GUILoadThread.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-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 /****************************************************************************/
18 // Class describing the thread that performs the loading of a simulation
19 /****************************************************************************/
20 #ifndef GUILoadThread_h
21 #define GUILoadThread_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <utils/common/SUMOTime.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
40 class GUINet;
41 class GUIEvent;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
51 public:
55 
57  virtual ~GUILoadThread();
58 
61  FXint run();
62 
64  void loadConfigOrNet(const std::string& file, bool isNet);
65 
67  void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
68 
69  const std::string& getFileName() const;
70 
71 protected:
77  void submitEndAndCleanup(GUINet* net, const SUMOTime simStartTime, const SUMOTime simEndTime,
78  const std::vector<std::string>& guiSettingsFiles = std::vector<std::string>(),
79  const bool osgView = false,
80  const bool viewportFromRegistry = false);
81 
82 protected:
85 
87  std::string myFile;
88 
90  std::string myTitle;
91 
95 
97 
99 
101  bool myLoadNet;
102 
103 };
104 
105 
106 #endif
107 
108 /****************************************************************************/
MFXEventQue< GUIEvent * > & myEventQue
Definition: GUILoadThread.h:96
OutputDevice * myWarningRetriever
Definition: GUILoadThread.h:94
long long int SUMOTime
Definition: SUMOTime.h:36
GUILoadThread(FXApp *app, GUIApplicationWindow *mw, MFXEventQue< GUIEvent *> &eq, FXEX::FXThreadEvent &ev)
constructor
const std::string & getFileName() const
FXEX::FXThreadEvent & myEventThrow
Definition: GUILoadThread.h:98
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on...
Definition: GUILoadThread.h:94
OutputDevice * myMessageRetriever
Definition: GUILoadThread.h:94
virtual ~GUILoadThread()
destructor
void loadConfigOrNet(const std::string &file, bool isNet)
begins the loading of the given file
GUIApplicationWindow * myParent
the parent window to inform about the loading
Definition: GUILoadThread.h:84
std::string myTitle
the title string for the application
Definition: GUILoadThread.h:90
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.
bool myLoadNet
Information whether only the network shall be loaded.
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
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.
Definition: OutputDevice.h:64
std::string myFile
the path to load the simulation from
Definition: GUILoadThread.h:87
The main window of the SUMO-gui.