ad_rss
ConstellationType.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 world {
37 
43 enum class ConstellationType : int32_t
44 {
50  NotRelevant = 0,
51 
55  SameDirection = 1,
56 
61 
66 
71 
76 
80  Unstructured = 6
81 };
82 
83 } // namespace world
84 } // namespace rss
85 } // namespace ad
90 
109 template <typename EnumType> EnumType fromString(std::string const &str);
110 
130 
134 #ifndef GEN_GUARD_AD_RSS_WORLD_CONSTELLATIONTYPE
135 #define GEN_GUARD_AD_RSS_WORLD_CONSTELLATIONTYPE
139 namespace ad {
143 namespace rss {
147 namespace world {
148 
158 inline std::ostream &operator<<(std::ostream &os, ConstellationType const &value)
159 {
160  return os << toString(value);
161 }
162 
163 } // namespace world
164 } // namespace rss
165 } // namespace ad
166 
167 namespace std {
171 inline std::string to_string(::ad::rss::world::ConstellationType const &value)
172 {
173  return ::toString(value);
174 }
175 } // namespace std
176 
180 template <> struct fmt::formatter<::ad::rss::world::ConstellationType> : formatter<string_view>
181 {
182  template <typename FormatContext> auto format(::ad::rss::world::ConstellationType const &value, FormatContext &ctx)
183  {
184  return formatter<string_view>::format(std::to_string(value), ctx);
185  }
186 };
187 
188 #endif // GEN_GUARD_AD_RSS_WORLD_CONSTELLATIONTYPE
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
std::string toString(::ad::rss::world::ConstellationType const e)
Conversion of ad::rss::world::ConstellationType to std::string helper.
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:162
ConstellationType
DataType ConstellationType.
Definition: ConstellationType.hpp:44
std::ostream & operator<<(std::ostream &os, Constellation const &_value)
standard ostream operator
Definition: Constellation.hpp:198
namespace ad
Definition: LateralRelativePosition.hpp:28