Eclipse SUMO - Simulation of Urban MObility
GNELoadThread.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-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 /****************************************************************************/
18 // The thread that performs the loading of a Netedit-net (adapted from
19 // GUILoadThread)
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
28 
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
33 class GNENet;
34 class GUIEvent;
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
44 
45 public:
48 
50  virtual ~GNELoadThread();
51 
53  FXint run();
54 
56  void newNetwork();
57 
59  void loadNetworkOrConfig();
60 
62  void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg);
63 
65  static void fillOptions(OptionsCont& neteditOptions);
66 
68  static void setDefaultOptions(OptionsCont& neteditOptions);
69 
70 private:
72  bool loadConsoleOptions();
73 
80  void submitEndAndCleanup(GNENet* net, const std::string& loadedFile, const std::string& guiSettingsFile = "", const bool viewportFromRegistry = false);
81 
84 
87 
90 
93 };
The main window of Netedit.
MFXSynchQue< GUIEvent * > & myEventQueue
event Queue
Definition: GNELoadThread.h:89
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on.
Definition: GNELoadThread.h:86
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
void newNetwork()
begins the creation of an empty network
static void fillOptions(OptionsCont &neteditOptions)
clears and initializes the OptionsCont
void loadNetworkOrConfig()
begins the loading of an existent network or config
OutputDevice * myWarningRetriever
Definition: GNELoadThread.h:86
GNEApplicationWindow * myApplicationWindow
netedit application windows
Definition: GNELoadThread.h:83
bool loadConsoleOptions()
load options through console
OutputDevice * myMessageRetriever
Definition: GNELoadThread.h:86
static void setDefaultOptions(OptionsCont &neteditOptions)
sets required options for proper functioning
virtual ~GNELoadThread()
destructor
OutputDevice * myGLDebugRetriever
Definition: GNELoadThread.h:86
OutputDevice * myDebugRetriever
Definition: GNELoadThread.h:86
void submitEndAndCleanup(GNENet *net, const std::string &loadedFile, const std::string &guiSettingsFile="", const bool viewportFromRegistry=false)
Closes the loading process.
FXEX::MFXThreadEvent & myEventThrow
event throw
Definition: GNELoadThread.h:92
FXint run()
starts the thread. The thread ends after the net has been loaded
GNELoadThread(GNEApplicationWindow *applicationWindow, MFXSynchQue< GUIEvent * > &eq, FXEX::MFXThreadEvent &ev)
constructor
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
A storage for options typed value containers)
Definition: OptionsCont.h:89
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61