Path: blob/main/src/netedit/elements/moving/GNEMoveElementJunction.h
185834 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 GNEMoveElementJunction.h14/// @author Pablo Alvarez Lopez15/// @date Oct 202516///17// Class used for moving junctions18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEMoveElement.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class GNEJunction;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEMoveElementJunction : public GNEMoveElement {3536public:37/// @brief constructor38GNEMoveElementJunction(GNEJunction* junction);3940//// @brief empty destructor41~GNEMoveElementJunction();4243/**@brief get move operation44* @note returned GNEMoveOperation can be nullptr45*/46GNEMoveOperation* getMoveOperation() override;4748/// @brief get pointer to junction49GNEJunction* getJunction() const;5051/// @name functions related with moving attributes52/// @{5354/// @brief get moving attribute55std::string getMovingAttribute(SumoXMLAttr key) const override;5657/// @brief get moving attribute double58double getMovingAttributeDouble(SumoXMLAttr key) const override;5960/// @brief get moving attribute position61Position getMovingAttributePosition(SumoXMLAttr key) const override;6263/// @brief get moving attribute positionVector64PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;6566/// @brief set moving attribute (using undo-list)67void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;6869/// @brief check if the given moving attribute is valid70bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;7172/// @brief set moving attribute73void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;7475/// @}7677/// @brief remove geometry point in the clicked position78void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;7980protected:81/// @brief pointer to junction82GNEJunction* myJunction = nullptr;8384private:85/// @brief set move shape86void setMoveShape(const GNEMoveResult& moveResult) override;8788/// @brief commit move shape89void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;9091/// @brief invalidate default constructor92GNEMoveElementJunction() = delete;9394/// @brief Invalidated copy constructor.95GNEMoveElementJunction(const GNEMoveElementJunction&) = delete;9697/// @brief Invalidated assignment operator.98GNEMoveElementJunction& operator=(const GNEMoveElementJunction&) = delete;99};100101102