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/LaneType.hpp" 23 : : #include "spdlog/fmt/ostr.h" 24 : : #include "spdlog/spdlog.h" 25 : : 26 : : /*! 27 : : * \brief check if the given LaneType is within valid input range 28 : : * 29 : : * \param[in] input the LaneType as an input value 30 : : * \param[in] logErrors enables error logging 31 : : * 32 : : * \returns \c true if LaneType 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 : 80 : inline bool withinValidInputRange(::ad::map::lane::LaneType const &input, bool const logErrors = true) 37 : : { 38 : 160 : bool inValidInputRange = (input == ::ad::map::lane::LaneType::INVALID) 39 [ + + + + ]: 62 : || (input == ::ad::map::lane::LaneType::UNKNOWN) || (input == ::ad::map::lane::LaneType::NORMAL) 40 [ + + + + ]: 29 : || (input == ::ad::map::lane::LaneType::INTERSECTION) || (input == ::ad::map::lane::LaneType::SHOULDER) 41 [ + + + + ]: 18 : || (input == ::ad::map::lane::LaneType::EMERGENCY) || (input == ::ad::map::lane::LaneType::MULTI) 42 [ + + + + ]: 7 : || (input == ::ad::map::lane::LaneType::PEDESTRIAN) || (input == ::ad::map::lane::LaneType::OVERTAKING) 43 [ + + + + : 142 : || (input == ::ad::map::lane::LaneType::TURN) || (input == ::ad::map::lane::LaneType::BIKE); + + ] 44 [ + + + - ]: 80 : if (!inValidInputRange && logErrors) 45 : : { 46 [ + - ]: 3 : spdlog::error("withinValidInputRange(::ad::map::lane::LaneType)>> {}, raw value: {} ", 47 : : input, 48 : 6 : static_cast<int32_t>(input)); // LCOV_EXCL_BR_LINE 49 : : } 50 : 80 : return inValidInputRange; 51 : : }