ad_rss
LongitudinalRelativePosition.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: LGPL-2.1-only
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 rss {
34 namespace situation {
35 
42 enum class LongitudinalRelativePosition : int32_t
43 {
47  InFront = 0,
48 
53  OverlapFront = 1,
54 
58  Overlap = 2,
59 
64  OverlapBack = 3,
65 
69  AtBack = 4
70 };
71 
72 } // namespace situation
73 } // namespace rss
74 } // namespace ad
79 
98 template <typename EnumType> EnumType fromString(std::string const &str);
99 
119 
123 #ifndef GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION
124 #define GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION
125 
128 namespace ad {
132 namespace rss {
136 namespace situation {
137 
147 inline std::ostream &operator<<(std::ostream &os, LongitudinalRelativePosition const &value)
148 {
149  return os << toString(value);
150 }
151 
152 } // namespace situation
153 } // namespace rss
154 } // namespace ad
155 
156 namespace std {
161 {
162  return ::toString(value);
163 }
164 } // namespace std
165 #endif // GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::situation::LongitudinalRelativePosition::OverlapFront
@ OverlapFront
ad::rss::situation::LongitudinalRelativePosition::AtBack
@ AtBack
ad::rss::situation::LongitudinalRelativePosition
LongitudinalRelativePosition
DataType LongitudinalRelativePosition.
Definition: LongitudinalRelativePosition.hpp:42
std::to_string
std::string to_string(::ad::rss::situation::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:160
ad::rss::situation::operator<<
std::ostream & operator<<(std::ostream &os, LateralRelativePosition const &value)
standard ostream operator
Definition: LateralRelativePosition.hpp:147
toString
std::string toString(::ad::rss::situation::LongitudinalRelativePosition const e)
Conversion of ad::rss::situation::LongitudinalRelativePosition to std::string helper.
ad::rss::situation::LongitudinalRelativePosition::OverlapBack
@ OverlapBack
ad::rss::situation::LongitudinalRelativePosition::InFront
@ InFront
ad::rss::situation::LongitudinalRelativePosition::Overlap
@ Overlap