ad_rss
RssStateEvaluator.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 
43 enum class RssStateEvaluator : int32_t
44 {
48  None = 0,
49 
54 
59 
64 
69 
73  LateralDistance = 5,
74 
79 
84 
89 
94 
99 };
100 
101 } // namespace state
102 } // namespace rss
103 } // namespace ad
108 
127 template <typename EnumType> EnumType fromString(std::string const &str);
128 
148 
152 #ifndef GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
153 #define GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
157 namespace ad {
161 namespace rss {
165 namespace state {
166 
176 inline std::ostream &operator<<(std::ostream &os, RssStateEvaluator const &value)
177 {
178  return os << toString(value);
179 }
180 
181 } // namespace state
182 } // namespace rss
183 } // namespace ad
184 
185 namespace std {
189 inline std::string to_string(::ad::rss::state::RssStateEvaluator const &value)
190 {
191  return ::toString(value);
192 }
193 } // namespace std
194 
198 template <> struct fmt::formatter<::ad::rss::state::RssStateEvaluator> : formatter<string_view>
199 {
200  template <typename FormatContext> auto format(::ad::rss::state::RssStateEvaluator const &value, FormatContext &ctx)
201  {
202  return formatter<string_view>::format(std::to_string(value), ctx);
203  }
204 };
205 
206 #endif // GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
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::RssStateEvaluator const e)
Conversion of ad::rss::state::RssStateEvaluator to std::string helper.
RssStateEvaluator
DataType RssStateEvaluator.
Definition: RssStateEvaluator.hpp:44
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
namespace ad
Definition: LateralRelativePosition.hpp:28