SUMO - Simulation of Urban MObility
GNEChange_TLS Class Reference

#include <GNEChange_TLS.h>

Inheritance diagram for GNEChange_TLS:
Inheritance graph
Collaboration diagram for GNEChange_TLS:
Collaboration graph

Public Member Functions

 GNEChange_TLS (GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="")
 Constructor for creating/deleting an edge. More...
 
virtual FXuint size () const
 return actual size More...
 
 ~GNEChange_TLS ()
 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

bool myForceInsert
 check if forceInsert is enabled More...
 
GNEJunctionmyJunction
 we need the junction because it is the target of our change commands More...
 
NBTrafficLightDefinitionmyTlDef
 the traffic light to be created/deleted. We assume no responsiblity for the pointer More...
 

Detailed Description

A network change in which a traffic light is created or deleted

Definition at line 49 of file GNEChange_TLS.h.

Constructor & Destructor Documentation

◆ GNEChange_TLS()

GNEChange_TLS::GNEChange_TLS ( GNEJunction junction,
NBTrafficLightDefinition tlDef,
bool  forward,
bool  forceInsert = false,
const std::string  tlID = "" 
)

Constructor for creating/deleting an edge.

constructor for creating an edge

Parameters
[in]junctionThe junction to which the traffic light belong
[in]tlDefThe traffic light definition (may be 0 on creation)
[in]forwardWhether to create/delete (true/false)
[in]tlIDThe id for the newly created tlDef (set to junction id if * "" is given)

Definition at line 52 of file GNEChange_TLS.cpp.

◆ ~GNEChange_TLS()

Member Function Documentation

◆ redo()

◆ redoName()

FXString GNEChange_TLS::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 132 of file GNEChange_TLS.cpp.

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

◆ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 52 of file GNEChange.cpp.

◆ undo()

◆ undoName()

FXString GNEChange_TLS::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 122 of file GNEChange_TLS.cpp.

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

Field Documentation

◆ myForceInsert

bool GNEChange_TLS::myForceInsert
private

check if forceInsert is enabled

Definition at line 92 of file GNEChange_TLS.h.

Referenced by redo(), and undo().

◆ myForward

◆ myJunction

GNEJunction* GNEChange_TLS::myJunction
private

we need the junction because it is the target of our change commands

Note
we assume shared responsiblity for the junction via reference counting

Definition at line 84 of file GNEChange_TLS.h.

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

◆ myNet

◆ myTlDef

NBTrafficLightDefinition* GNEChange_TLS::myTlDef
private

the traffic light to be created/deleted. We assume no responsiblity for the pointer

Note
since it is hard to track by which NBnodes a tlDef is used (may be more than one).

Definition at line 89 of file GNEChange_TLS.h.

Referenced by redo(), and undo().


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