/****************************************************************************/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 GNEExternalRunner.h14/// @author Pablo Alvarez Lopez15/// @date Aug 202516///17// External runner for python and external tools18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/MFXSingleEventThread.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNERunDialog;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEExternalRunner : protected MFXSingleEventThread {3536public:37/// @brief Constructor38GNEExternalRunner(GNEApplicationWindow* applicationWindow);3940/// @brief destructor41~GNEExternalRunner();4243/// @brief run tool called from dialog44void runTool(GNERunDialog* runDialog);4546/// @brief abort running47void abort();4849/// @brief check if is running50bool isRunning() const;5152/// @brief check if during execution an error was Occurred53bool errorOccurred() const;5455protected:56/// @brief pointer to current run dialog57GNERunDialog* myRunDialog = nullptr;5859/// @brief flag for check if we have a running process60bool myRunning = false;6162/// @brief flag for check if during execution an error was Occurred63bool myErrorOccurred = false;6465private:66/// @brief pipe file67FILE* myPipe = nullptr;6869/// @brief starts the thread. The thread ends after the tool is finished70FXint run();7172/// @brief Invalidated copy constructor.73GNEExternalRunner(const GNEExternalRunner&) = delete;7475/// @brief Invalidated assignment operator.76GNEExternalRunner& operator=(const GNEExternalRunner&) = delete;77};787980