ad_map_access
ENUEdgeCache.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 <cstdint>
21 #include <iostream>
22 #include <limits>
23 #include <memory>
24 #include <sstream>
25 #include "ad/map/point/ENUEdge.hpp"
29 namespace ad {
33 namespace map {
39 namespace point {
40 
45 {
49  typedef std::shared_ptr<ENUEdgeCache> Ptr;
50 
54  typedef std::shared_ptr<ENUEdgeCache const> ConstPtr;
55 
59  ENUEdgeCache() = default;
60 
64  ~ENUEdgeCache() = default;
65 
69  ENUEdgeCache(const ENUEdgeCache &other) = default;
70 
74  ENUEdgeCache(ENUEdgeCache &&other) = default;
75 
83  ENUEdgeCache &operator=(const ENUEdgeCache &other) = default;
84 
92  ENUEdgeCache &operator=(ENUEdgeCache &&other) = default;
93 
101  bool operator==(const ENUEdgeCache &other) const
102  {
103  return (enuEdge == other.enuEdge) && (enuVersion == other.enuVersion);
104  }
105 
113  bool operator!=(const ENUEdgeCache &other) const
114  {
115  return !operator==(other);
116  }
117 
119  uint64_t enuVersion{0};
120 };
121 
122 } // namespace point
123 } // namespace map
124 } // namespace ad
125 
129 #ifndef GEN_GUARD_AD_MAP_POINT_ENUEDGECACHE
130 #define GEN_GUARD_AD_MAP_POINT_ENUEDGECACHE
131 
134 namespace ad {
138 namespace map {
144 namespace point {
145 
155 inline std::ostream &operator<<(std::ostream &os, ENUEdgeCache const &_value)
156 {
157  os << "ENUEdgeCache(";
158  os << "enuEdge:";
159  os << _value.enuEdge;
160  os << ",";
161  os << "enuVersion:";
162  os << _value.enuVersion;
163  os << ")";
164  return os;
165 }
166 
167 } // namespace point
168 } // namespace map
169 } // namespace ad
170 
171 namespace std {
175 inline std::string to_string(::ad::map::point::ENUEdgeCache const &value)
176 {
177  stringstream sstream;
178  sstream << value;
179  return sstream.str();
180 }
181 } // namespace std
182 #endif // GEN_GUARD_AD_MAP_POINT_ENUEDGECACHE
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::point::operator<<
std::ostream & operator<<(std::ostream &os, Altitude const &_value)
standard ostream operator
Definition: Altitude.hpp:562
ad::map::point::ENUEdgeCache
DataType ENUEdgeCache.
Definition: ENUEdgeCache.hpp:44
ad::map::point::ENUEdgeCache::ConstPtr
std::shared_ptr< ENUEdgeCache const > ConstPtr
Smart pointer on constant ENUEdgeCache.
Definition: ENUEdgeCache.hpp:54
ad::map::point::ENUEdgeCache::operator=
ENUEdgeCache & operator=(const ENUEdgeCache &other)=default
standard assignment operator
ENUEdge.hpp
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::point::ENUEdgeCache::operator==
bool operator==(const ENUEdgeCache &other) const
standard comparison operator
Definition: ENUEdgeCache.hpp:101
ad::map::point::ENUEdgeCache::operator!=
bool operator!=(const ENUEdgeCache &other) const
standard comparison operator
Definition: ENUEdgeCache.hpp:113
ad::map::point::ENUEdgeCache::ENUEdgeCache
ENUEdgeCache()=default
standard constructor
ad::map::point::ENUEdgeCache::~ENUEdgeCache
~ENUEdgeCache()=default
standard destructor
ad::map::point::ENUEdgeCache::Ptr
std::shared_ptr< ENUEdgeCache > Ptr
Smart pointer on ENUEdgeCache.
Definition: ENUEdgeCache.hpp:49
ad::map::point::ENUEdge
std::vector<::ad::map::point::ENUPoint > ENUEdge
DataType ENUEdge.
Definition: ENUEdge.hpp:42