ad_rss
LateralResponse.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2022 Intel Corporation
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <iostream>
21 #include <memory>
22 #include <string>
23 #include "spdlog/fmt/ostr.h"
24 #include "spdlog/spdlog.h"
28 namespace ad {
32 namespace rss {
36 namespace state {
37 
45 enum class LateralResponse : int32_t
46 {
50  None = 0,
51 
55  BrakeMin = 1
56 };
57 
58 } // namespace state
59 } // namespace rss
60 } // namespace ad
65 
84 template <typename EnumType> EnumType fromString(std::string const &str);
85 
105 
109 #ifndef GEN_GUARD_AD_RSS_STATE_LATERALRESPONSE
110 #define GEN_GUARD_AD_RSS_STATE_LATERALRESPONSE
114 namespace ad {
118 namespace rss {
122 namespace state {
123 
133 inline std::ostream &operator<<(std::ostream &os, LateralResponse const &value)
134 {
135  return os << toString(value);
136 }
137 
138 } // namespace state
139 } // namespace rss
140 } // namespace ad
141 
142 namespace std {
146 inline std::string to_string(::ad::rss::state::LateralResponse const &value)
147 {
148  return ::toString(value);
149 }
150 } // namespace std
151 
155 template <> struct fmt::formatter<::ad::rss::state::LateralResponse> : formatter<string_view>
156 {
157  template <typename FormatContext> auto format(::ad::rss::state::LateralResponse const &value, FormatContext &ctx)
158  {
159  return formatter<string_view>::format(std::to_string(value), ctx);
160  }
161 };
162 
163 #endif // GEN_GUARD_AD_RSS_STATE_LATERALRESPONSE
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:162
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
std::string toString(::ad::rss::state::LateralResponse const e)
Conversion of ad::rss::state::LateralResponse to std::string helper.
LateralResponse
DataType LateralResponse.
Definition: LateralResponse.hpp:46
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
namespace ad
Definition: LateralRelativePosition.hpp:28