ad_map_access
RouteParaPoint.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: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <iostream>
21 #include <limits>
22 #include <memory>
23 #include <sstream>
26 #include "ad/physics/ParametricValue.hpp"
30 namespace ad {
34 namespace map {
40 namespace route {
41 
46 {
50  typedef std::shared_ptr<RouteParaPoint> Ptr;
51 
55  typedef std::shared_ptr<RouteParaPoint const> ConstPtr;
56 
60  RouteParaPoint() = default;
61 
65  ~RouteParaPoint() = default;
66 
70  RouteParaPoint(const RouteParaPoint &other) = default;
71 
75  RouteParaPoint(RouteParaPoint &&other) = default;
76 
84  RouteParaPoint &operator=(const RouteParaPoint &other) = default;
85 
93  RouteParaPoint &operator=(RouteParaPoint &&other) = default;
94 
102  bool operator==(const RouteParaPoint &other) const
103  {
104  return (routePlanningCounter == other.routePlanningCounter)
105  && (segmentCountFromDestination == other.segmentCountFromDestination)
106  && (parametricOffset == other.parametricOffset);
107  }
108 
116  bool operator!=(const RouteParaPoint &other) const
117  {
118  return !operator==(other);
119  }
120 
121  ::ad::map::route::RoutePlanningCounter routePlanningCounter{0u};
122  ::ad::map::route::SegmentCounter segmentCountFromDestination{0};
123 
133  ::ad::physics::ParametricValue parametricOffset;
134 };
135 
136 } // namespace route
137 } // namespace map
138 } // namespace ad
139 
143 #ifndef GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT
144 #define GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT
145 
148 namespace ad {
152 namespace map {
158 namespace route {
159 
169 inline std::ostream &operator<<(std::ostream &os, RouteParaPoint const &_value)
170 {
171  os << "RouteParaPoint(";
172  os << "routePlanningCounter:";
173  os << _value.routePlanningCounter;
174  os << ",";
175  os << "segmentCountFromDestination:";
176  os << _value.segmentCountFromDestination;
177  os << ",";
178  os << "parametricOffset:";
179  os << _value.parametricOffset;
180  os << ")";
181  return os;
182 }
183 
184 } // namespace route
185 } // namespace map
186 } // namespace ad
187 
188 namespace std {
192 inline std::string to_string(::ad::map::route::RouteParaPoint const &value)
193 {
194  stringstream sstream;
195  sstream << value;
196  return sstream.str();
197 }
198 } // namespace std
199 #endif // GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
RoutePlanningCounter.hpp
SegmentCounter.hpp
ad::map::route::RouteParaPoint::RouteParaPoint
RouteParaPoint()=default
standard constructor
ad::map::route::SegmentCounter
uint64_t SegmentCounter
DataType SegmentCounter.
Definition: SegmentCounter.hpp:41
ad::map::route::RouteParaPoint::parametricOffset
::ad::physics::ParametricValue parametricOffset
Definition: RouteParaPoint.hpp:133
ad::map::route::RoutePlanningCounter
uint64_t RoutePlanningCounter
DataType RoutePlanningCounter.
Definition: RoutePlanningCounter.hpp:39
ad::map::route::RouteParaPoint::~RouteParaPoint
~RouteParaPoint()=default
standard destructor
ad::map::route::RouteParaPoint::operator!=
bool operator!=(const RouteParaPoint &other) const
standard comparison operator
Definition: RouteParaPoint.hpp:116
std::to_string
std::string to_string(::ad::map::access::GeometryStoreItem const &value)
overload of the std::to_string for GeometryStoreItem
Definition: GeometryStoreItem.hpp:183
ad::map::route::RouteParaPoint::operator==
bool operator==(const RouteParaPoint &other) const
standard comparison operator
Definition: RouteParaPoint.hpp:102
ad::map::route::operator<<
std::ostream & operator<<(std::ostream &os, ConnectingRoute const &_value)
standard ostream operator
Definition: ConnectingRoute.hpp:193
ad::map::route::RouteParaPoint::operator=
RouteParaPoint & operator=(const RouteParaPoint &other)=default
standard assignment operator
ad::map::route::RouteParaPoint
DataType RouteParaPoint.
Definition: RouteParaPoint.hpp:45
ad::map::route::RouteParaPoint::ConstPtr
std::shared_ptr< RouteParaPoint const > ConstPtr
Smart pointer on constant RouteParaPoint.
Definition: RouteParaPoint.hpp:55
ad::map::route::RouteParaPoint::Ptr
std::shared_ptr< RouteParaPoint > Ptr
Smart pointer on RouteParaPoint.
Definition: RouteParaPoint.hpp:50