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/ENULandmark.hpp" 23 : : #include "ad/map/landmark/LandmarkIdValidInputRange.hpp" 24 : : #include "ad/map/landmark/LandmarkTypeValidInputRange.hpp" 25 : : #include "ad/map/landmark/TrafficLightTypeValidInputRange.hpp" 26 : : #include "ad/map/point/ENUHeadingValidInputRange.hpp" 27 : : #include "ad/map/point/ENUPointValidInputRange.hpp" 28 : : #include "spdlog/fmt/ostr.h" 29 : : #include "spdlog/spdlog.h" 30 : : 31 : : /*! 32 : : * \brief check if the given ENULandmark is within valid input range 33 : : * 34 : : * \param[in] input the ENULandmark as an input value 35 : : * \param[in] logErrors enables error logging 36 : : * 37 : : * \returns \c true if ENULandmark 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 : 12 : inline bool withinValidInputRange(::ad::map::landmark::ENULandmark const &input, bool const logErrors = true) 42 : : { 43 : : // check for generic member input ranges 44 : 12 : bool inValidInputRange = true; 45 [ + + ]: 24 : inValidInputRange = withinValidInputRange(input.id, logErrors) && withinValidInputRange(input.type, logErrors) 46 [ + + + + ]: 9 : && withinValidInputRange(input.position, logErrors) && withinValidInputRange(input.heading, logErrors) 47 [ + - + + ]: 24 : && withinValidInputRange(input.trafficLightType, logErrors); 48 [ + + + - ]: 12 : if (!inValidInputRange && logErrors) 49 : : { 50 [ + - ]: 10 : spdlog::error("withinValidInputRange(::ad::map::landmark::ENULandmark)>> {} has invalid member", 51 : : input); // LCOV_EXCL_BR_LINE 52 : : } 53 : : 54 : 12 : return inValidInputRange; 55 : : }