ad_map_access
PointOfInterest.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>
23 #include <string>
28 namespace ad {
32 namespace map {
38 namespace config {
39 
46 {
50  typedef std::shared_ptr<PointOfInterest> Ptr;
51 
55  typedef std::shared_ptr<PointOfInterest const> ConstPtr;
56 
60  PointOfInterest() = default;
61 
65  ~PointOfInterest() = default;
66 
70  PointOfInterest(const PointOfInterest &other) = default;
71 
75  PointOfInterest(PointOfInterest &&other) = default;
76 
84  PointOfInterest &operator=(const PointOfInterest &other) = default;
85 
93  PointOfInterest &operator=(PointOfInterest &&other) = default;
94 
102  bool operator==(const PointOfInterest &other) const
103  {
104  return (geoPoint == other.geoPoint) && (name == other.name);
105  }
106 
114  bool operator!=(const PointOfInterest &other) const
115  {
116  return !operator==(other);
117  }
118 
123 
127  std::string name;
128 };
129 
130 } // namespace config
131 } // namespace map
132 } // namespace ad
133 
137 #ifndef GEN_GUARD_AD_MAP_CONFIG_POINTOFINTEREST
138 #define GEN_GUARD_AD_MAP_CONFIG_POINTOFINTEREST
139 
142 namespace ad {
146 namespace map {
152 namespace config {
153 
163 inline std::ostream &operator<<(std::ostream &os, PointOfInterest const &_value)
164 {
165  os << "PointOfInterest(";
166  os << "geoPoint:";
167  os << _value.geoPoint;
168  os << ",";
169  os << "name:";
170  os << _value.name;
171  os << ")";
172  return os;
173 }
174 
175 } // namespace config
176 } // namespace map
177 } // namespace ad
178 
179 namespace std {
183 inline std::string to_string(::ad::map::config::PointOfInterest const &value)
184 {
185  stringstream sstream;
186  sstream << value;
187  return sstream.str();
188 }
189 } // namespace std
190 #endif // GEN_GUARD_AD_MAP_CONFIG_POINTOFINTEREST
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
GeoPoint.hpp
ad::map::config::PointOfInterest::geoPoint
::ad::map::point::GeoPoint geoPoint
Definition: PointOfInterest.hpp:122
ad::map::config::PointOfInterest::operator=
PointOfInterest & operator=(const PointOfInterest &other)=default
standard assignment operator
ad::map::config::PointOfInterest::Ptr
std::shared_ptr< PointOfInterest > Ptr
Smart pointer on PointOfInterest.
Definition: PointOfInterest.hpp:50
ad::map::point::GeoPoint
DataType GeoPoint.
Definition: GeoPoint.hpp:47
ad::map::config::PointOfInterest
DataType PointOfInterest.
Definition: PointOfInterest.hpp:45
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::config::operator<<
std::ostream & operator<<(std::ostream &os, MapEntry const &_value)
standard ostream operator
Definition: MapEntry.hpp:176
ad::map::config::PointOfInterest::operator!=
bool operator!=(const PointOfInterest &other) const
standard comparison operator
Definition: PointOfInterest.hpp:114
ad::map::config::PointOfInterest::PointOfInterest
PointOfInterest()=default
standard constructor
ad::map::config::PointOfInterest::ConstPtr
std::shared_ptr< PointOfInterest const > ConstPtr
Smart pointer on constant PointOfInterest.
Definition: PointOfInterest.hpp:55
ad::map::config::PointOfInterest::operator==
bool operator==(const PointOfInterest &other) const
standard comparison operator
Definition: PointOfInterest.hpp:102
ad::map::config::PointOfInterest::~PointOfInterest
~PointOfInterest()=default
standard destructor
ad::map::config::PointOfInterest::name
std::string name
Definition: PointOfInterest.hpp:127