SUMO - Simulation of Urban MObility
GUILoadThread.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Class describing the thread that performs the loading of a simulation
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2002-2016 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef GUILoadThread_h
24 #define GUILoadThread_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <utils/common/SUMOTime.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
47 class GUINet;
48 class GUIEvent;
49 
50 
51 // ===========================================================================
52 // class definitions
53 // ===========================================================================
58 public:
62 
64  virtual ~GUILoadThread();
65 
68  FXint run();
69 
71  void loadConfigOrNet(const std::string& file, bool isNet);
72 
74  void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
75 
76  const std::string& getFileName() const;
77 
78 protected:
84  void submitEndAndCleanup(GUINet* net, const SUMOTime simStartTime, const SUMOTime simEndTime,
85  const std::vector<std::string>& guiSettingsFiles = std::vector<std::string>(),
86  const bool osgView = false);
87 
88 protected:
91 
93  std::string myFile;
94 
96  std::string myTitle;
97 
101 
103 
105 
107  bool myLoadNet;
108 
109 };
110 
111 
112 #endif
113 
114 /****************************************************************************/
MFXEventQue< GUIEvent * > & myEventQue
OutputDevice * myWarningRetriever
long long int SUMOTime
Definition: SUMOTime.h:43
GUILoadThread(FXApp *app, GUIApplicationWindow *mw, MFXEventQue< GUIEvent * > &eq, FXEX::FXThreadEvent &ev)
constructor
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...
OutputDevice * myMessageRetriever
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:90
std::string myTitle
the title string for the application
Definition: GUILoadThread.h:96
const std::string & getFileName() const
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:89
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
std::string myFile
the path to load the simulation from
Definition: GUILoadThread.h:93
The main window of the SUMO-gui.