/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEPythonTool.h14/// @author Pablo Alvarez Lopez15/// @date Jun 202216///17// Python tools used in netedit18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/fxheader.h>23#include <utils/options/OptionsCont.h>2425// ===========================================================================26// class declarations27// ===========================================================================2829class GNEApplicationWindow;3031// ===========================================================================32// class definitions33// ===========================================================================3435class GNEPythonTool {3637public:38/// @brief Constructor39GNEPythonTool(GNEApplicationWindow* applicationWindow, const std::string& toolPath,40const std::string& templateStr, FXMenuPane* menu);4142/// @brief destructor43virtual ~GNEPythonTool();4445/// @brief get tool name46const std::string& getToolName() const;4748/// @brief get tools options49OptionsCont& getToolsOptions();5051/// @brief get menu command52FXMenuCommand* getMenuCommand() const;5354/// @brief set current values (used for set values like current folder and similar)55virtual void setCurrentValues();5657/// @brief execute post processing58virtual void postProcessing();5960/// @brief get command (python + script + arguments)61virtual std::string getCommand() const;6263/// @brief get default value of the given parameter64const std::string getDefaultValue(const std::string& name) const;6566/// @brief load configuration67bool loadConfiguration(const std::string& file);6869/// @brief save configuration70void saveConfiguration(const std::string& file) const;7172protected:73/// @brief application window74GNEApplicationWindow* myApplicationWindow = nullptr;7576/// @brief menu command associated with this tool77FXMenuCommand* myMenuCommand = nullptr;7879/// @brief tools options80OptionsCont myPythonToolsOptions;8182/// @brief original tools options83OptionsCont myPythonToolsOptionsOriginal;8485/// @brief python tool path relative to SUMO_HOME86const std::string myToolPath;8788/// @brief tool name89const std::string myPythonToolName;9091/// @brief get command (python + script)92std::string getCommandPath() const;9394private:95/// @brief Invalidated copy constructor.96GNEPythonTool(const GNEPythonTool&) = delete;9798/// @brief Invalidated assignment operator.99GNEPythonTool& operator=(const GNEPythonTool&) = delete;100};101102103