ad_map_access
Object.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 <memory>
22 #include <sstream>
28 namespace ad {
32 namespace map {
38 namespace match {
39 
43 struct Object
44 {
48  typedef std::shared_ptr<Object> Ptr;
49 
53  typedef std::shared_ptr<Object const> ConstPtr;
54 
58  Object() = default;
59 
63  ~Object() = default;
64 
68  Object(const Object &other) = default;
69 
73  Object(Object &&other) = default;
74 
82  Object &operator=(const Object &other) = default;
83 
91  Object &operator=(Object &&other) = default;
92 
100  bool operator==(const Object &other) const
101  {
102  return (enuPosition == other.enuPosition) && (mapMatchedBoundingBox == other.mapMatchedBoundingBox);
103  }
104 
112  bool operator!=(const Object &other) const
113  {
114  return !operator==(other);
115  }
116 
121  ::ad::map::match::MapMatchedObjectBoundingBox mapMatchedBoundingBox;
122 };
123 
124 } // namespace match
125 } // namespace map
126 } // namespace ad
127 
131 #ifndef GEN_GUARD_AD_MAP_MATCH_OBJECT
132 #define GEN_GUARD_AD_MAP_MATCH_OBJECT
133 
136 namespace ad {
140 namespace map {
146 namespace match {
147 
157 inline std::ostream &operator<<(std::ostream &os, Object const &_value)
158 {
159  os << "Object(";
160  os << "enuPosition:";
161  os << _value.enuPosition;
162  os << ",";
163  os << "mapMatchedBoundingBox:";
164  os << _value.mapMatchedBoundingBox;
165  os << ")";
166  return os;
167 }
168 
169 } // namespace match
170 } // namespace map
171 } // namespace ad
172 
173 namespace std {
177 inline std::string to_string(::ad::map::match::Object const &value)
178 {
179  stringstream sstream;
180  sstream << value;
181  return sstream.str();
182 }
183 } // namespace std
184 #endif // GEN_GUARD_AD_MAP_MATCH_OBJECT
ad::map::match::Object::Ptr
std::shared_ptr< Object > Ptr
Smart pointer on Object.
Definition: Object.hpp:48
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::match::Object
DataType Object.
Definition: Object.hpp:43
MapMatchedObjectBoundingBox.hpp
ad::map::match::Object::operator==
bool operator==(const Object &other) const
standard comparison operator
Definition: Object.hpp:100
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::Object::operator=
Object & operator=(const Object &other)=default
standard assignment operator
ad::map::match::MapMatchedObjectBoundingBox
DataType MapMatchedObjectBoundingBox.
Definition: MapMatchedObjectBoundingBox.hpp:45
ENUObjectPosition.hpp
ad::map::match::Object::ConstPtr
std::shared_ptr< Object const > ConstPtr
Smart pointer on constant Object.
Definition: Object.hpp:53
ad::map::match::Object::~Object
~Object()=default
standard destructor
ad::map::match::operator<<
std::ostream & operator<<(std::ostream &os, ENUObjectPosition const &_value)
standard ostream operator
Definition: ENUObjectPosition.hpp:175
ad::map::match::Object::operator!=
bool operator!=(const Object &other) const
standard comparison operator
Definition: Object.hpp:112
ad::map::match::Object::enuPosition
::ad::map::match::ENUObjectPosition enuPosition
Definition: Object.hpp:120
ad::map::match::Object::Object
Object()=default
standard constructor
ad::map::match::ENUObjectPosition
DataType ENUObjectPosition.
Definition: ENUObjectPosition.hpp:46