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-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
// Python tools used in netedit
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <
utils/foxtools/fxheader.h
>
24
#include <
utils/options/OptionsCont.h
>
25
26
// ===========================================================================
27
// class declarations
28
// ===========================================================================
29
30
class
GNEApplicationWindow
;
31
32
// ===========================================================================
33
// class definitions
34
// ===========================================================================
35
36
class
GNEPythonTool
{
37
38
public
:
40
GNEPythonTool
(
GNEApplicationWindow
* applicationWindow,
const
std::string& toolPath,
41
const
std::string& templateStr, FXMenuPane* menu);
42
44
virtual
~GNEPythonTool
();
45
47
const
std::string&
getToolName
()
const
;
48
50
OptionsCont
&
getToolsOptions
();
51
53
FXMenuCommand*
getMenuCommand
()
const
;
54
56
virtual
void
setCurrentValues
();
57
59
virtual
void
postProcessing
();
60
62
virtual
std::string
getCommand
()
const
;
63
65
const
std::string
getDefaultValue
(
const
std::string& name)
const
;
66
68
bool
loadConfiguration
(
const
std::string& file);
69
71
void
saveConfiguration
(
const
std::string& file)
const
;
72
73
protected
:
75
GNEApplicationWindow
*
myApplicationWindow
=
nullptr
;
76
78
FXMenuCommand*
myMenuCommand
=
nullptr
;
79
81
OptionsCont
myPythonToolsOptions
;
82
84
OptionsCont
myPythonToolsOptionsOriginal
;
85
87
const
std::string
myToolPath
;
88
90
const
std::string
myPythonToolName
;
91
93
std::string
getCommandPath
()
const
;
94
95
private
:
97
GNEPythonTool
(
const
GNEPythonTool
&) =
delete
;
98
100
GNEPythonTool
&
operator=
(
const
GNEPythonTool
&) =
delete
;
101
};
OptionsCont.h
GNEApplicationWindow
The main window of Netedit.
Definition
GNEApplicationWindow.h:50
GNEPythonTool
Definition
GNEPythonTool.h:36
GNEPythonTool::myApplicationWindow
GNEApplicationWindow * myApplicationWindow
application window
Definition
GNEPythonTool.h:75
GNEPythonTool::myPythonToolsOptionsOriginal
OptionsCont myPythonToolsOptionsOriginal
original tools options
Definition
GNEPythonTool.h:84
GNEPythonTool::myMenuCommand
FXMenuCommand * myMenuCommand
menu command associated with this tool
Definition
GNEPythonTool.h:78
GNEPythonTool::getCommand
virtual std::string getCommand() const
get command (python + script + arguments)
Definition
GNEPythonTool.cpp:120
GNEPythonTool::saveConfiguration
void saveConfiguration(const std::string &file) const
save configuration
Definition
GNEPythonTool.cpp:197
GNEPythonTool::loadConfiguration
bool loadConfiguration(const std::string &file)
load configuration
Definition
GNEPythonTool.cpp:169
GNEPythonTool::setCurrentValues
virtual void setCurrentValues()
set current values (used for set values like current folder and similar)
Definition
GNEPythonTool.cpp:80
GNEPythonTool::~GNEPythonTool
virtual ~GNEPythonTool()
destructor
Definition
GNEPythonTool.cpp:58
GNEPythonTool::getDefaultValue
const std::string getDefaultValue(const std::string &name) const
get default value of the given parameter
Definition
GNEPythonTool.cpp:157
GNEPythonTool::getCommandPath
std::string getCommandPath() const
get command (python + script)
Definition
GNEPythonTool.cpp:92
GNEPythonTool::getToolName
const std::string & getToolName() const
get tool name
Definition
GNEPythonTool.cpp:62
GNEPythonTool::getMenuCommand
FXMenuCommand * getMenuCommand() const
get menu command
Definition
GNEPythonTool.cpp:74
GNEPythonTool::myPythonToolName
const std::string myPythonToolName
tool name
Definition
GNEPythonTool.h:90
GNEPythonTool::postProcessing
virtual void postProcessing()
execute post processing
Definition
GNEPythonTool.cpp:86
GNEPythonTool::getToolsOptions
OptionsCont & getToolsOptions()
get tools options
Definition
GNEPythonTool.cpp:68
GNEPythonTool::operator=
GNEPythonTool & operator=(const GNEPythonTool &)=delete
Invalidated assignment operator.
GNEPythonTool::myToolPath
const std::string myToolPath
python tool path relative to SUMO_HOME
Definition
GNEPythonTool.h:87
GNEPythonTool::myPythonToolsOptions
OptionsCont myPythonToolsOptions
tools options
Definition
GNEPythonTool.h:81
GNEPythonTool::GNEPythonTool
GNEPythonTool(const GNEPythonTool &)=delete
Invalidated copy constructor.
OptionsCont
A storage for options typed value containers)
Definition
OptionsCont.h:89
fxheader.h
src
netedit
tools
GNEPythonTool.h
Generated on Sat Sep 6 2025 00:08:06 for Eclipse SUMO - Simulation of Urban MObility by
1.9.8