ad_map_access
MapMatchedPosition.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>
27 #include "ad/physics/Distance.hpp"
28 #include "ad/physics/Probability.hpp"
32 namespace ad {
36 namespace map {
42 namespace match {
43 
50 {
54  typedef std::shared_ptr<MapMatchedPosition> Ptr;
55 
59  typedef std::shared_ptr<MapMatchedPosition const> ConstPtr;
60 
64  MapMatchedPosition() = default;
65 
69  ~MapMatchedPosition() = default;
70 
74  MapMatchedPosition(const MapMatchedPosition &other) = default;
75 
79  MapMatchedPosition(MapMatchedPosition &&other) = default;
80 
88  MapMatchedPosition &operator=(const MapMatchedPosition &other) = default;
89 
98 
106  bool operator==(const MapMatchedPosition &other) const
107  {
108  return (lanePoint == other.lanePoint) && (type == other.type) && (matchedPoint == other.matchedPoint)
109  && (probability == other.probability) && (queryPoint == other.queryPoint)
111  }
112 
120  bool operator!=(const MapMatchedPosition &other) const
121  {
122  return !operator==(other);
123  }
124 
131  ::ad::map::point::ECEFPoint matchedPoint;
132  ::ad::physics::Probability probability;
133 
138 
142  ::ad::physics::Distance matchedPointDistance;
143 };
144 
145 } // namespace match
146 } // namespace map
147 } // namespace ad
148 
152 #ifndef GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION
153 #define GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION
154 
157 namespace ad {
161 namespace map {
167 namespace match {
168 
178 inline std::ostream &operator<<(std::ostream &os, MapMatchedPosition const &_value)
179 {
180  os << "MapMatchedPosition(";
181  os << "lanePoint:";
182  os << _value.lanePoint;
183  os << ",";
184  os << "type:";
185  os << _value.type;
186  os << ",";
187  os << "matchedPoint:";
188  os << _value.matchedPoint;
189  os << ",";
190  os << "probability:";
191  os << _value.probability;
192  os << ",";
193  os << "queryPoint:";
194  os << _value.queryPoint;
195  os << ",";
196  os << "matchedPointDistance:";
197  os << _value.matchedPointDistance;
198  os << ")";
199  return os;
200 }
201 
202 } // namespace match
203 } // namespace map
204 } // namespace ad
205 
206 namespace std {
210 inline std::string to_string(::ad::map::match::MapMatchedPosition const &value)
211 {
212  stringstream sstream;
213  sstream << value;
214  return sstream.str();
215 }
216 } // namespace std
217 #endif // GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
LanePoint.hpp
ECEFPoint.hpp
ad::map::match::MapMatchedPosition::Ptr
std::shared_ptr< MapMatchedPosition > Ptr
Smart pointer on MapMatchedPosition.
Definition: MapMatchedPosition.hpp:54
ad::map::match::MapMatchedPosition::~MapMatchedPosition
~MapMatchedPosition()=default
standard destructor
ad::map::match::MapMatchedPosition::queryPoint
::ad::map::point::ECEFPoint queryPoint
Definition: MapMatchedPosition.hpp:137
ad::map::match::MapMatchedPosition::operator=
MapMatchedPosition & operator=(const MapMatchedPosition &other)=default
standard assignment operator
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::match::MapMatchedPosition::operator!=
bool operator!=(const MapMatchedPosition &other) const
standard comparison operator
Definition: MapMatchedPosition.hpp:120
ad::map::match::MapMatchedPositionType
MapMatchedPositionType
DataType MapMatchedPositionType.
Definition: MapMatchedPositionType.hpp:43
ad::map::match::LanePoint
DataType LanePoint.
Definition: LanePoint.hpp:49
ad::map::match::MapMatchedPosition::matchedPointDistance
::ad::physics::Distance matchedPointDistance
Definition: MapMatchedPosition.hpp:142
ad::map::match::MapMatchedPositionType::INVALID
@ INVALID
ad::map::match::MapMatchedPosition::ConstPtr
std::shared_ptr< MapMatchedPosition const > ConstPtr
Smart pointer on constant MapMatchedPosition.
Definition: MapMatchedPosition.hpp:59
MapMatchedPositionType.hpp
ad::map::match::operator<<
std::ostream & operator<<(std::ostream &os, ENUObjectPosition const &_value)
standard ostream operator
Definition: ENUObjectPosition.hpp:175
ad::map::point::ECEFPoint
DataType ECEFPoint.
Definition: ECEFPoint.hpp:45
ad::map::match::MapMatchedPosition
DataType MapMatchedPosition.
Definition: MapMatchedPosition.hpp:49
ad::map::match::MapMatchedPosition::operator==
bool operator==(const MapMatchedPosition &other) const
standard comparison operator
Definition: MapMatchedPosition.hpp:106
ad::map::match::MapMatchedPosition::MapMatchedPosition
MapMatchedPosition()=default
standard constructor
ad::map::match::MapMatchedPosition::lanePoint
::ad::map::match::LanePoint lanePoint
Definition: MapMatchedPosition.hpp:129