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
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
std::string
getCommandPath
()
const
;
79
80
protected
:
82
GNEApplicationWindow
*
myGNEApp
;
83
85
FXMenuCommand*
myMenuCommand
;
86
88
OptionsCont
myPythonToolsOptions
;
89
91
OptionsCont
myPythonToolsOptionsOriginal
;
92
94
const
std::string
myToolPath
;
95
97
const
std::string
myPythonToolName
;
98
99
private
:
101
GNEPythonTool
(
const
GNEPythonTool
&) =
delete
;
102
104
GNEPythonTool
&
operator=
(
const
GNEPythonTool
&) =
delete
;
105
};
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:91
GNEPythonTool::myMenuCommand
FXMenuCommand * myMenuCommand
menu command associated with this tool
Definition
GNEPythonTool.h:85
GNEPythonTool::getCommand
virtual std::string getCommand() const
get command (python + script + arguments)
Definition
GNEPythonTool.cpp:126
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:203
GNEPythonTool::loadConfiguration
bool loadConfiguration(const std::string &file)
load configuration
Definition
GNEPythonTool.cpp:175
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:163
GNEPythonTool::myGNEApp
GNEApplicationWindow * myGNEApp
pointer to GNEApplicationWindow
Definition
GNEPythonTool.h:82
GNEPythonTool::getCommandPath
std::string getCommandPath() const
get command (python + script)
Definition
GNEPythonTool.cpp:98
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:97
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:94
GNEPythonTool::myPythonToolsOptions
OptionsCont myPythonToolsOptions
tools options
Definition
GNEPythonTool.h:88
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 Dec 23 2024 00:15:58 for Eclipse SUMO - Simulation of Urban MObility by
1.9.8