Eclipse SUMO - Simulation of Urban MObility
NBSign.h
Go to the documentation of this file.
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3
// Copyright (C) 2012-2019 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials
5
// are made available under the terms of the Eclipse Public License v2.0
6
// which accompanies this distribution, and is available at
7
// http://www.eclipse.org/legal/epl-v20.html
8
// SPDX-License-Identifier: EPL-2.0
9
/****************************************************************************/
16
// A class representing a street sign
17
/****************************************************************************/
18
#ifndef NBSign_h
19
#define NBSign_h
20
21
22
// ===========================================================================
23
// included modules
24
// ===========================================================================
25
#include <
config.h
>
26
27
#include <string>
28
#include <
utils/common/StringBijection.h
>
29
30
// ===========================================================================
31
// class declarations
32
// ===========================================================================
33
class
NBEdge
;
34
class
OutputDevice
;
35
36
37
// ===========================================================================
38
// class definitions
39
// ===========================================================================
44
class
NBSign
{
45
public
:
46
47
enum
SignType
{
48
SIGN_TYPE_SPEED
,
49
SIGN_TYPE_YIELD
,
50
SIGN_TYPE_STOP
,
51
SIGN_TYPE_ALLWAY_STOP
,
52
SIGN_TYPE_ON_RAMP
,
53
SIGN_TYPE_PRIORITY
,
54
SIGN_TYPE_RIGHT_BEFORE_LEFT
,
55
SIGN_TYPE_ROUNDABOUT
,
56
SIGN_TYPE_RAIL_CROSSING
,
57
SIGN_TYPE_SLOPE
,
58
SIGN_TYPE_CITY
,
59
SIGN_TYPE_INFO
// terminator
60
};
61
68
NBSign
(
SignType
type,
double
offset,
const
std::string label =
""
);
69
70
72
~NBSign
();
73
75
void
writeAsPOI
(
OutputDevice
& into,
const
NBEdge
* edge)
const
;
76
77
78
private
:
80
SignType
myType
;
81
83
double
myOffset
;
84
86
std::string
myLabel
;
87
88
static
StringBijection<SignType>
SignTypeStrings
;
89
static
StringBijection<SignType>
SignTypeColors
;
90
};
91
92
93
#endif
94
95
/****************************************************************************/
96
NBSign::SIGN_TYPE_RIGHT_BEFORE_LEFT
Definition:
NBSign.h:54
NBSign::~NBSign
~NBSign()
Destructor.
Definition:
NBSign.cpp:67
NBSign::SIGN_TYPE_ALLWAY_STOP
Definition:
NBSign.h:51
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition:
OutputDevice.h:64
StringBijection.h
NBSign
A class representing a single street sign.
Definition:
NBSign.h:44
NBEdge
The representation of a single edge during network building.
Definition:
NBEdge.h:86
NBSign::myLabel
std::string myLabel
The (optional) label (for SPEED, SLOPE etc)
Definition:
NBSign.h:86
NBSign::myOffset
double myOffset
The offset of the sign from the start of its edge.
Definition:
NBSign.h:83
StringBijection< SignType >
NBSign::NBSign
NBSign(SignType type, double offset, const std::string label="")
Constructor with id, and position.
Definition:
NBSign.cpp:60
NBSign::myType
SignType myType
the type of the sign
Definition:
NBSign.h:80
NBSign::SIGN_TYPE_ON_RAMP
Definition:
NBSign.h:52
NBSign::SIGN_TYPE_RAIL_CROSSING
Definition:
NBSign.h:56
NBSign::SIGN_TYPE_CITY
Definition:
NBSign.h:58
NBSign::SignType
SignType
Definition:
NBSign.h:47
NBSign::SIGN_TYPE_STOP
Definition:
NBSign.h:50
NBSign::SIGN_TYPE_SLOPE
Definition:
NBSign.h:57
NBSign::SIGN_TYPE_PRIORITY
Definition:
NBSign.h:53
config.h
NBSign::writeAsPOI
void writeAsPOI(OutputDevice &into, const NBEdge *edge) const
write into device as POI positioned relative to the given edge
Definition:
NBSign.cpp:71
NBSign::SIGN_TYPE_INFO
Definition:
NBSign.h:59
NBSign::SIGN_TYPE_SPEED
Definition:
NBSign.h:48
NBSign::SignTypeStrings
static StringBijection< SignType > SignTypeStrings
Definition:
NBSign.h:88
NBSign::SIGN_TYPE_ROUNDABOUT
Definition:
NBSign.h:55
NBSign::SIGN_TYPE_YIELD
Definition:
NBSign.h:49
NBSign::SignTypeColors
static StringBijection< SignType > SignTypeColors
Definition:
NBSign.h:89
src
netbuild
NBSign.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16