Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveElementPlanParent.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Class used for elements that can be moved over a edge with two positions
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26#include "GNEMoveElement.h"
27
28// ===========================================================================
29// class declaration
30// ===========================================================================
31
32class GNEEdge;
34
35// ===========================================================================
36// class definitions
37// ===========================================================================
38
40
41public:
47 GNEMoveElementPlanParent(GNEDemandElement* planParent, double& departPos, DepartPosDefinition& departPosProcedure);
48
51
56
59
61 std::string getMovingAttribute(SumoXMLAttr key) const override;
62
64 double getMovingAttributeDouble(SumoXMLAttr key) const override;
65
68
71
73 void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
74
76 bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;
77
79 void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;
80
82
84 void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;
85
86private:
89
91 double& myDepartPos;
92
95
97 void setMoveShape(const GNEMoveResult& moveResult) override;
98
100 void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;
101
104
107};
DepartPosDefinition
Possible ways to choose the departure position.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
GNEMoveOperation * getMoveOperation()
get edge movable move operation for elements with
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
void setMoveShape(const GNEMoveResult &moveResult) override
set move shape
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList) override
commit move shape
GNEDemandElement * myPlanParent
planParent
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList) override
remove geometry point in the clicked position
std::string getMovingAttribute(SumoXMLAttr key) const override
get moving attribute
GNEMoveElementPlanParent & operator=(const GNEMoveElementPlanParent &src)=delete
Invalidated assignment operator.
DepartPosDefinition & myDepartPosProcedure
arrivalPos
GNEMoveElementPlanParent(const GNEMoveElementPlanParent &)=delete
Invalidated copy constructor.
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.