ad_map_access
ContactLane.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/map/lane/LaneId.hpp"
32 namespace ad {
36 namespace map {
42 namespace lane {
43 
48 {
52  typedef std::shared_ptr<ContactLane> Ptr;
53 
57  typedef std::shared_ptr<ContactLane const> ConstPtr;
58 
62  ContactLane() = default;
63 
67  ~ContactLane() = default;
68 
72  ContactLane(const ContactLane &other) = default;
73 
77  ContactLane(ContactLane &&other) = default;
78 
86  ContactLane &operator=(const ContactLane &other) = default;
87 
95  ContactLane &operator=(ContactLane &&other) = default;
96 
104  bool operator==(const ContactLane &other) const
105  {
106  return (toLane == other.toLane) && (location == other.location) && (types == other.types)
107  && (restrictions == other.restrictions) && (trafficLightId == other.trafficLightId);
108  }
109 
117  bool operator!=(const ContactLane &other) const
118  {
119  return !operator==(other);
120  }
121 
126 
131 
136 
141 
147 };
148 
149 } // namespace lane
150 } // namespace map
151 } // namespace ad
152 
156 #ifndef GEN_GUARD_AD_MAP_LANE_CONTACTLANE
157 #define GEN_GUARD_AD_MAP_LANE_CONTACTLANE
158 
161 namespace ad {
165 namespace map {
171 namespace lane {
172 
182 inline std::ostream &operator<<(std::ostream &os, ContactLane const &_value)
183 {
184  os << "ContactLane(";
185  os << "toLane:";
186  os << _value.toLane;
187  os << ",";
188  os << "location:";
189  os << _value.location;
190  os << ",";
191  os << "types:";
192  os << _value.types;
193  os << ",";
194  os << "restrictions:";
195  os << _value.restrictions;
196  os << ",";
197  os << "trafficLightId:";
198  os << _value.trafficLightId;
199  os << ")";
200  return os;
201 }
202 
203 } // namespace lane
204 } // namespace map
205 } // namespace ad
206 
207 namespace std {
211 inline std::string to_string(::ad::map::lane::ContactLane const &value)
212 {
213  stringstream sstream;
214  sstream << value;
215  return sstream.str();
216 }
217 } // namespace std
218 #endif // GEN_GUARD_AD_MAP_LANE_CONTACTLANE
ad::map::lane::ContactLane::operator!=
bool operator!=(const ContactLane &other) const
standard comparison operator
Definition: ContactLane.hpp:117
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::lane::ContactLane::operator==
bool operator==(const ContactLane &other) const
standard comparison operator
Definition: ContactLane.hpp:104
ContactLocation.hpp
ad::map::lane::ContactLane::toLane
::ad::map::lane::LaneId toLane
Definition: ContactLane.hpp:125
ad::map::lane::ContactLane::trafficLightId
::ad::map::landmark::LandmarkId trafficLightId
Definition: ContactLane.hpp:146
ad::map::restriction::Restrictions
DataType Restrictions.
Definition: Restrictions.hpp:42
Restrictions.hpp
ad::map::lane::ContactLocation
ContactLocation
DataType ContactLocation.
Definition: ContactLocation.hpp:43
ad::map::landmark::LandmarkId
DataType LandmarkId.
Definition: LandmarkId.hpp:66
ad::map::lane::ContactLocation::INVALID
@ INVALID
ad::map::lane::ContactLane::restrictions
::ad::map::restriction::Restrictions restrictions
Definition: ContactLane.hpp:140
ad::map::lane::ContactTypeList
std::vector<::ad::map::lane::ContactType > ContactTypeList
DataType ContactTypeList.
Definition: ContactTypeList.hpp:44
ad::map::lane::ContactLane::~ContactLane
~ContactLane()=default
standard destructor
ad::map::lane::ContactLane::ContactLane
ContactLane()=default
standard constructor
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::lane::ContactLane::ConstPtr
std::shared_ptr< ContactLane const > ConstPtr
Smart pointer on constant ContactLane.
Definition: ContactLane.hpp:57
ad::map::lane::LaneId
DataType LaneId.
Definition: LaneId.hpp:66
LaneId.hpp
LandmarkId.hpp
ad::map::lane::operator<<
std::ostream & operator<<(std::ostream &os, ContactLane const &_value)
standard ostream operator
Definition: ContactLane.hpp:182
ad::map::lane::ContactLane
DataType ContactLane.
Definition: ContactLane.hpp:47
ad::map::lane::ContactLane::types
::ad::map::lane::ContactTypeList types
Definition: ContactLane.hpp:135
ad::map::lane::ContactLane::Ptr
std::shared_ptr< ContactLane > Ptr
Smart pointer on ContactLane.
Definition: ContactLane.hpp:52
ad::map::lane::ContactLane::location
::ad::map::lane::ContactLocation location
Definition: ContactLane.hpp:130
ad::map::lane::ContactLane::operator=
ContactLane & operator=(const ContactLane &other)=default
standard assignment operator
ContactTypeList.hpp