/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2006-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 GNEChangeGroup.h14/// @author Pablo Alvarez Lopez15/// @date Sep 202116///17//18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEChange.h"2324/**25* Group of undoable commands. A group may comprise multiple26* individual actions which together undo (or redo) a larger27* operation. Even larger operations may be built by nesting28* multiple undo groups.29*/30class GNEChangeGroup : public GNEChange {31FXDECLARE(GNEChangeGroup)3233public:34/// @name declare friend class35friend class GNEUndoList;3637/// @brief Construct initially empty undo command group38GNEChangeGroup(Supermode groupSupermode, GUIIcon icon, const std::string& description);3940/// @brief Delete undo command and sub-commands41~GNEChangeGroup();4243/// @brief Undo whole command group44void undo();4546/// @brief Redo whole command group47void redo();4849/// @brief get undo Name50std::string undoName() const;5152/// @brief get redo name53std::string redoName() const;5455/// @brief Return the size of the command group56int size() const;5758/// @brief get description59const std::string& getDescription();6061/// @brief get timeStamp62const std::string& getTimeStamp();6364/// @brief get supermode associated with this ChangeGroup65Supermode getGroupSupermode() const;6667/// @brief get icon associated with this ChangeGroup68GUIIcon getGroupIcon() const;6970/// @brief Return TRUE if empty71bool empty() const;7273protected:74/// @brief FOX need this75GNEChangeGroup();7677/// @brief description of command78const std::string myDescription;7980/// @brief supermode associated with this ChangeGroup81const Supermode myGroupSupermode;8283/// @brief icon associated with this ChangeGroup84const GUIIcon myIcon;8586private:87/// @brief undo list command (can be access by GNEUndoList)88GNEChange* undoList;8990/// @brief redo list command (can be access by GNEUndoList)91GNEChange* redoList;9293/// @brief group (can be access by GNEUndoList)94GNEChangeGroup* group;9596/// @brief timeStamp HH:MM:SS97std::string myTimeStamp;9899/// @brief invalidate copy constructor100GNEChangeGroup(const GNEChangeGroup&);101102/// @brief invalidate assignment operator103GNEChangeGroup& operator=(const GNEChangeGroup&) = delete;104};105106107