Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEPythonTool.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// Python tools used in netedit
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class declarations
28// ===========================================================================
29
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
40 GNEPythonTool(GNEApplicationWindow* GNEApp, const std::string& toolPath,
41 const std::string& templateStr, FXMenuPane* menu);
42
44 virtual ~GNEPythonTool();
45
48
50 const std::string& getToolName() const;
51
54
56 FXMenuCommand* getMenuCommand() const;
57
59 virtual void setCurrentValues();
60
62 virtual void postProcessing();
63
65 virtual std::string getCommand() const;
66
68 const std::string getDefaultValue(const std::string& name) const;
69
71 bool loadConfiguration(const std::string& file);
72
74 void saveConfiguration(const std::string& file) const;
75
76protected:
78 std::string getCommandPath() const;
79
80protected:
83
85 FXMenuCommand* myMenuCommand;
86
89
92
94 const std::string myToolPath;
95
97 const std::string myPythonToolName;
98
99private:
101 GNEPythonTool(const GNEPythonTool&) = delete;
102
105};
The main window of Netedit.
OptionsCont myPythonToolsOptionsOriginal
original tools options
FXMenuCommand * myMenuCommand
menu command associated with this tool
virtual std::string getCommand() const
get command (python + script + arguments)
GNEApplicationWindow * getGNEApp() const
get to GNEApplicationWindow
void saveConfiguration(const std::string &file) const
save configuration
bool loadConfiguration(const std::string &file)
load configuration
virtual void setCurrentValues()
set current values (used for set values like current folder and similar)
virtual ~GNEPythonTool()
destructor
const std::string getDefaultValue(const std::string &name) const
get default value of the given parameter
GNEApplicationWindow * myGNEApp
pointer to GNEApplicationWindow
std::string getCommandPath() const
get command (python + script)
const std::string & getToolName() const
get tool name
FXMenuCommand * getMenuCommand() const
get menu command
const std::string myPythonToolName
tool name
virtual void postProcessing()
execute post processing
OptionsCont & getToolsOptions()
get tools options
GNEPythonTool & operator=(const GNEPythonTool &)=delete
Invalidated assignment operator.
const std::string myToolPath
python tool path relative to SUMO_HOME
OptionsCont myPythonToolsOptions
tools options
GNEPythonTool(const GNEPythonTool &)=delete
Invalidated copy constructor.
A storage for options typed value containers)
Definition OptionsCont.h:89