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 /****************************************************************************/
15 // A class representing a street sign
16 /****************************************************************************/
17 #ifndef NBSign_h
18 #define NBSign_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class NBEdge;
33 class OutputDevice;
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 class NBSign {
44 public:
45 
46  enum SignType {
58  SIGN_TYPE_INFO // terminator
59  };
60 
67  NBSign(SignType type, double offset, const std::string label = "");
68 
69 
71  ~NBSign();
72 
74  void writeAsPOI(OutputDevice& into, const NBEdge* edge) const;
75 
76 
77 private:
80 
82  double myOffset;
83 
85  std::string myLabel;
86 
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
NBSign::SIGN_TYPE_RIGHT_BEFORE_LEFT
@ SIGN_TYPE_RIGHT_BEFORE_LEFT
Definition: NBSign.h:53
NBSign::~NBSign
~NBSign()
Destructor.
Definition: NBSign.cpp:66
NBSign::SIGN_TYPE_ALLWAY_STOP
@ SIGN_TYPE_ALLWAY_STOP
Definition: NBSign.h:50
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
StringBijection.h
NBSign
A class representing a single street sign.
Definition: NBSign.h:43
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NBSign::myLabel
std::string myLabel
The (optional) label (for SPEED, SLOPE etc)
Definition: NBSign.h:85
NBSign::myOffset
double myOffset
The offset of the sign from the start of its edge.
Definition: NBSign.h:82
StringBijection< SignType >
NBSign::NBSign
NBSign(SignType type, double offset, const std::string label="")
Constructor with id, and position.
Definition: NBSign.cpp:59
NBSign::myType
SignType myType
the type of the sign
Definition: NBSign.h:79
NBSign::SIGN_TYPE_ON_RAMP
@ SIGN_TYPE_ON_RAMP
Definition: NBSign.h:51
NBSign::SIGN_TYPE_RAIL_CROSSING
@ SIGN_TYPE_RAIL_CROSSING
Definition: NBSign.h:55
NBSign::SIGN_TYPE_CITY
@ SIGN_TYPE_CITY
Definition: NBSign.h:57
NBSign::SignType
SignType
Definition: NBSign.h:46
NBSign::SIGN_TYPE_STOP
@ SIGN_TYPE_STOP
Definition: NBSign.h:49
NBSign::SIGN_TYPE_SLOPE
@ SIGN_TYPE_SLOPE
Definition: NBSign.h:56
NBSign::SIGN_TYPE_PRIORITY
@ SIGN_TYPE_PRIORITY
Definition: NBSign.h:52
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:70
NBSign::SIGN_TYPE_INFO
@ SIGN_TYPE_INFO
Definition: NBSign.h:58
NBSign::SIGN_TYPE_SPEED
@ SIGN_TYPE_SPEED
Definition: NBSign.h:47
NBSign::SignTypeStrings
static StringBijection< SignType > SignTypeStrings
Definition: NBSign.h:87
NBSign::SIGN_TYPE_ROUNDABOUT
@ SIGN_TYPE_ROUNDABOUT
Definition: NBSign.h:54
NBSign::SIGN_TYPE_YIELD
@ SIGN_TYPE_YIELD
Definition: NBSign.h:48
NBSign::SignTypeColors
static StringBijection< SignType > SignTypeColors
Definition: NBSign.h:88