ad_rss_map_integration
RssVehicleRestrictions.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 <sstream>
28 namespace ad {
32 namespace rss {
36 namespace map {
37 
44 {
48  typedef std::shared_ptr<RssVehicleRestrictions> Ptr;
49 
53  typedef std::shared_ptr<RssVehicleRestrictions const> ConstPtr;
54 
59 
64 
69 
74 
83 
92 
100  bool operator==(const RssVehicleRestrictions &other) const
101  {
102  return (route_accelerations == other.route_accelerations)
104  }
105 
113  bool operator!=(const RssVehicleRestrictions &other) const
114  {
115  return !operator==(other);
116  }
117 
122 
127 };
128 
129 } // namespace map
130 } // namespace rss
131 } // namespace ad
132 
136 #ifndef GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS
137 #define GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS
141 namespace ad {
145 namespace rss {
149 namespace map {
150 
160 inline std::ostream &operator<<(std::ostream &os, RssVehicleRestrictions const &_value)
161 {
162  os << "RssVehicleRestrictions(";
163  os << "route_accelerations:";
164  os << _value.route_accelerations;
165  os << ",";
166  os << "vehicle_acceleration_restrictions:";
168  os << ")";
169  return os;
170 }
171 
172 } // namespace map
173 } // namespace rss
174 } // namespace ad
175 
176 namespace std {
180 inline std::string to_string(::ad::rss::map::RssVehicleRestrictions const &value)
181 {
182  stringstream sstream;
183  sstream << value;
184  return sstream.str();
185 }
186 } // namespace std
187 
191 template <> struct fmt::formatter<::ad::rss::map::RssVehicleRestrictions> : formatter<string_view>
192 {
193  template <typename FormatContext> auto format(::ad::rss::map::RssVehicleRestrictions const &value, FormatContext &ctx)
194  {
195  return formatter<string_view>::format(std::to_string(value), ctx);
196  }
197 };
198 
199 #endif // GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS
std::string to_string(::ad::rss::map::RouteAccelerations const &value)
overload of the std::to_string for RouteAccelerations
Definition: RouteAccelerations.hpp:229
std::ostream & operator<<(std::ostream &os, RouteAccelerations const &_value)
standard ostream operator
Definition: RouteAccelerations.hpp:194
namespace ad
Definition: RouteAccelerations.hpp:33
DataType RouteAccelerations.
Definition: RouteAccelerations.hpp:49
DataType RssVehicleAccelerationRestrictions.
Definition: RssVehicleAccelerationRestrictions.hpp:41
DataType RssVehicleRestrictions.
Definition: RssVehicleRestrictions.hpp:44
std::shared_ptr< RssVehicleRestrictions const > ConstPtr
Smart pointer on constant RssVehicleRestrictions.
Definition: RssVehicleRestrictions.hpp:53
::ad::rss::map::RouteAccelerations route_accelerations
Definition: RssVehicleRestrictions.hpp:121
RssVehicleRestrictions()=default
standard constructor
bool operator!=(const RssVehicleRestrictions &other) const
standard comparison operator
Definition: RssVehicleRestrictions.hpp:113
bool operator==(const RssVehicleRestrictions &other) const
standard comparison operator
Definition: RssVehicleRestrictions.hpp:100
RssVehicleRestrictions & operator=(RssVehicleRestrictions &&other)=default
standard move operator
RssVehicleRestrictions(RssVehicleRestrictions &&other)=default
standard move constructor
RssVehicleRestrictions & operator=(const RssVehicleRestrictions &other)=default
standard assignment operator
std::shared_ptr< RssVehicleRestrictions > Ptr
Smart pointer on RssVehicleRestrictions.
Definition: RssVehicleRestrictions.hpp:48
~RssVehicleRestrictions()=default
standard destructor
RssVehicleRestrictions(const RssVehicleRestrictions &other)=default
standard copy constructor
::ad::rss::map::RssVehicleAccelerationRestrictions vehicle_acceleration_restrictions
Definition: RssVehicleRestrictions.hpp:126