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-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // A class representing a street sign
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include <string>
26 
27 // ===========================================================================
28 // class declarations
29 // ===========================================================================
30 class NBEdge;
31 class OutputDevice;
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
41 class NBSign {
42 public:
43 
44  enum SignType {
56  SIGN_TYPE_INFO // terminator
57  };
58 
65  NBSign(SignType type, double offset, const std::string label = "");
66 
67 
69  ~NBSign();
70 
72  void writeAsPOI(OutputDevice& into, const NBEdge* edge) const;
73 
74 
75 private:
78 
80  double myOffset;
81 
83  std::string myLabel;
84 
87 };
The representation of a single edge during network building.
Definition: NBEdge.h:91
A class representing a single street sign.
Definition: NBSign.h:41
void writeAsPOI(OutputDevice &into, const NBEdge *edge) const
write into device as POI positioned relative to the given edge
Definition: NBSign.cpp:69
static StringBijection< SignType > SignTypeColors
Definition: NBSign.h:86
SignType myType
the type of the sign
Definition: NBSign.h:77
std::string myLabel
The (optional) label (for SPEED, SLOPE etc)
Definition: NBSign.h:83
double myOffset
The offset of the sign from the start of its edge.
Definition: NBSign.h:80
NBSign(SignType type, double offset, const std::string label="")
Constructor with id, and position.
Definition: NBSign.cpp:58
static StringBijection< SignType > SignTypeStrings
Definition: NBSign.h:85
~NBSign()
Destructor.
Definition: NBSign.cpp:65
SignType
Definition: NBSign.h:44
@ SIGN_TYPE_CITY
Definition: NBSign.h:55
@ SIGN_TYPE_RAIL_CROSSING
Definition: NBSign.h:53
@ SIGN_TYPE_SLOPE
Definition: NBSign.h:54
@ SIGN_TYPE_INFO
Definition: NBSign.h:56
@ SIGN_TYPE_SPEED
Definition: NBSign.h:45
@ SIGN_TYPE_ALLWAY_STOP
Definition: NBSign.h:48
@ SIGN_TYPE_YIELD
Definition: NBSign.h:46
@ SIGN_TYPE_STOP
Definition: NBSign.h:47
@ SIGN_TYPE_ROUNDABOUT
Definition: NBSign.h:52
@ SIGN_TYPE_ON_RAMP
Definition: NBSign.h:49
@ SIGN_TYPE_PRIORITY
Definition: NBSign.h:50
@ SIGN_TYPE_RIGHT_BEFORE_LEFT
Definition: NBSign.h:51
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:60