Path: blob/main/src/netedit/elements/moving/GNEMoveElementPlan.h
185790 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 GNEMoveElementPlan.h14/// @author Pablo Alvarez Lopez15/// @date Oct 202516///17// Class used for elements that can be moved over a edge with two positions18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/iodevices/OutputDevice.h>23#include <utils/vehicle/SUMOVehicleParameter.h>2425#include "GNEMoveElement.h"2627// ===========================================================================28// class declaration29// ===========================================================================3031class GNEDemandElement;3233// ===========================================================================34// class definitions35// ===========================================================================3637class GNEMoveElementPlan : public GNEMoveElement {3839public:40/**@brief Constructor41* @param[in] planElement moved planElement42* @param[in] departPos Start position value43*/44GNEMoveElementPlan(GNEDemandElement* planElement, double& departPos);4546/// @brief Destructor47~GNEMoveElementPlan();4849/**@brief get edge movable move operation for elements with50* @note returned GNEMoveOperation can be nullptr51*/52GNEMoveOperation* getMoveOperation() override;5354/// @name functions related with moving attributes55/// @{5657/// @brief get moving attribute58std::string getMovingAttribute(SumoXMLAttr key) const override;5960/// @brief get moving attribute double61double getMovingAttributeDouble(SumoXMLAttr key) const override;6263/// @brief get moving attribute position64Position getMovingAttributePosition(SumoXMLAttr key) const override;6566/// @brief get moving attribute positionVector67PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;6869/// @brief set moving attribute (using undo-list)70void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;7172/// @brief check if the given moving attribute is valid73bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;7475/// @brief set moving attribute76void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;7778/// @}7980/// @brief remove geometry point in the clicked position81void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;8283private:84/// @brief planElement85GNEDemandElement* myPlanElement = nullptr;8687/// @brief departPos88double& myArrivalPosition;8990/// @brief set move shape91void setMoveShape(const GNEMoveResult& moveResult) override;9293/// @brief commit move shape94void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;9596/// @brief Invalidated copy constructor.97GNEMoveElementPlan(const GNEMoveElementPlan&) = delete;9899/// @brief Invalidated assignment operator100GNEMoveElementPlan& operator=(const GNEMoveElementPlan& src) = delete;101};102103104