Path: blob/main/src/netedit/elements/moving/GNEMoveElementConnection.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 GNEMoveElementConnection.h14/// @author Pablo Alvarez Lopez15/// @date Oct 202516///17// Class used for moving connection shapes18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEMoveElement.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class GNEConnection;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEMoveElementConnection : public GNEMoveElement {3536public:37/// @brief constructor38GNEMoveElementConnection(GNEConnection* connection);3940//// @brief empty destructor41~GNEMoveElementConnection();4243/**@brief get move operation44* @note returned GNEMoveOperation can be nullptr45*/46GNEMoveOperation* getMoveOperation() override;4748/// @name functions related with moving attributes49/// @{5051/// @brief get moving attribute52std::string getMovingAttribute(SumoXMLAttr key) const override;5354/// @brief get moving attribute double55double getMovingAttributeDouble(SumoXMLAttr key) const override;5657/// @brief get moving attribute position58Position getMovingAttributePosition(SumoXMLAttr key) const override;5960/// @brief get moving attribute positionVector61PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;6263/// @brief set moving attribute (using undo-list)64void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;6566/// @brief check if the given moving attribute is valid67bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;6869/// @brief set moving attribute70void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;7172/// @}7374/// @brief remove geometry point in the clicked position75void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;7677protected:78/// @brief pointer to connection79GNEConnection* myConnection = nullptr;8081private:82/// @brief set move shape83void setMoveShape(const GNEMoveResult& moveResult) override;8485/// @brief commit move shape86void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;8788/// @brief invalidate default constructor89GNEMoveElementConnection() = delete;9091/// @brief Invalidated copy constructor.92GNEMoveElementConnection(const GNEMoveElementConnection&) = delete;9394/// @brief Invalidated assignment operator.95GNEMoveElementConnection& operator=(const GNEMoveElementConnection&) = delete;96};979899