Branch data Line data Source code
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 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-1997 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <cmath> 21 : : #include <limits> 22 : : #include "ad/map/match/LaneOccupiedRegionListValidInputRange.hpp" 23 : : #include "ad/map/match/MapMatchedObjectBoundingBox.hpp" 24 : : #include "ad/map/match/MapMatchedObjectReferencePositionListValidInputRange.hpp" 25 : : #include "ad/physics/DistanceValidInputRange.hpp" 26 : : #include "spdlog/fmt/ostr.h" 27 : : #include "spdlog/spdlog.h" 28 : : 29 : : /*! 30 : : * \brief check if the given MapMatchedObjectBoundingBox is within valid input range 31 : : * 32 : : * \param[in] input the MapMatchedObjectBoundingBox as an input value 33 : : * \param[in] logErrors enables error logging 34 : : * 35 : : * \returns \c true if MapMatchedObjectBoundingBox is considered to be within the specified input range 36 : : * 37 : : * \note the specified input range is defined by the ranges of all members 38 : : */ 39 : 10 : inline bool withinValidInputRange(::ad::map::match::MapMatchedObjectBoundingBox const &input, 40 : : bool const logErrors = true) 41 : : { 42 : : // check for generic member input ranges 43 : 10 : bool inValidInputRange = true; 44 : 10 : inValidInputRange = withinValidInputRange(input.laneOccupiedRegions, logErrors) 45 [ + - ]: 10 : && withinValidInputRange(input.referencePointPositions, logErrors) 46 [ + - + + : 20 : && withinValidInputRange(input.samplingDistance, logErrors) && withinValidInputRange(input.matchRadius, logErrors); + + ] 47 [ + + + - ]: 10 : if (!inValidInputRange && logErrors) 48 : : { 49 [ + - ]: 8 : spdlog::error("withinValidInputRange(::ad::map::match::MapMatchedObjectBoundingBox)>> {} has invalid member", 50 : : input); // LCOV_EXCL_BR_LINE 51 : : } 52 : : 53 : 10 : return inValidInputRange; 54 : : }