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/landmark/LandmarkIdValidInputRange.hpp" 23 : : #include "ad/map/lane/ContactLane.hpp" 24 : : #include "ad/map/lane/ContactLocationValidInputRange.hpp" 25 : : #include "ad/map/lane/ContactTypeListValidInputRange.hpp" 26 : : #include "ad/map/lane/LaneIdValidInputRange.hpp" 27 : : #include "ad/map/restriction/RestrictionsValidInputRange.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given ContactLane is within valid input range 33 : : * 34 : : * \param[in] input the ContactLane as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if ContactLane 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 : 63 : inline bool withinValidInputRange(::ad::map::lane::ContactLane const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 63 : bool inValidInputRange = true; 45 [ + + ]: 125 : inValidInputRange = withinValidInputRange(input.toLane, logErrors) && withinValidInputRange(input.location, logErrors) 46 [ + - + - ]: 60 : && withinValidInputRange(input.types, logErrors) && withinValidInputRange(input.restrictions, logErrors) 47 [ + + + - ]: 125 : && withinValidInputRange(input.trafficLightId, logErrors); 48 [ + + + - ]: 63 : if (!inValidInputRange && logErrors) 49 : : { 50 [ + - ]: 3 : spdlog::error("withinValidInputRange(::ad::map::lane::ContactLane)>> {} has invalid member", 51 : : input); // LCOV_EXCL_BR_LINE 52 : : } 53 : : 54 : 63 : return inValidInputRange; 55 : : }