ad_map_access
TurnDirection.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 TurnDirection : int32_t
44 {
48  Unknown = 0,
49 
53  Right = 1,
54 
58  Straight = 2,
59 
63  Left = 3,
64 
68  UTurn = 4
69 };
70 
71 } // namespace intersection
72 } // namespace map
73 } // namespace ad
77 std::string toString(::ad::map::intersection::TurnDirection const e);
78 
97 template <typename EnumType> EnumType fromString(std::string const &str);
98 
118 
122 #ifndef GEN_GUARD_AD_MAP_INTERSECTION_TURNDIRECTION
123 #define GEN_GUARD_AD_MAP_INTERSECTION_TURNDIRECTION
124 
127 namespace ad {
131 namespace map {
137 namespace intersection {
138 
148 inline std::ostream &operator<<(std::ostream &os, TurnDirection const &value)
149 {
150  return os << toString(value);
151 }
152 
153 } // namespace intersection
154 } // namespace map
155 } // namespace ad
156 
157 namespace std {
161 inline std::string to_string(::ad::map::intersection::TurnDirection const &value)
162 {
163  return ::toString(value);
164 }
165 } // namespace std
166 #endif // GEN_GUARD_AD_MAP_INTERSECTION_TURNDIRECTION
ad::map::intersection::TurnDirection::Right
@ Right
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::intersection::operator<<
std::ostream & operator<<(std::ostream &os, IntersectionType const &value)
standard ostream operator
Definition: IntersectionType.hpp:168
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::TurnDirection::Unknown
@ Unknown
ad::map::intersection::TurnDirection::Left
@ Left
ad::map::intersection::TurnDirection
TurnDirection
DataType TurnDirection.
Definition: TurnDirection.hpp:43
ad::map::intersection::TurnDirection::UTurn
@ UTurn
toString
std::string toString(::ad::map::intersection::TurnDirection const e)
Conversion of ad::map::intersection::TurnDirection to std::string helper.
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::map::intersection::TurnDirection::Straight
@ Straight