ad_map_access
IntersectionType.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <iostream>
21 #include <memory>
22 #include <string>
26 namespace ad {
30 namespace map {
36 namespace intersection {
37 
43 enum class IntersectionType : int32_t
44 {
48  Unknown = 0,
49 
53  Yield = 1,
54 
58  Stop = 2,
59 
63  AllWayStop = 3,
64 
68  HasWay = 4,
69 
73  Crosswalk = 5,
74 
78  PriorityToRight = 6,
79 
84 
88  TrafficLight = 8
89 };
90 
91 } // namespace intersection
92 } // namespace map
93 } // namespace ad
98 
117 template <typename EnumType> EnumType fromString(std::string const &str);
118 
138 
142 #ifndef GEN_GUARD_AD_MAP_INTERSECTION_INTERSECTIONTYPE
143 #define GEN_GUARD_AD_MAP_INTERSECTION_INTERSECTIONTYPE
144 
147 namespace ad {
151 namespace map {
157 namespace intersection {
158 
168 inline std::ostream &operator<<(std::ostream &os, IntersectionType const &value)
169 {
170  return os << toString(value);
171 }
172 
173 } // namespace intersection
174 } // namespace map
175 } // namespace ad
176 
177 namespace std {
181 inline std::string to_string(::ad::map::intersection::IntersectionType const &value)
182 {
183  return ::toString(value);
184 }
185 } // namespace std
186 #endif // GEN_GUARD_AD_MAP_INTERSECTION_INTERSECTIONTYPE
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::intersection::IntersectionType::AllWayStop
@ AllWayStop
ad::map::intersection::operator<<
std::ostream & operator<<(std::ostream &os, IntersectionType const &value)
standard ostream operator
Definition: IntersectionType.hpp:168
ad::map::intersection::IntersectionType::PriorityToRight
@ PriorityToRight
ad::map::intersection::IntersectionType::HasWay
@ HasWay
std::to_string
std::string to_string(::ad::map::access::GeometryStoreItem const &value)
overload of the std::to_string for GeometryStoreItem
Definition: GeometryStoreItem.hpp:183
ad::map::intersection::IntersectionType::Yield
@ Yield
ad::map::intersection::IntersectionType::Crosswalk
@ Crosswalk
ad::map::intersection::IntersectionType::PriorityToRightAndStraight
@ PriorityToRightAndStraight
ad::map::intersection::IntersectionType
IntersectionType
DataType IntersectionType.
Definition: IntersectionType.hpp:43
ad::map::intersection::IntersectionType::Stop
@ Stop
toString
std::string toString(::ad::map::intersection::IntersectionType const e)
Conversion of ad::map::intersection::IntersectionType to std::string helper.
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::map::intersection::IntersectionType::TrafficLight
@ TrafficLight
ad::map::intersection::IntersectionType::Unknown
@ Unknown