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, unsigned int fromLane, const std::string &toEdgeID, unsigned int toLane, bool mayDefinitelyPass, bool forward)
 Constructor for creating/deleting an edge. More...
 
void redo ()
 
FXString redoName () const
 
virtual FXuint size () const
 
void undo ()
 
FXString undoName () const
 
 ~GNEChange_Connection ()
 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...
 
unsigned int myFromLane
 
bool myPass
 
const std::string myToEdgeID
 
unsigned int myToLane
 

Detailed Description

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

Definition at line 49 of file GNEChange_Connection.h.

Constructor & Destructor Documentation

GNEChange_Connection::GNEChange_Connection ( GNEEdge edge,
unsigned int  fromLane,
const std::string &  toEdgeID,
unsigned int  toLane,
bool  mayDefinitelyPass,
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 50 of file GNEChange_Connection.cpp.

GNEChange_Connection::~GNEChange_Connection ( )

Destructor.

Definition at line 63 of file GNEChange_Connection.cpp.

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

Member Function Documentation

void GNEChange_Connection::redo ( )
virtual
FXString GNEChange_Connection::redoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 99 of file GNEChange_Connection.cpp.

References GNEChange::myForward.

virtual FXuint GNEChange::size ( ) const
inlinevirtualinherited

Definition at line 62 of file GNEChange.h.

void GNEChange_Connection::undo ( )
virtual
FXString GNEChange_Connection::undoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 90 of file GNEChange_Connection.cpp.

References GNEChange::myForward.

Field Documentation

GNEEdge* GNEChange_Connection::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 78 of file GNEChange_Connection.h.

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

unsigned int GNEChange_Connection::myFromLane
private

Definition at line 81 of file GNEChange_Connection.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().

bool GNEChange_Connection::myPass
private

Definition at line 90 of file GNEChange_Connection.h.

Referenced by redo(), and undo().

const std::string GNEChange_Connection::myToEdgeID
private

Definition at line 84 of file GNEChange_Connection.h.

Referenced by redo(), and undo().

unsigned int GNEChange_Connection::myToLane
private

Definition at line 87 of file GNEChange_Connection.h.

Referenced by redo(), and undo().


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