ad_map_access
RoadUserType.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 restriction {
37 
41 enum class RoadUserType : int32_t
42 {
46  INVALID = 0,
50  UNKNOWN = 1,
54  CAR = 2,
58  BUS = 3,
62  TRUCK = 4,
66  PEDESTRIAN = 5,
70  MOTORBIKE = 6,
74  BICYCLE = 7,
78  CAR_ELECTRIC = 8,
82  CAR_HYBRID = 9,
86  CAR_PETROL = 10,
90  CAR_DIESEL = 11
91 };
92 
93 } // namespace restriction
94 } // namespace map
95 } // namespace ad
99 std::string toString(::ad::map::restriction::RoadUserType const e);
100 
119 template <typename EnumType> EnumType fromString(std::string const &str);
120 
140 
144 #ifndef GEN_GUARD_AD_MAP_RESTRICTION_ROADUSERTYPE
145 #define GEN_GUARD_AD_MAP_RESTRICTION_ROADUSERTYPE
146 
149 namespace ad {
153 namespace map {
159 namespace restriction {
160 
170 inline std::ostream &operator<<(std::ostream &os, RoadUserType const &value)
171 {
172  return os << toString(value);
173 }
174 
175 } // namespace restriction
176 } // namespace map
177 } // namespace ad
178 
179 namespace std {
183 inline std::string to_string(::ad::map::restriction::RoadUserType const &value)
184 {
185  return ::toString(value);
186 }
187 } // namespace std
188 #endif // GEN_GUARD_AD_MAP_RESTRICTION_ROADUSERTYPE
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::restriction::RoadUserType::BUS
@ BUS
ad::map::restriction::RoadUserType::TRUCK
@ TRUCK
ad::map::restriction::RoadUserType::CAR_DIESEL
@ CAR_DIESEL
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::restriction::RoadUserType::CAR_PETROL
@ CAR_PETROL
ad::map::restriction::RoadUserType::CAR_HYBRID
@ CAR_HYBRID
ad::map::restriction::RoadUserType::CAR_ELECTRIC
@ CAR_ELECTRIC
toString
std::string toString(::ad::map::restriction::RoadUserType const e)
Conversion of ad::map::restriction::RoadUserType to std::string helper.
ad::map::restriction::RoadUserType::INVALID
@ INVALID
ad::map::restriction::RoadUserType::BICYCLE
@ BICYCLE
ad::map::restriction::RoadUserType::PEDESTRIAN
@ PEDESTRIAN
ad::map::restriction::RoadUserType::MOTORBIKE
@ MOTORBIKE
ad::map::restriction::RoadUserType
RoadUserType
DataType RoadUserType.
Definition: RoadUserType.hpp:41
ad::map::restriction::RoadUserType::UNKNOWN
@ UNKNOWN
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::map::restriction::RoadUserType::CAR
@ CAR
ad::map::restriction::operator<<
std::ostream & operator<<(std::ostream &os, Restriction const &_value)
standard ostream operator
Definition: Restriction.hpp:157