Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveElementVehicle.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
24
25#include "GNEMoveElement.h"
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
31class GNEEdge;
32class GNEVehicle;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
37
39
40public:
48 GNEMoveElementVehicle(GNEVehicle* vehicle, GNEEdge* fromEdge, double& departPos,
49 GNEEdge* toEdge, double& arrivalPos);
50
53
58
61
63 std::string getMovingAttribute(SumoXMLAttr key) const override;
64
66 double getMovingAttributeDouble(SumoXMLAttr key) const override;
67
70
73
75 void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
76
78 bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;
79
81 void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;
82
84
86 void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;
87
89 static const double arrivalPositionDiameter;
90
91private:
94
96 double& myDepartPos;
97
99 double& myArrivalPos;
100
102 void setMoveShape(const GNEMoveResult& moveResult) override;
103
105 void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;
106
109
112};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEMoveOperation * getMoveOperation()
get edge movable move operation for elements with
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList) override
commit move shape
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
double & myDepartPos
departPos
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
std::string getMovingAttribute(SumoXMLAttr key) const override
get moving attribute
GNEMoveElementVehicle(const GNEMoveElementVehicle &)=delete
Invalidated copy constructor.
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList) override
remove geometry point in the clicked position
GNEVehicle * myVehicle
vehicle
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
void setMoveShape(const GNEMoveResult &moveResult) override
set move shape
GNEMoveElementVehicle & operator=(const GNEMoveElementVehicle &src)=delete
Invalidated assignment operator.
double & myArrivalPos
arrivalPos
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
static const double arrivalPositionDiameter
vehicle arrival position radius
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.