ad_map_access
ContactOperation.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: MIT
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
15 #include "ad/map/lane/Types.hpp"
17 
19 namespace ad {
21 namespace map {
23 namespace lane {
24 
31 {
32  switch (e)
33  {
41  return ContactLocation::LEFT;
48  default:
50  }
51 }
52 
59 inline bool isAccessOk(ContactLane const &contactLane, restriction::VehicleDescriptor const &vehicle)
60 {
61  return restriction::isAccessOk(contactLane.restrictions, vehicle);
62 }
63 
69 inline bool isValid(ContactLane const &contactLane, bool const logErrors = true)
70 {
71  return withinValidInputRange(contactLane, logErrors);
72 }
73 
74 } // namespace lane
75 } // namespace map
76 } // namespace ad
ad::map::lane::ContactLocation::PREDECESSOR
@ PREDECESSOR
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ad::map::lane::ContactLocation::RIGHT
@ RIGHT
ad::map::lane::ContactLocation::UNKNOWN
@ UNKNOWN
ContactLaneValidInputRange.hpp
RestrictionOperation.hpp
ad::map::lane::ContactLocation
ContactLocation
DataType ContactLocation.
Definition: ContactLocation.hpp:43
ad::map::lane::ContactLocation::INVALID
@ INVALID
ad::map::lane::ContactLane::restrictions
::ad::map::restriction::Restrictions restrictions
Definition: ContactLane.hpp:140
withinValidInputRange
bool withinValidInputRange(::ad::map::access::MapMetaData const &input, bool const logErrors=true)
check if the given MapMetaData is within valid input range
Definition: MapMetaDataValidInputRange.hpp:37
ad::map::restriction::isAccessOk
bool isAccessOk(Restriction const &restriction, VehicleDescriptor const &vehicle)
Checks if restriction allows vehicle at this object.
ad::map::restriction::VehicleDescriptor
DataType VehicleDescriptor.
Definition: VehicleDescriptor.hpp:46
ad::map::lane::ContactLocation::SUCCESSOR
@ SUCCESSOR
ad::map::lane::isValid
bool isValid(ContactLane const &contactLane, bool const logErrors=true)
checks if the given ContactLane is valid
Definition: ContactOperation.hpp:69
Types.hpp
ad::map::lane::ContactLane
DataType ContactLane.
Definition: ContactLane.hpp:47
ad::map::lane::ContactLocation::OVERLAP
@ OVERLAP
ad::map::lane::isAccessOk
bool isAccessOk(ContactLane const &contactLane, restriction::VehicleDescriptor const &vehicle)
Checks if vehicle fits the restriction criteria of the contact lane.
Definition: ContactOperation.hpp:59
ad::map::lane::oppositeLocation
ContactLocation oppositeLocation(ContactLocation const &e)
Provides opposite Location.
Definition: ContactOperation.hpp:30
ad::map::lane::ContactLocation::LEFT
@ LEFT