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