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-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 /****************************************************************************/
20 // Class describing the thread that performs the loading of a simulation
21 /****************************************************************************/
22 #ifndef GUILoadThread_h
23 #define GUILoadThread_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <utils/common/SUMOTime.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
46 class GUINet;
47 class GUIEvent;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
57 public:
61 
63  virtual ~GUILoadThread();
64 
67  FXint run();
68 
70  void loadConfigOrNet(const std::string& file, bool isNet);
71 
73  void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
74 
75  const std::string& getFileName() const;
76 
77 protected:
83  void submitEndAndCleanup(GUINet* net, const SUMOTime simStartTime, const SUMOTime simEndTime,
84  const std::vector<std::string>& guiSettingsFiles = std::vector<std::string>(),
85  const bool osgView = false);
86 
87 protected:
90 
92  std::string myFile;
93 
95  std::string myTitle;
96 
100 
102 
104 
106  bool myLoadNet;
107 
108 };
109 
110 
111 #endif
112 
113 /****************************************************************************/
MFXEventQue< GUIEvent * > & myEventQue
OutputDevice * myWarningRetriever
Definition: GUILoadThread.h:99
GUILoadThread(FXApp *app, GUIApplicationWindow *mw, MFXEventQue< GUIEvent *> &eq, FXEX::FXThreadEvent &ev)
constructor
const std::string & getFileName() const
FXEX::FXThreadEvent & myEventThrow
void submitEndAndCleanup(GUINet *net, const SUMOTime simStartTime, const SUMOTime simEndTime, const std::vector< std::string > &guiSettingsFiles=std::vector< std::string >(), const bool osgView=false)
Closes the loading process.
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on...
Definition: GUILoadThread.h:99
OutputDevice * myMessageRetriever
Definition: GUILoadThread.h:99
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:89
std::string myTitle
the title string for the application
Definition: GUILoadThread.h:95
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:88
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
long long int SUMOTime
Definition: TraCIDefs.h:51
std::string myFile
the path to load the simulation from
Definition: GUILoadThread.h:92
The main window of the SUMO-gui.