ad_rss
ObjectType.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 world {
35 
41 enum class ObjectType : int32_t
42 {
46  Invalid = 0,
47 
51  EgoVehicle = 1,
52 
56  OtherVehicle = 2,
57 
61  Pedestrian = 3,
62 
67 };
68 
69 } // namespace world
70 } // namespace rss
71 } // namespace ad
75 std::string toString(::ad::rss::world::ObjectType const e);
76 
95 template <typename EnumType> EnumType fromString(std::string const &str);
96 
116 
120 #ifndef GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE
121 #define GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE
122 
125 namespace ad {
129 namespace rss {
133 namespace world {
134 
144 inline std::ostream &operator<<(std::ostream &os, ObjectType const &value)
145 {
146  return os << toString(value);
147 }
148 
149 } // namespace world
150 } // namespace rss
151 } // namespace ad
152 
153 namespace std {
157 inline std::string to_string(::ad::rss::world::ObjectType const &value)
158 {
159  return ::toString(value);
160 }
161 } // namespace std
162 #endif // GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::world::ObjectType
ObjectType
DataType ObjectType.
Definition: ObjectType.hpp:41
ad::rss::world::ObjectType::EgoVehicle
@ EgoVehicle
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::world::ObjectType::Pedestrian
@ Pedestrian
ad::rss::world::operator<<
std::ostream & operator<<(std::ostream &os, LaneDrivingDirection const &value)
standard ostream operator
Definition: LaneDrivingDirection.hpp:132
toString
std::string toString(::ad::rss::world::ObjectType const e)
Conversion of ad::rss::world::ObjectType to std::string helper.
ad::rss::world::ObjectType::Invalid
@ Invalid
ad::rss::world::ObjectType::OtherVehicle
@ OtherVehicle
fromString
EnumType fromString(std::string const &str)
Conversion from std::string to enum type T helper.
ad::rss::world::ObjectType::ArtificialObject
@ ArtificialObject