Path: blob/main/src/netedit/changes/GNEChange_Connection.h
169678 views
/****************************************************************************/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 GNEChange_Connection.h14/// @author Jakob Erdmann15/// @date May 201116///17// A network change in which a single connection is created or deleted18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEChange.h"2324// ===========================================================================25// class definitions26// ===========================================================================27/**28* @class GNEChange_Connection29* A network change in which a single lane is created or deleted30*/31class GNEChange_Connection : public GNEChange {32FXDECLARE_ABSTRACT(GNEChange_Connection)3334public:3536/**@brief Constructor for creating/deleting a connection37* @param[in] edge The source edge of the connection38* @param[in] nbCon The data of the connection39* @param[in] check if in the moment of change connection was selected40* @param[in] forward Whether to create/delete (true/false)41*/42GNEChange_Connection(GNEEdge* edge, NBEdge::Connection nbCon, bool selected, bool forward);4344/// @brief Destructor45~GNEChange_Connection();4647/// @name inherited from GNEChange48/// @{49/// @brief get undo Name50std::string undoName() const;5152/// @brief get Redo name53std::string redoName() const;5455/// @brief undo action56void undo();5758/// @brief redo action59void redo();60/// @}616263private:64// @brief the connection object to be removed/re-added65GNEEdge* myEdge;6667/// @brief the data which must be copied because the original reference does not persist68NBEdge::Connection myNBEdgeConnection;69};707172