Path: blob/main/src/netedit/elements/moving/GNEMoveElementPlanParent.h
185850 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 GNEMoveElementPlanParent.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 GNEEdge;32class GNEDemandElement;3334// ===========================================================================35// class definitions36// ===========================================================================3738class GNEMoveElementPlanParent : public GNEMoveElement {3940public:41/**@brief Constructor42* @param[in] planParent moved planParent43* @param[in] departPos Start position value44* @param[in] departPosProcedure depart pos definition45*/46GNEMoveElementPlanParent(GNEDemandElement* planParent, double& departPos, DepartPosDefinition& departPosProcedure);4748/// @brief Destructor49~GNEMoveElementPlanParent();5051/**@brief get edge movable move operation for elements with52* @note returned GNEMoveOperation can be nullptr53*/54GNEMoveOperation* getMoveOperation() override;5556/// @name functions related with moving attributes57/// @{5859/// @brief get moving attribute60std::string getMovingAttribute(SumoXMLAttr key) const override;6162/// @brief get moving attribute double63double getMovingAttributeDouble(SumoXMLAttr key) const override;6465/// @brief get moving attribute position66Position getMovingAttributePosition(SumoXMLAttr key) const override;6768/// @brief get moving attribute positionVector69PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override;7071/// @brief set moving attribute (using undo-list)72void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;7374/// @brief check if the given moving attribute is valid75bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;7677/// @brief set moving attribute78void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;7980/// @}8182/// @brief remove geometry point in the clicked position83void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;8485private:86/// @brief planParent87GNEDemandElement* myPlanParent = nullptr;8889/// @brief departPos90double& myDepartPos;9192/// @brief arrivalPos93DepartPosDefinition& myDepartPosProcedure;9495/// @brief set move shape96void setMoveShape(const GNEMoveResult& moveResult) override;9798/// @brief commit move shape99void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;100101/// @brief Invalidated copy constructor.102GNEMoveElementPlanParent(const GNEMoveElementPlanParent&) = delete;103104/// @brief Invalidated assignment operator105GNEMoveElementPlanParent& operator=(const GNEMoveElementPlanParent& src) = delete;106};107108109