SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
StdDefs.cpp
Go to the documentation of this file.
1
/****************************************************************************/
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2014-2014 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
22
23
// ===========================================================================
24
// included modules
25
// ===========================================================================
26
#include "
RGBColor.h
"
27
#include "
StdDefs.h
"
28
29
30
#ifdef CHECK_MEMORY_LEAKS
31
#include <
foreign/nvwa/debug_new.h
>
32
#endif // CHECK_MEMORY_LEAKS
33
34
/* -------------------------------------------------------------------------
35
* color constants for link states
36
* ----------------------------------------------------------------------- */
37
const
RGBColor
SUMO_color_TL_GREEN_MAJOR
(0, 255, 0);
38
const
RGBColor
SUMO_color_TL_GREEN_MINOR
(0, 179, 0);
39
const
RGBColor
SUMO_color_TL_RED
(255, 0, 0);
40
const
RGBColor
SUMO_color_TL_YELLOW_MAJOR
(255, 255, 0);
41
const
RGBColor
SUMO_color_TL_YELLOW_MINOR
(255, 255, 0);
42
const
RGBColor
SUMO_color_TL_OFF_BLINKING
(255, 140, 0);
43
const
RGBColor
SUMO_color_TL_OFF_NOSIGNAL
(0, 255, 255);
44
const
RGBColor
SUMO_color_MAJOR
(255, 255, 255);
45
const
RGBColor
SUMO_color_MINOR
(51, 51, 51);
46
const
RGBColor
SUMO_color_EQUAL
(128, 128, 128);
47
const
RGBColor
SUMO_color_STOP
(102, 51, 51);
48
const
RGBColor
SUMO_color_ALLWAY_STOP
(51, 51, 102);
49
const
RGBColor
SUMO_color_DEADEND
(0, 0, 0);
50
51
const
RGBColor
&
getLinkColor
(
const
LinkState
& ls) {
52
switch
(ls) {
53
case
LINKSTATE_TL_GREEN_MAJOR
:
54
return
SUMO_color_TL_GREEN_MAJOR
;
55
case
LINKSTATE_TL_GREEN_MINOR
:
56
return
SUMO_color_TL_GREEN_MINOR
;
57
case
LINKSTATE_TL_RED
:
58
return
SUMO_color_TL_RED
;
59
case
LINKSTATE_TL_YELLOW_MAJOR
:
60
return
SUMO_color_TL_YELLOW_MAJOR
;
61
case
LINKSTATE_TL_YELLOW_MINOR
:
62
return
SUMO_color_TL_YELLOW_MINOR
;
63
case
LINKSTATE_TL_OFF_BLINKING
:
64
return
SUMO_color_TL_OFF_BLINKING
;
65
case
LINKSTATE_TL_OFF_NOSIGNAL
:
66
return
SUMO_color_TL_OFF_NOSIGNAL
;
67
case
LINKSTATE_MAJOR
:
68
return
SUMO_color_MAJOR
;
69
case
LINKSTATE_MINOR
:
70
return
SUMO_color_MINOR
;
71
case
LINKSTATE_EQUAL
:
72
return
SUMO_color_EQUAL
;
73
case
LINKSTATE_STOP
:
74
return
SUMO_color_STOP
;
75
case
LINKSTATE_ALLWAY_STOP
:
76
return
SUMO_color_ALLWAY_STOP
;
77
case
LINKSTATE_DEADEND
:
78
return
SUMO_color_DEADEND
;
79
default
:
80
throw
ProcessError
(
"No color defined for LinkState '"
+ std::string(ls, 1) +
"'"
);
81
}
82
}
83
84
bool
gDebugFlag1
=
false
;
85
bool
gDebugFlag2
=
false
;
86
87
/****************************************************************************/
88
tmp
buildd
sumo-0.21.0+dfsg
src
utils
common
StdDefs.cpp
Generated on Thu Nov 20 2014 19:49:59 for SUMO - Simulation of Urban MObility by
1.8.1.2