Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveOperation Class Reference

#include <GNEMoveOperation.h>

Collaboration diagram for GNEMoveOperation:
[legend]

Public Types

enum class  OperationType {
  POSITION , ENTIRE_SHAPE , GEOMETRY_POINTS , WIDTH ,
  HEIGHT , LENGTH , LANE
}

Public Member Functions

 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *firstLane, const double firstStartPos, const GNELane *lastLane, const double lastStartPos, const bool clickedFirstLane, const bool allowChangeLane)
 constructor for elements placed over two lanes with two positions (E2 Multilane, vehicles..)
 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *lane, const double firstPosition, const bool allowChangeLane)
 constructor for elements placed over lanes with one position (detectors, vehicles...)
 GNEMoveOperation (GNEMoveElement *moveElement, const GNELane *lane, const double firstPosition, const double lastPosition, const bool allowChangeLane)
 constructor for elements placed over same lanes with two positions (StoppingPlaces)
 GNEMoveOperation (GNEMoveElement *moveElement, const Position originalPosition)
 constructor for values with a single position (junctions, E3, ParkingSpaces...)
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape)
 constructor for entire geometries (Polygon with blocked shapes)
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape, const bool firstGeometryPoint, const OperationType operationType)
 constructor for entire geometries (Polygon with blocked shapes)
 GNEMoveOperation (GNEMoveElement *moveElement, const PositionVector originalShape, const std::vector< int > originalgeometryPoints, const PositionVector shapeToMove, const std::vector< int > geometryPointsToMove)
 constructor for elements with editable shapes (edges, polygons...)
 ~GNEMoveOperation ()
 destructor

Data Fields

const bool allowChangeLane = false
 allow change lane
const bool clickedFirstLane = false
 @check if clicked the first lane or the last lane (used only in multilane elements like E2)
const bool firstGeometryPoint = false
 first position (used for edit with/height
const GNELanefirstLane = nullptr
 original first lane
const double firstPosition = INVALID_DOUBLE
 original first Position
const std::vector< int > geometryPointsToMove
 shape points to move (of shapeToMove)
const GNELanelastLane = nullptr
 original last lane
const double lastPosition = INVALID_DOUBLE
 original last Position
GNEMoveElementmoveElement
 move element
const OperationType operationType
 operation type
const std::vector< int > originalGeometryPoints
 original shape points to move (of original shape)
const PositionVector originalShape
 original shape
const PositionVector shapeToMove
 shape to move

Private Member Functions

 GNEMoveOperation (const GNEMoveOperation &)=delete
 Invalidated copy constructor.
GNEMoveOperationoperator= (const GNEMoveOperation &)=delete
 Invalidated assignment operator.

Detailed Description

Definition at line 37 of file GNEMoveOperation.h.

Member Enumeration Documentation

◆ OperationType

Enumerator
POSITION 
ENTIRE_SHAPE 
GEOMETRY_POINTS 
WIDTH 
HEIGHT 
LENGTH 
LANE 

Definition at line 40 of file GNEMoveOperation.h.

Constructor & Destructor Documentation

◆ GNEMoveOperation() [1/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const Position originalPosition )

constructor for values with a single position (junctions, E3, ParkingSpaces...)

Definition at line 30 of file GNEMoveOperation.cpp.

References moveElement, and originalShape.

Referenced by GNEMoveOperation(), and operator=().

Here is the caller graph for this function:

◆ GNEMoveOperation() [2/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const PositionVector originalShape )

constructor for entire geometries (Polygon with blocked shapes)

Definition at line 39 of file GNEMoveOperation.cpp.

References moveElement, operationType, originalShape, and shapeToMove.

◆ GNEMoveOperation() [3/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const PositionVector originalShape,
const bool firstGeometryPoint,
const OperationType operationType )

constructor for entire geometries (Polygon with blocked shapes)

Definition at line 48 of file GNEMoveOperation.cpp.

References firstGeometryPoint, moveElement, operationType, originalShape, and shapeToMove.

◆ GNEMoveOperation() [4/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const PositionVector originalShape,
const std::vector< int > originalgeometryPoints,
const PositionVector shapeToMove,
const std::vector< int > geometryPointsToMove )

constructor for elements with editable shapes (edges, polygons...)

Definition at line 60 of file GNEMoveOperation.cpp.

References geometryPointsToMove, moveElement, operationType, originalGeometryPoints, originalShape, and shapeToMove.

◆ GNEMoveOperation() [5/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const GNELane * lane,
const double firstPosition,
const bool allowChangeLane )

constructor for elements placed over lanes with one position (detectors, vehicles...)

Definition at line 74 of file GNEMoveOperation.cpp.

References allowChangeLane, firstLane, firstPosition, moveElement, and operationType.

◆ GNEMoveOperation() [6/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const GNELane * lane,
const double firstPosition,
const double lastPosition,
const bool allowChangeLane )

constructor for elements placed over same lanes with two positions (StoppingPlaces)

Definition at line 86 of file GNEMoveOperation.cpp.

References allowChangeLane, firstLane, firstPosition, INVALID_DOUBLE, lastPosition, moveElement, and operationType.

◆ GNEMoveOperation() [7/8]

GNEMoveOperation::GNEMoveOperation ( GNEMoveElement * moveElement,
const GNELane * firstLane,
const double firstStartPos,
const GNELane * lastLane,
const double lastStartPos,
const bool clickedFirstLane,
const bool allowChangeLane )

constructor for elements placed over two lanes with two positions (E2 Multilane, vehicles..)

Definition at line 100 of file GNEMoveOperation.cpp.

References allowChangeLane, clickedFirstLane, firstLane, firstPosition, INVALID_DOUBLE, lastLane, lastPosition, moveElement, and operationType.

◆ ~GNEMoveOperation()

GNEMoveOperation::~GNEMoveOperation ( )

destructor

Definition at line 118 of file GNEMoveOperation.cpp.

◆ GNEMoveOperation() [8/8]

GNEMoveOperation::GNEMoveOperation ( const GNEMoveOperation & )
privatedelete

Invalidated copy constructor.

References GNEMoveOperation().

Member Function Documentation

◆ operator=()

GNEMoveOperation & GNEMoveOperation::operator= ( const GNEMoveOperation & )
privatedelete

Invalidated assignment operator.

References GNEMoveOperation().

Field Documentation

◆ allowChangeLane

const bool GNEMoveOperation::allowChangeLane = false

◆ clickedFirstLane

const bool GNEMoveOperation::clickedFirstLane = false

@check if clicked the first lane or the last lane (used only in multilane elements like E2)

Definition at line 118 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::commitMove(), GNEMoveOperation(), and GNEMoveElement::moveElement().

◆ firstGeometryPoint

const bool GNEMoveOperation::firstGeometryPoint = false

first position (used for edit with/height

Definition at line 132 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::calculateExtrapolatedVector(), and GNEMoveOperation().

◆ firstLane

const GNELane* GNEMoveOperation::firstLane = nullptr

◆ firstPosition

const double GNEMoveOperation::firstPosition = INVALID_DOUBLE

◆ geometryPointsToMove

const std::vector<int> GNEMoveOperation::geometryPointsToMove

shape points to move (of shapeToMove)

Definition at line 126 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::commitMove(), GNEMoveOperation(), and GNEMoveElement::moveElement().

◆ lastLane

const GNELane* GNEMoveOperation::lastLane = nullptr

original last lane

Definition at line 112 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::commitMove(), GNEMoveOperation(), and GNEMoveElement::moveElement().

◆ lastPosition

const double GNEMoveOperation::lastPosition = INVALID_DOUBLE

◆ moveElement

◆ operationType

◆ originalGeometryPoints

const std::vector<int> GNEMoveOperation::originalGeometryPoints

original shape points to move (of original shape)

Definition at line 103 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::commitMove(), and GNEMoveOperation().

◆ originalShape

◆ shapeToMove

const PositionVector GNEMoveOperation::shapeToMove

shape to move

Note
: it can be different of originalShape, for example due a new geometry point

Definition at line 123 of file GNEMoveOperation.h.

Referenced by GNEMoveElement::calculateExtrapolatedVector(), GNEMoveElement::commitMove(), GNEMoveOperation(), GNEMoveOperation(), GNEMoveOperation(), and GNEMoveElement::moveElement().


The documentation for this class was generated from the following files: