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-2023 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
* GNEApp,
const
std::string& toolPath,
41
const
std::string& templateStr, FXMenuPane* menu);
42
44
virtual
~GNEPythonTool
();
45
47
GNEApplicationWindow
*
getGNEApp
()
const
;
48
50
const
std::string&
getToolName
()
const
;
51
53
OptionsCont
&
getToolsOptions
();
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
76
protected
:
78
GNEApplicationWindow
*
myGNEApp
;
79
81
FXMenuCommand*
myMenuCommand
;
82
84
OptionsCont
myPythonToolsOptions
;
85
87
OptionsCont
myPythonToolsOptionsOriginal
;
88
90
const
std::string
myToolPath
;
91
93
const
std::string
myPythonToolName
;
94
95
private
:
97
GNEPythonTool
(
const
GNEPythonTool
&) =
delete
;
98
100
GNEPythonTool
&
operator=
(
const
GNEPythonTool
&) =
delete
;
101
};
102
OptionsCont.h
GNEApplicationWindow
The main window of Netedit.
Definition
GNEApplicationWindow.h:39
GNEPythonTool
Definition
GNEPythonTool.h:36
GNEPythonTool::myPythonToolsOptionsOriginal
OptionsCont myPythonToolsOptionsOriginal
original tools options
Definition
GNEPythonTool.h:87
GNEPythonTool::myMenuCommand
FXMenuCommand * myMenuCommand
menu command associated with this tool
Definition
GNEPythonTool.h:81
GNEPythonTool::getCommand
virtual std::string getCommand() const
get command (python + script + arguments)
Definition
GNEPythonTool.cpp:98
GNEPythonTool::getGNEApp
GNEApplicationWindow * getGNEApp() const
get to GNEApplicationWindow
Definition
GNEPythonTool.cpp:62
GNEPythonTool::saveConfiguration
void saveConfiguration(const std::string &file) const
save configuration
Definition
GNEPythonTool.cpp:194
GNEPythonTool::loadConfiguration
bool loadConfiguration(const std::string &file)
load configuration
Definition
GNEPythonTool.cpp:166
GNEPythonTool::setCurrentValues
virtual void setCurrentValues()
set current values (used for set values like current folder and similar)
Definition
GNEPythonTool.cpp:86
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:154
GNEPythonTool::myGNEApp
GNEApplicationWindow * myGNEApp
pointer to GNEApplicationWindow
Definition
GNEPythonTool.h:78
GNEPythonTool::getToolName
const std::string & getToolName() const
get tool name
Definition
GNEPythonTool.cpp:68
GNEPythonTool::getMenuCommand
FXMenuCommand * getMenuCommand() const
get menu command
Definition
GNEPythonTool.cpp:80
GNEPythonTool::myPythonToolName
const std::string myPythonToolName
tool name
Definition
GNEPythonTool.h:93
GNEPythonTool::postProcessing
virtual void postProcessing()
execute post processing
Definition
GNEPythonTool.cpp:92
GNEPythonTool::getToolsOptions
OptionsCont & getToolsOptions()
get tools options
Definition
GNEPythonTool.cpp:74
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:90
GNEPythonTool::myPythonToolsOptions
OptionsCont myPythonToolsOptions
tools options
Definition
GNEPythonTool.h:84
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 Mon Oct 28 2024 15:20:00 for Eclipse SUMO - Simulation of Urban MObility by
1.9.8