SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
GNEChange_TLS.h
Go to the documentation of this file.
1
/****************************************************************************/
7
// A network change in which a traffic light is created or deleted
8
/****************************************************************************/
9
// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10
// Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
11
/****************************************************************************/
12
//
13
// This file is part of SUMO.
14
// SUMO is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU General Public License as published by
16
// the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
/****************************************************************************/
20
#ifndef GNEChange_TLS_h
21
#define GNEChange_TLS_h
22
23
24
// ===========================================================================
25
// included modules
26
// ===========================================================================
27
#ifdef _MSC_VER
28
#include <
windows_config.h
>
29
#else
30
#include <
config.h
>
31
#endif
32
33
#include <fx.h>
34
#include <
utils/foxtools/fxexdefs.h
>
35
#include "
GNEChange.h
"
36
37
// ===========================================================================
38
// class declarations
39
// ===========================================================================
40
class
NBTrafficLightDefinition
;
41
class
GNEJunction
;
42
43
// ===========================================================================
44
// class definitions
45
// ===========================================================================
50
class
GNEChange_TLS
:
public
GNEChange
{
51
FXDECLARE_ABSTRACT(
GNEChange_TLS
)
52
53
public
:
60
GNEChange_TLS
(
GNEJunction
* junction,
NBTrafficLightDefinition
* tlDef,
bool
forward,
bool
forceInsert =
false
,
const
std::string tlID =
""
);
61
63
~GNEChange_TLS
();
64
68
FXString
undoName
()
const
;
69
71
FXString
redoName
()
const
;
72
74
void
undo
();
75
77
void
redo
();
79
80
81
private
:
82
/* we need the junction because it is the target of our change commands
83
* we assume shared responsiblity for the junction via reference counting */
84
GNEJunction
*
myJunction
;
85
86
/* the traffic light to be created/deleted. We assume no responsiblity for the pointer
87
* since it is hard to track by which NBnodes a tlDef is used (may be more than one). */
88
NBTrafficLightDefinition
*
myTlDef
;
89
91
bool
myForceInsert
;
92
};
93
94
#endif
95
/****************************************************************************/
GNEChange_TLS::myJunction
GNEJunction * myJunction
Definition:
GNEChange_TLS.h:84
GNEChange
the function-object for an editing operation (abstract base)
Definition:
GNEChange.h:49
GNEChange_TLS::redo
void redo()
redo action
Definition:
GNEChange_TLS.cpp:87
windows_config.h
fxexdefs.h
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition:
NBTrafficLightDefinition.h:75
GNEChange_TLS::myForceInsert
bool myForceInsert
check if forceInsert is enabled
Definition:
GNEChange_TLS.h:91
GNEChange_TLS::myTlDef
NBTrafficLightDefinition * myTlDef
Definition:
GNEChange_TLS.h:88
config.h
GNEChange_TLS::~GNEChange_TLS
~GNEChange_TLS()
Destructor.
Definition:
GNEChange_TLS.cpp:69
GNEChange_TLS::undo
void undo()
undo action
Definition:
GNEChange_TLS.cpp:78
GNEChange.h
GNEChange_TLS::redoName
FXString redoName() const
get Redo name
Definition:
GNEChange_TLS.cpp:105
GNEChange_TLS::undoName
FXString undoName() const
return undoName
Definition:
GNEChange_TLS.cpp:96
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.
Definition:
GNEChange_TLS.cpp:53
GNEJunction
Definition:
GNEJunction.h:54
GNEChange_TLS
Definition:
GNEChange_TLS.h:50
src
netedit
GNEChange_TLS.h
Generated on Fri Aug 12 2016 18:34:54 for SUMO - Simulation of Urban MObility by
1.8.11