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.dev/sumo
3 // Copyright (C) 2012-2024 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 {
57  SIGN_TYPE_INFO // terminator
58  };
59 
66  NBSign(SignType type, double offset, const std::string label = "");
67 
68 
70  ~NBSign();
71 
73  void writeAsPOI(OutputDevice& into, const NBEdge* edge) const;
74 
75 
76 private:
79 
81  double myOffset;
82 
84  std::string myLabel;
85 
88 };
The representation of a single edge during network building.
Definition: NBEdge.h:92
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:70
static StringBijection< SignType > SignTypeColors
Definition: NBSign.h:87
SignType myType
the type of the sign
Definition: NBSign.h:78
std::string myLabel
The (optional) label (for SPEED, SLOPE etc)
Definition: NBSign.h:84
double myOffset
The offset of the sign from the start of its edge.
Definition: NBSign.h:81
NBSign(SignType type, double offset, const std::string label="")
Constructor with id, and position.
Definition: NBSign.cpp:59
static StringBijection< SignType > SignTypeStrings
Definition: NBSign.h:86
~NBSign()
Destructor.
Definition: NBSign.cpp:66
SignType
Definition: NBSign.h:44
@ SIGN_TYPE_CITY
Definition: NBSign.h:56
@ SIGN_TYPE_RAIL_CROSSING
Definition: NBSign.h:54
@ SIGN_TYPE_SLOPE
Definition: NBSign.h:55
@ SIGN_TYPE_INFO
Definition: NBSign.h:57
@ 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:53
@ SIGN_TYPE_ON_RAMP
Definition: NBSign.h:49
@ SIGN_TYPE_PRIORITY
Definition: NBSign.h:50
@ SIGN_TYPE_RIGHT_BEFORE_LEFT
Definition: NBSign.h:51
@ SIGN_TYPE_LEFT_BEFORE_RIGHT
Definition: NBSign.h:52
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61