ad_map_access
ENUObjectPosition.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/Dimension3D.hpp"
31 namespace ad {
35 namespace map {
41 namespace match {
42 
47 {
51  typedef std::shared_ptr<ENUObjectPosition> Ptr;
52 
56  typedef std::shared_ptr<ENUObjectPosition const> ConstPtr;
57 
61  ENUObjectPosition() = default;
62 
66  ~ENUObjectPosition() = default;
67 
71  ENUObjectPosition(const ENUObjectPosition &other) = default;
72 
76  ENUObjectPosition(ENUObjectPosition &&other) = default;
77 
85  ENUObjectPosition &operator=(const ENUObjectPosition &other) = default;
86 
94  ENUObjectPosition &operator=(ENUObjectPosition &&other) = default;
95 
103  bool operator==(const ENUObjectPosition &other) const
104  {
105  return (centerPoint == other.centerPoint) && (heading == other.heading)
106  && (enuReferencePoint == other.enuReferencePoint) && (dimension == other.dimension);
107  }
108 
116  bool operator!=(const ENUObjectPosition &other) const
117  {
118  return !operator==(other);
119  }
120 
125 
129  ::ad::map::point::ENUHeading heading{std::numeric_limits<double>::quiet_NaN()};
130 
135 
139  ::ad::physics::Dimension3D dimension;
140 };
141 
142 } // namespace match
143 } // namespace map
144 } // namespace ad
145 
149 #ifndef GEN_GUARD_AD_MAP_MATCH_ENUOBJECTPOSITION
150 #define GEN_GUARD_AD_MAP_MATCH_ENUOBJECTPOSITION
151 
154 namespace ad {
158 namespace map {
164 namespace match {
165 
175 inline std::ostream &operator<<(std::ostream &os, ENUObjectPosition const &_value)
176 {
177  os << "ENUObjectPosition(";
178  os << "centerPoint:";
179  os << _value.centerPoint;
180  os << ",";
181  os << "heading:";
182  os << _value.heading;
183  os << ",";
184  os << "enuReferencePoint:";
185  os << _value.enuReferencePoint;
186  os << ",";
187  os << "dimension:";
188  os << _value.dimension;
189  os << ")";
190  return os;
191 }
192 
193 } // namespace match
194 } // namespace map
195 } // namespace ad
196 
197 namespace std {
201 inline std::string to_string(::ad::map::match::ENUObjectPosition const &value)
202 {
203  stringstream sstream;
204  sstream << value;
205  return sstream.str();
206 }
207 } // namespace std
208 #endif // GEN_GUARD_AD_MAP_MATCH_ENUOBJECTPOSITION
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
GeoPoint.hpp
ENUHeading.hpp
ad::map::match::ENUObjectPosition::operator!=
bool operator!=(const ENUObjectPosition &other) const
standard comparison operator
Definition: ENUObjectPosition.hpp:116
ad::map::match::ENUObjectPosition::enuReferencePoint
::ad::map::point::GeoPoint enuReferencePoint
Definition: ENUObjectPosition.hpp:134
ad::map::point::GeoPoint
DataType GeoPoint.
Definition: GeoPoint.hpp:47
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::ENUObjectPosition::~ENUObjectPosition
~ENUObjectPosition()=default
standard destructor
ad::map::match::ENUObjectPosition::operator=
ENUObjectPosition & operator=(const ENUObjectPosition &other)=default
standard assignment operator
ad::map::point::ENUPoint
DataType ENUPoint.
Definition: ENUPoint.hpp:51
ad::map::match::ENUObjectPosition::heading
::ad::map::point::ENUHeading heading
Definition: ENUObjectPosition.hpp:129
ad::map::match::ENUObjectPosition::dimension
::ad::physics::Dimension3D dimension
Definition: ENUObjectPosition.hpp:139
ad::map::point::ENUHeading
DataType ENUHeading.
Definition: ENUHeading.hpp:65
ad::map::match::ENUObjectPosition::Ptr
std::shared_ptr< ENUObjectPosition > Ptr
Smart pointer on ENUObjectPosition.
Definition: ENUObjectPosition.hpp:51
ad::map::match::ENUObjectPosition::ENUObjectPosition
ENUObjectPosition()=default
standard constructor
ad::map::match::operator<<
std::ostream & operator<<(std::ostream &os, ENUObjectPosition const &_value)
standard ostream operator
Definition: ENUObjectPosition.hpp:175
ad::map::match::ENUObjectPosition
DataType ENUObjectPosition.
Definition: ENUObjectPosition.hpp:46
ad::map::match::ENUObjectPosition::operator==
bool operator==(const ENUObjectPosition &other) const
standard comparison operator
Definition: ENUObjectPosition.hpp:103
ENUPoint.hpp
ad::map::match::ENUObjectPosition::centerPoint
::ad::map::point::ENUPoint centerPoint
Definition: ENUObjectPosition.hpp:124
ad::map::match::ENUObjectPosition::ConstPtr
std::shared_ptr< ENUObjectPosition const > ConstPtr
Smart pointer on constant ENUObjectPosition.
Definition: ENUObjectPosition.hpp:56