Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveElementLaneDouble.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 lane with two positions
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25#include "GNEMoveElement.h"
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
38
39public:
49 double& startPosValue, SumoXMLAttr endPosAttr,
50 double& endPosValue, bool& friendlyPosition);
51
54
59
62
64 std::string getMovingAttribute(SumoXMLAttr key) const override;
65
67 double getMovingAttributeDouble(SumoXMLAttr key) const override;
68
71
74
76 void setMovingAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
77
79 bool isMovingAttributeValid(SumoXMLAttr key, const std::string& value) const override;
80
82 void setMovingAttribute(SumoXMLAttr key, const std::string& value) override;
83
85
87 void removeGeometryPoint(const Position clickedPosition, GNEUndoList* undoList) override;
88
90 bool isMoveElementValid() const;
91
93 std::string getMovingProblem() const;
94
96 void fixMovingProblem();
97
99 void writeMoveAttributes(OutputDevice& device, const bool writeLength) const;
100
102 double getStartFixedPositionOverLane(const bool adjustGeometryFactor) const;
103
105 double getEndFixedPositionOverLane(const bool adjustGeometryFactor) const;
106
108 static const double defaultSize;
109
110private:
113
116
119
122
125
127 void setMoveShape(const GNEMoveResult& moveResult) override;
128
130 void commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) override;
131
133 void setSize(const std::string& value, GNEUndoList* undoList);
134
137
140};
ReferencePosition
Reference position.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getMovingAttribute(SumoXMLAttr key) const override
get moving attribute
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList) override
remove geometry point in the clicked position
void fixMovingProblem()
fix moving problem
Position getMovingAttributePosition(SumoXMLAttr key) const override
get moving attribute position
double getEndFixedPositionOverLane(const bool adjustGeometryFactor) const
get end offset position over lane
void setSize(const std::string &value, GNEUndoList *undoList)
set size
void setMoveShape(const GNEMoveResult &moveResult) override
set move shape
double getMovingAttributeDouble(SumoXMLAttr key) const override
get moving attribute double
GNEMoveOperation * getMoveOperation()
get lane movable move operation for elements with
GNEMoveElementLaneDouble(const GNEMoveElementLaneDouble &)=delete
Invalidated copy constructor.
GNEMoveElementLaneSingle * myEndPos
end position
GNEMoveElementLaneDouble & operator=(const GNEMoveElementLaneDouble &src)=delete
Invalidated assignment operator.
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList) override
commit move shape
std::string getMovingProblem() const
return a string with the current moving problem
bool isMovingAttributeValid(SumoXMLAttr key, const std::string &value) const override
check if the given moving attribute is valid
PositionVector getMovingAttributePositionVector(SumoXMLAttr key) const override
get moving attribute positionVector
ReferencePosition myReferencePosition
reference position
bool isMoveElementValid() const
check if current moving element is valid to be written into XML
double getStartFixedPositionOverLane(const bool adjustGeometryFactor) const
get start offset position over lane
double myTemplateSize
size (only use in AttributeCarrier templates)
void writeMoveAttributes(OutputDevice &device, const bool writeLength) const
write move attributes
bool myTemplateForceSize
force size (only used in AttributeCarrier templates
static const double defaultSize
default element size
GNEMoveElementLaneSingle * myStartPos
start position
void setMovingAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
set moving attribute (using undo-list)
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.