Path: blob/main/src/netedit/changes/GNEChange_ToggleAttribute.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_ToggleAttribute.h14/// @author Pablo Alvarez Lopez15/// @date Aug 201916///17// A network change in which the attribute of some object is modified18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEChange.h"2324// ===========================================================================25// class definitions26// ===========================================================================27/**28* @class GNEChange_ToggleAttribute29* @brief the function-object for an editing operation (abstract base)30*/31class GNEChange_ToggleAttribute : public GNEChange {32FXDECLARE_ABSTRACT(GNEChange_ToggleAttribute)3334public:35/**@brief constructor36* @param[in] ac The attribute-carrier to be modified37* @param[in] key The attribute key38* @param[in] value The new value39*/40GNEChange_ToggleAttribute(GNEAttributeCarrier* ac, const SumoXMLAttr key, const bool value);4142/// @brief Destructor43~GNEChange_ToggleAttribute();4445/// @name inherited from GNEChange46/// @{47/// @brief get undo Name48std::string undoName() const;4950/// @brief get Redo name51std::string redoName() const;5253/// @brief undo action54void undo();5556/// @brief redo action57void redo();58/// @}5960private:61/**@brief the net to which all operations shall be applied62* @note we are not responsible for the pointer63*/64GNEAttributeCarrier* myAC;6566/// @brief The attribute name67const SumoXMLAttr myKey;6869/// @brief the original value70const bool myOrigValue;7172/// @brief the new value73const bool myNewValue;74};757677