SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
 
NBTrafficLightDefinitionmyTlDef
 

Detailed Description

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

Definition at line 50 of file GNEChange_TLS.h.

Constructor & Destructor Documentation

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

Constructor for creating/deleting 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 53 of file GNEChange_TLS.cpp.

References StringBijection< T >::get(), OptionsCont::getOptions(), and SUMOXMLDefinitions::TrafficLightTypes.

GNEChange_TLS::~GNEChange_TLS ( )

Destructor.

Definition at line 69 of file GNEChange_TLS.cpp.

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

Member Function Documentation

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

get Redo name

Reimplemented from GNEChange.

Definition at line 105 of file GNEChange_TLS.cpp.

References GNEChange::myForward.

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 57 of file GNEChange.cpp.

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

return undoName

Reimplemented from GNEChange.

Definition at line 96 of file GNEChange_TLS.cpp.

References GNEChange::myForward.

Field Documentation

bool GNEChange_TLS::myForceInsert
private

check if forceInsert is enabled

Definition at line 91 of file GNEChange_TLS.h.

Referenced by redo(), and undo().

GNEJunction* GNEChange_TLS::myJunction
private

Definition at line 84 of file GNEChange_TLS.h.

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

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 82 of file GNEChange.h.

Referenced by GNEChange_Selection::redo(), GNEChange_Additional::redo(), GNEChange_Junction::redo(), GNEChange_Lane::redo(), GNEChange_Edge::redo(), GNEChange_Selection::undo(), GNEChange_Junction::undo(), GNEChange_Additional::undo(), GNEChange_Lane::undo(), and GNEChange_Edge::undo().

NBTrafficLightDefinition* GNEChange_TLS::myTlDef
private

Definition at line 88 of file GNEChange_TLS.h.

Referenced by redo(), and undo().


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