SUMO - Simulation of Urban MObility
GNEChange_Connection Class Reference

#include <GNEChange_Connection.h>

Inheritance diagram for GNEChange_Connection:
Inheritance graph
Collaboration diagram for GNEChange_Connection:
Collaboration graph

Public Member Functions

 GNEChange_Connection (GNEEdge *edge, NBEdge::Connection nbCon, bool forward)
 Constructor for creating/deleting a connection. More...
 
virtual FXuint size () const
 return actual size More...
 
 ~GNEChange_Connection ()
 Destructor. More...
 
inherited from GNEChange

get undo Name

FXString undoName () const
 return undoName More...
 
FXString redoName () const
 get Redo name More...
 
void undo ()
 undo action More...
 
void redo ()
 redo action 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
 
NBEdge::Connection myNBEdgeConnection
 the data which must be copied because the original reference does not persist More...
 
GNEConnectionmyConnection
 We only keep this to retain the GUIGlID. More...
 

Detailed Description

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

Definition at line 52 of file GNEChange_Connection.h.

Constructor & Destructor Documentation

◆ GNEChange_Connection()

GNEChange_Connection::GNEChange_Connection ( GNEEdge edge,
NBEdge::Connection  nbCon,
bool  forward 
)

Constructor for creating/deleting a connection.

Parameters
[in]edgeThe source edge of the connection
[in]nbConThe data of the connection
[in]forwardWhether to create/delete (true/false)

Definition at line 50 of file GNEChange_Connection.cpp.

◆ ~GNEChange_Connection()

GNEChange_Connection::~GNEChange_Connection ( )

Destructor.

Definition at line 59 of file GNEChange_Connection.cpp.

References myEdge.

Member Function Documentation

◆ redo()

◆ redoName()

FXString GNEChange_Connection::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 115 of file GNEChange_Connection.cpp.

References GNEChange::myForward, SUMO_TAG_CONNECTION, and toString().

◆ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 53 of file GNEChange.cpp.

◆ undo()

◆ undoName()

FXString GNEChange_Connection::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 105 of file GNEChange_Connection.cpp.

References GNEChange::myForward, SUMO_TAG_CONNECTION, and toString().

Field Documentation

◆ myConnection

GNEConnection* GNEChange_Connection::myConnection
private

We only keep this to retain the GUIGlID.

Note
we assume shared responsibility for the pointer (via reference counting)

Definition at line 96 of file GNEChange_Connection.h.

Referenced by redo(), and undo().

◆ myEdge

GNEEdge* GNEChange_Connection::myEdge
private

Definition at line 88 of file GNEChange_Connection.h.

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

◆ myForward

◆ myNBEdgeConnection

NBEdge::Connection GNEChange_Connection::myNBEdgeConnection
private

the data which must be copied because the original reference does not persist

Definition at line 91 of file GNEChange_Connection.h.

Referenced by redo(), and undo().

◆ myNet


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