ad_map_access
TrafficType.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 access {
37 
43 enum class TrafficType : int32_t
44 {
48  INVALID = 0,
49 
54 
59 };
60 
61 } // namespace access
62 } // namespace map
63 } // namespace ad
67 std::string toString(::ad::map::access::TrafficType const e);
68 
87 template <typename EnumType> EnumType fromString(std::string const &str);
88 
108 
112 #ifndef GEN_GUARD_AD_MAP_ACCESS_TRAFFICTYPE
113 #define GEN_GUARD_AD_MAP_ACCESS_TRAFFICTYPE
114 
117 namespace ad {
121 namespace map {
127 namespace access {
128 
138 inline std::ostream &operator<<(std::ostream &os, TrafficType const &value)
139 {
140  return os << toString(value);
141 }
142 
143 } // namespace access
144 } // namespace map
145 } // namespace ad
146 
147 namespace std {
151 inline std::string to_string(::ad::map::access::TrafficType const &value)
152 {
153  return ::toString(value);
154 }
155 } // namespace std
156 #endif // GEN_GUARD_AD_MAP_ACCESS_TRAFFICTYPE
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
toString
std::string toString(::ad::map::access::TrafficType const e)
Conversion of ad::map::access::TrafficType to std::string helper.
ad::map::access::TrafficType::RIGHT_HAND_TRAFFIC
@ RIGHT_HAND_TRAFFIC
ad::map::access::TrafficType::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::access::TrafficType::LEFT_HAND_TRAFFIC
@ LEFT_HAND_TRAFFIC
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::map::access::operator<<
std::ostream & operator<<(std::ostream &os, GeometryStoreItem const &_value)
standard ostream operator
Definition: GeometryStoreItem.hpp:157
ad::map::access::TrafficType
TrafficType
DataType TrafficType.
Definition: TrafficType.hpp:43