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/rss/core/RssSituationSnapshotValidInputRange.hpp" 23 : : #include "ad/rss/map/RssRouteCheckResult.hpp" 24 : : #include "ad/rss/map/RssRouteValidInputRange.hpp" 25 : : #include "ad/rss/state/ProperResponseValidInputRange.hpp" 26 : : #include "ad/rss/state/RssStateSnapshotValidInputRange.hpp" 27 : : #include "ad/rss/world/WorldModelValidInputRange.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given RssRouteCheckResult is within valid input range 33 : : * 34 : : * \param[in] input the RssRouteCheckResult as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if RssRouteCheckResult 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 : 15 : inline bool withinValidInputRange(::ad::rss::map::RssRouteCheckResult const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 15 : bool inValidInputRange = true; 45 : 15 : inValidInputRange = withinValidInputRange(input.rss_route, logErrors) 46 [ + + ]: 12 : && withinValidInputRange(input.world_model, logErrors) 47 [ + + ]: 10 : && withinValidInputRange(input.rss_situation_snapshot, logErrors) 48 [ + + ]: 8 : && withinValidInputRange(input.rss_state_snapshot, logErrors) 49 [ + + + + ]: 27 : && withinValidInputRange(input.proper_response, logErrors); 50 [ + + + - ]: 15 : if (!inValidInputRange && logErrors) 51 : : { 52 [ + - ]: 11 : spdlog::error("withinValidInputRange(::ad::rss::map::RssRouteCheckResult)>> {} has invalid member", 53 : : input); // LCOV_EXCL_BR_LINE 54 : : } 55 : : 56 : 15 : return inValidInputRange; 57 : : }