ad_rss
UnstructuredConstellationResponse.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 
44 {
48  None = 0,
49 
53  ContinueForward = 1,
54 
58  DriveAway = 2,
59 
63  Brake = 3
64 };
65 
66 } // namespace state
67 } // namespace rss
68 } // namespace ad
73 
92 template <typename EnumType> EnumType fromString(std::string const &str);
93 
113 
117 #ifndef GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONRESPONSE
118 #define GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONRESPONSE
122 namespace ad {
126 namespace rss {
130 namespace state {
131 
141 inline std::ostream &operator<<(std::ostream &os, UnstructuredConstellationResponse const &value)
142 {
143  return os << toString(value);
144 }
145 
146 } // namespace state
147 } // namespace rss
148 } // namespace ad
149 
150 namespace std {
155 {
156  return ::toString(value);
157 }
158 } // namespace std
159 
163 template <> struct fmt::formatter<::ad::rss::state::UnstructuredConstellationResponse> : formatter<string_view>
164 {
165  template <typename FormatContext>
166  auto format(::ad::rss::state::UnstructuredConstellationResponse const &value, FormatContext &ctx)
167  {
168  return formatter<string_view>::format(std::to_string(value), ctx);
169  }
170 };
171 
172 #endif // GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONRESPONSE
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::UnstructuredConstellationResponse const e)
Conversion of ad::rss::state::UnstructuredConstellationResponse to std::string helper.
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
UnstructuredConstellationResponse
DataType UnstructuredConstellationResponse.
Definition: UnstructuredConstellationResponse.hpp:44
namespace ad
Definition: LateralRelativePosition.hpp:28