SUMO - Simulation of Urban MObility
GNEChange_Lane Class Reference

#include <GNEChange_Lane.h>

Inheritance diagram for GNEChange_Lane:
Inheritance graph
Collaboration diagram for GNEChange_Lane:
Collaboration graph

Public Member Functions

 GNEChange_Lane (GNEEdge *edge, GNELane *lane, const NBEdge::Lane &laneAttrs, bool forward)
 Constructor for creating/deleting an edge. More...
 
void redo ()
 
FXString redoName () const
 
virtual FXuint size () const
 
void undo ()
 
FXString undoName () const
 
 ~GNEChange_Lane ()
 Destructor. More...
 

Protected Attributes

bool myForward
 we group antagonistic commands (create junction/delete junction) and keep them apart by this flag More...
 
GNENetmyNet
 the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer) More...
 

Private Attributes

GNEEdgemyEdge
 full information regarding the lane that is to be created/deleted we assume shared responsibility for the pointers (via reference counting) More...
 
GNELanemyLane
 
const NBEdge::Lane myLaneAttrs
 

Detailed Description

A network change in which a single lane is created or deleted

Definition at line 50 of file GNEChange_Lane.h.

Constructor & Destructor Documentation

GNEChange_Lane::GNEChange_Lane ( GNEEdge edge,
GNELane lane,
const NBEdge::Lane laneAttrs,
bool  forward 
)

Constructor for creating/deleting an edge.

Parameters
[in]edgeThe edge on which to apply changes
[in]laneThe lane to be deleted or 0 if a lane should be created
[in]laneAttrsThe attributes of the lane to be created/deleted
[in]forwardWhether to create/delete (true/false)

Definition at line 51 of file GNEChange_Lane.cpp.

GNEChange_Lane::~GNEChange_Lane ( )

Destructor.

Definition at line 66 of file GNEChange_Lane.cpp.

References GNEReferenceCounter::decRef(), myEdge, myLane, and GNEReferenceCounter::unreferenced().

Member Function Documentation

void GNEChange_Lane::redo ( )
virtual

Reimplemented from GNEChange.

Definition at line 90 of file GNEChange_Lane.cpp.

References GNEEdge::addLane(), myEdge, GNEChange::myForward, myLane, myLaneAttrs, and GNEEdge::removeLane().

FXString GNEChange_Lane::redoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 108 of file GNEChange_Lane.cpp.

References GNEChange::myForward.

virtual FXuint GNEChange::size ( ) const
inlinevirtualinherited

Definition at line 62 of file GNEChange.h.

void GNEChange_Lane::undo ( )
virtual

Reimplemented from GNEChange.

Definition at line 81 of file GNEChange_Lane.cpp.

References GNEEdge::addLane(), myEdge, GNEChange::myForward, myLane, myLaneAttrs, and GNEEdge::removeLane().

FXString GNEChange_Lane::undoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 99 of file GNEChange_Lane.cpp.

References GNEChange::myForward.

Field Documentation

GNEEdge* GNEChange_Lane::myEdge
private

full information regarding the lane that is to be created/deleted we assume shared responsibility for the pointers (via reference counting)

Definition at line 77 of file GNEChange_Lane.h.

Referenced by redo(), undo(), and ~GNEChange_Lane().

GNELane* GNEChange_Lane::myLane
private

Definition at line 81 of file GNEChange_Lane.h.

Referenced by redo(), undo(), and ~GNEChange_Lane().

const NBEdge::Lane GNEChange_Lane::myLaneAttrs
private

Definition at line 85 of file GNEChange_Lane.h.

Referenced by redo(), and undo().

GNENet* GNEChange::myNet
protectedinherited

the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer)

Definition at line 73 of file GNEChange.h.

Referenced by GNEChange_Edge::redo(), GNEChange_Junction::redo(), GNEChange::redo(), GNEChange_Junction::undo(), and GNEChange_Edge::undo().


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