Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEEvent_FileLoaded.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-2025 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// Event to send when the network has been loaded by GNELoadThread
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <string>
24
26
27// ===========================================================================
28// class declarations
29// ===========================================================================
30
31class GNENet;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
38
39public:
41 enum class Type {
42 NETECFG, // netedit config
43 SUMOCFG, // sumo config
44 NETCCFG, // netconvert config
45 NETWORK, // sumo network
46 OSM, // OSM network
47 CONSOLE, // console options
48 NEW, // new network
49 INVALID_TYPE, // invalid loading type
50 INVALID_OPTIONS, // invalid options
51 INVALID_PROJECTION, // invalid options
52 INVALID_CONFIG // invalid config
53 };
54
56 GNEEvent_FileLoaded(GNEEvent_FileLoaded::Type type, GNENet* net, const std::string& file,
57 const std::string& settingsFile, const bool viewportFromRegistry);
58
61
64
66 GNENet* getNet() const;
67
69 const std::string& getFile() const;
70
72 const std::string& getSettingsFile() const;
73
75 bool getViewportFromRegistry() const;
76
77protected:
80
83
85 std::string myFile;
86
88 std::string mySettingsFile;
89
92
93private:
96
99};
GNENet * getNet() const
get the loaded net
const std::string & getSettingsFile() const
get the name of the settings file to load
std::string mySettingsFile
the name of the settings file to load
bool myViewportFromRegistry
whether loading viewport from registry
Type
type of loaded element
bool getViewportFromRegistry() const
get whether loading viewport from registry
std::string myFile
the name of the loaded file
GNEEvent_FileLoaded & operator=(const GNEEvent_FileLoaded &src)=delete
Invalidated assignment operator.
GNENet * myNet
the loaded net
const std::string & getFile() const
get the name of the loaded file
GNEEvent_FileLoaded::Type getType() const
get event type
GNEEvent_FileLoaded(const GNEEvent_FileLoaded &)=delete
Invalidated copy constructor.
GNEEvent_FileLoaded::Type myType
event type