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/map/RssConstellationCreationMode.hpp" 23 : : #include "spdlog/fmt/ostr.h" 24 : : #include "spdlog/spdlog.h" 25 : : 26 : : /*! 27 : : * \brief check if the given RssConstellationCreationMode is within valid input range 28 : : * 29 : : * \param[in] input the RssConstellationCreationMode as an input value 30 : : * \param[in] logErrors enables error logging 31 : : * 32 : : * \returns \c true if RssConstellationCreationMode is considered to be within the specified input range 33 : : * 34 : : * \note the specified input range is defined by the valid enum literals. 35 : : */ 36 : 14 : inline bool withinValidInputRange(::ad::rss::map::RssConstellationCreationMode const &input, 37 : : bool const logErrors = true) 38 : : { 39 : 28 : bool inValidInputRange = (input == ::ad::rss::map::RssConstellationCreationMode::Ignore) 40 [ + + ]: 6 : || (input == ::ad::rss::map::RssConstellationCreationMode::NotRelevant) 41 [ + + ]: 5 : || (input == ::ad::rss::map::RssConstellationCreationMode::Structured) 42 [ + + + + ]: 20 : || (input == ::ad::rss::map::RssConstellationCreationMode::Unstructured); 43 [ + + + - ]: 14 : if (!inValidInputRange && logErrors) 44 : : { 45 [ + - ]: 3 : spdlog::error("withinValidInputRange(::ad::rss::map::RssConstellationCreationMode)>> {}, raw value: {} ", 46 : : input, 47 : 6 : static_cast<int32_t>(input)); // LCOV_EXCL_BR_LINE 48 : : } 49 : 14 : return inValidInputRange; 50 : : }