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-2018 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>
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 {
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:
81 
83  double myOffset;
84 
86  std::string myLabel;
87 
90 };
91 
92 
93 #endif
94 
95 /****************************************************************************/
96 
A class representing a single street sign.
Definition: NBSign.h:44
The representation of a single edge during network building.
Definition: NBEdge.h:65
void writeAsPOI(OutputDevice &into, const NBEdge *edge) const
write into device as POI positioned relative to the given edge
Definition: NBSign.cpp:71
~NBSign()
Destructor.
Definition: NBSign.cpp:67
NBSign(SignType type, double offset, const std::string label="")
Constructor with id, and position.
Definition: NBSign.cpp:60
static StringBijection< SignType > SignTypeColors
Definition: NBSign.h:89
std::string myLabel
The (optional) label (for SPEED, SLOPE etc)
Definition: NBSign.h:86
double myOffset
The offset of the sign from the start of its edge.
Definition: NBSign.h:83
static StringBijection< SignType > SignTypeStrings
Definition: NBSign.h:88
SignType myType
the type of the sign
Definition: NBSign.h:80
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
SignType
Definition: NBSign.h:47