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/LanePointValidInputRange.hpp" 23 : : #include "ad/map/match/MapMatchedPosition.hpp" 24 : : #include "ad/map/match/MapMatchedPositionTypeValidInputRange.hpp" 25 : : #include "ad/map/point/ECEFPointValidInputRange.hpp" 26 : : #include "ad/physics/DistanceValidInputRange.hpp" 27 : : #include "ad/physics/ProbabilityValidInputRange.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given MapMatchedPosition is within valid input range 33 : : * 34 : : * \param[in] input the MapMatchedPosition as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if MapMatchedPosition is considered to be within the specified input range 38 : : * 39 : : * \note the specified input range is defined by the ranges of all members 40 : : */ 41 : 24 : inline bool withinValidInputRange(::ad::map::match::MapMatchedPosition const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 24 : bool inValidInputRange = true; 45 [ + + ]: 43 : inValidInputRange = withinValidInputRange(input.lanePoint, logErrors) && withinValidInputRange(input.type, logErrors) 46 [ + + + + ]: 17 : && withinValidInputRange(input.matchedPoint, logErrors) && withinValidInputRange(input.probability, logErrors) 47 [ + + ]: 13 : && withinValidInputRange(input.queryPoint, logErrors) 48 [ + + + + ]: 43 : && withinValidInputRange(input.matchedPointDistance, logErrors); 49 [ + + + - ]: 24 : if (!inValidInputRange && logErrors) 50 : : { 51 [ + - ]: 15 : spdlog::error("withinValidInputRange(::ad::map::match::MapMatchedPosition)>> {} has invalid member", 52 : : input); // LCOV_EXCL_BR_LINE 53 : : } 54 : : 55 : 24 : return inValidInputRange; 56 : : }