ad_map_access
ContactLocation.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 lane {
37 
43 enum class ContactLocation : int32_t
44 {
48  INVALID = 0,
49 
53  UNKNOWN = 1,
54 
58  LEFT = 2,
59 
63  RIGHT = 3,
64 
68  SUCCESSOR = 4,
69 
73  PREDECESSOR = 5,
74 
78  OVERLAP = 6
79 };
80 
81 } // namespace lane
82 } // namespace map
83 } // namespace ad
87 std::string toString(::ad::map::lane::ContactLocation const e);
88 
107 template <typename EnumType> EnumType fromString(std::string const &str);
108 
128 
132 #ifndef GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION
133 #define GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION
134 
137 namespace ad {
141 namespace map {
147 namespace lane {
148 
158 inline std::ostream &operator<<(std::ostream &os, ContactLocation const &value)
159 {
160  return os << toString(value);
161 }
162 
163 } // namespace lane
164 } // namespace map
165 } // namespace ad
166 
167 namespace std {
171 inline std::string to_string(::ad::map::lane::ContactLocation const &value)
172 {
173  return ::toString(value);
174 }
175 } // namespace std
176 #endif // GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION
ad::map::lane::ContactLocation::PREDECESSOR
@ PREDECESSOR
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::lane::ContactLocation::RIGHT
@ RIGHT
ad::map::lane::ContactLocation::UNKNOWN
@ UNKNOWN
ad::map::lane::ContactLocation
ContactLocation
DataType ContactLocation.
Definition: ContactLocation.hpp:43
ad::map::lane::ContactLocation::INVALID
@ INVALID
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::lane::ContactLocation::SUCCESSOR
@ SUCCESSOR
toString
std::string toString(::ad::map::lane::ContactLocation const e)
Conversion of ad::map::lane::ContactLocation to std::string helper.
ad::map::lane::operator<<
std::ostream & operator<<(std::ostream &os, ContactLane const &_value)
standard ostream operator
Definition: ContactLane.hpp:182
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::map::lane::ContactLocation::OVERLAP
@ OVERLAP
ad::map::lane::ContactLocation::LEFT
@ LEFT