SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUILoadThread.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Class describing the thread that performs the loading of a simulation
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
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>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
45 class MFXEventQue;
46 class GUINet;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
56 public:
60 
62  virtual ~GUILoadThread();
63 
66  FXint run();
67 
69  void load(const std::string& file, bool isNet);
70 
72  void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
73 
74  const std::string& getFileName() const;
75 
76 protected:
77  virtual bool initOptions();
78 
79 
85  void submitEndAndCleanup(GUINet* net, const SUMOTime simStartTime, const SUMOTime simEndTime,
86  const std::vector<std::string>& guiSettingsFiles = std::vector<std::string>(),
87  const bool osgView = false);
88 
89 protected:
92 
94  std::string myFile;
95 
99 
101 
103 
105  bool myLoadNet;
106 
107 };
108 
109 
110 #endif
111 
112 /****************************************************************************/
OutputDevice * myWarningRetriever
Definition: GUILoadThread.h:98
void load(const std::string &file, bool isNet)
begins the loading of the given file
GUILoadThread(FXApp *app, MFXInterThreadEventClient *mw, MFXEventQue &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...
Definition: GUILoadThread.h:98
OutputDevice * myMessageRetriever
Definition: GUILoadThread.h:98
virtual ~GUILoadThread()
destructor
virtual bool initOptions()
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:90
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
std::string myFile
the path to load the simulation from
Definition: GUILoadThread.h:94
MFXEventQue & myEventQue
MFXInterThreadEventClient * myParent
the parent window to inform about the loading
Definition: GUILoadThread.h:91