Path: blob/main/src/netedit/elements/moving/GNEMoveElementCrossing.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 GNEMoveElementCrossing.h14/// @author Pablo Alvarez Lopez15/// @date Oct 202516///17// Class used for moving crossing shapes18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNEMoveElement.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class GNECrossing;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEMoveElementCrossing : public GNEMoveElement {3536public:37/// @brief constructor38GNEMoveElementCrossing(GNECrossing* crossing);3940//// @brief empty destructor41~GNEMoveElementCrossing();4243/// @name functions related with moving attributes44/// @{4546/// @brief get moving attribute47std::string getMovingAttribute(SumoXMLAttr key) const override;4849/// @brief get moving attribute double50double getMovingAttributeDouble(SumoXMLAttr key) const override;5152/// @brief get moving attribute position53Position getMovingAttributePosition(SumoXMLAttr key) const override;5455/// @brief get moving attribute positionVector56PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;5758/// @brief set moving attribute (using undo-list)59void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;6061/// @brief check if the given moving attribute is valid62bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;6364/// @brief set moving attribute65void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;6667/// @}6869/**@brief get move operation70* @note returned GNEMoveOperation can be nullptr71*/72GNEMoveOperation* getMoveOperation() override;7374/// @brief remove geometry point in the clicked position75void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;7677protected:78/// @brief pointer to crossing79GNECrossing* myCrossing = 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 constructor89GNEMoveElementCrossing() = delete;9091/// @brief Invalidated copy constructor.92GNEMoveElementCrossing(const GNEMoveElementCrossing&) = delete;9394/// @brief Invalidated assignment operator.95GNEMoveElementCrossing& operator=(const GNEMoveElementCrossing&) = delete;96};979899