Path: blob/main/src/netedit/elements/moving/GNEMoveElementVehicle.h
185836 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 GNEMoveElementVehicle.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>2324#include "GNEMoveElement.h"2526// ===========================================================================27// class declaration28// ===========================================================================2930class GNEEdge;31class GNEVehicle;3233// ===========================================================================34// class definitions35// ===========================================================================3637class GNEMoveElementVehicle : public GNEMoveElement {3839public:40/**@brief Constructor41* @param[in] vehicle moved vehicle42* @param[in] fromEdge Edge of this element belongs43* @param[in] toEdge Edge of this element belongs44*/45GNEMoveElementVehicle(GNEVehicle* vehicle, GNEEdge* fromEdge, GNEEdge* toEdge);4647/// @brief Destructor48~GNEMoveElementVehicle();4950/**@brief get edge movable move operation for elements with51* @note returned GNEMoveOperation can be nullptr52*/53GNEMoveOperation* getMoveOperation() override;5455/// @name functions related with moving attributes56/// @{5758/// @brief get moving attribute59std::string getMovingAttribute(SumoXMLAttr key) const override;6061/// @brief get moving attribute double62double getMovingAttributeDouble(SumoXMLAttr key) const override;6364/// @brief get moving attribute position65Position getMovingAttributePosition(SumoXMLAttr key) const override;6667/// @brief get moving attribute positionVector68PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;6970/// @brief set moving attribute (using undo-list)71void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;7273/// @brief check if the given moving attribute is valid74bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;7576/// @brief set moving attribute77void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;7879/// @}8081/// @brief remove geometry point in the clicked position82void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;8384/// @brief vehicle arrival position radius85static const double arrivalPositionDiameter;8687private:88/// @brief vehicle89GNEVehicle* myVehicle = nullptr;9091/// @brief set move shape92void setMoveShape(const GNEMoveResult& moveResult) override;9394/// @brief commit move shape95void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;9697/// @brief Invalidated copy constructor.98GNEMoveElementVehicle(const GNEMoveElementVehicle&) = delete;99100/// @brief Invalidated assignment operator101GNEMoveElementVehicle& operator=(const GNEMoveElementVehicle& src) = delete;102};103104105