/****************************************************************************/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_Lane.h14/// @author Jakob Erdmann15/// @date April 201116///17// A network change in which a single lane is created or deleted18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEChange.h"2324// ===========================================================================25// class definitions26// ===========================================================================27/**28* @class GNEChange_Lane29* A network change in which a single lane is created or deleted30*/31class GNEChange_Lane : public GNEChange {32FXDECLARE_ABSTRACT(GNEChange_Lane)3334public:35/**@brief Constructor for creating a lane36* @param[in] edge The edge on which to apply changes37* @param[in] laneAttrs The attributes of the lane to be created/38*/39GNEChange_Lane(GNEEdge* edge, const NBEdge::Lane& laneAttrs);4041/**@brief Constructor for deleting a lane42* @param[in] edge The edge on which to apply changes43* @param[in] lane The lane to be deleted44* @param[in] laneAttrs The attributes of the lane to be deleted45* @param[in] forward Whether to delete (true/false)46* @param[in] recomputeConnections Whether to recompute all connections for the affected edge47*/48GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward, bool recomputeConnections = true);4950/// @brief Destructor51~GNEChange_Lane();5253/// @name inherited from GNEChange54/// @{55/// @brief get undo Name56std::string undoName() const;5758/// @brief get Redo name59std::string redoName() const;6061/// @brief undo action62void undo();6364/// @brief redo action65void redo();66/// @}6768private:69/// @brief we need the edge because it is the target of our change commands70GNEEdge* myEdge;7172/// @brief we need to preserve the lane because it maybe the target of GNEChange_Attribute commands73GNELane* myLane;7475/// @brief we need to preserve the attributes explicitly because they are not contained withing GNELane itself76const NBEdge::Lane myLaneAttrs;7778/// @brief whether to recompute connection when adding a new lane79bool myRecomputeConnections;80};818283