Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2022 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: LGPL-2.1-only 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-2046 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <cmath> 21 : : #include <limits> 22 : : #include "ad/physics/DistanceValidInputRange.hpp" 23 : : #include "ad/rss/world/LaneSegmentVectorValidInputRange.hpp" 24 : : #include "ad/rss/world/RoadSegment.hpp" 25 : : #include "ad/rss/world/RoadSegmentTypeValidInputRange.hpp" 26 : : #include "spdlog/fmt/ostr.h" 27 : : #include "spdlog/spdlog.h" 28 : : 29 : : /*! 30 : : * \brief check if the given RoadSegment is within valid input range 31 : : * 32 : : * \param[in] input the RoadSegment as an input value 33 : : * \param[in] logErrors enables error logging 34 : : * 35 : : * \returns \c true if RoadSegment 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 : 23636 : inline bool withinValidInputRange(::ad::rss::world::RoadSegment const &input, bool const logErrors = true) 40 : : { 41 : : // check for generic member input ranges 42 : 23636 : bool inValidInputRange = true; 43 : 23636 : inValidInputRange = withinValidInputRange(input.type, logErrors) 44 [ + + ]: 23584 : && withinValidInputRange(input.lane_segments, logErrors) 45 [ + + ]: 23578 : && withinValidInputRange(input.minimum_length_after_intersecting_area, logErrors) 46 [ + + + + ]: 47220 : && withinValidInputRange(input.minimum_length_before_intersecting_area, logErrors); 47 [ + + + - ]: 23636 : if (!inValidInputRange && logErrors) 48 : : { 49 [ + - ]: 62 : spdlog::error("withinValidInputRange(::ad::rss::world::RoadSegment)>> {} has invalid member", 50 : : input); // LCOV_EXCL_BR_LINE 51 : : } 52 : : 53 : 23636 : return inValidInputRange; 54 : : }