LCOV - code coverage report
Current view: top level - generated/include/ad/rss/situation - VelocityRangeValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 6 6 100.0 %
Date: 2024-04-16 14:13:10 Functions: 1 1 100.0 %
Branches: 8 10 80.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2020 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-1997
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <cmath>
      21                 :            : #include <limits>
      22                 :            : #include "ad/physics/SpeedRangeValidInputRange.hpp"
      23                 :            : #include "ad/rss/situation/VelocityRange.hpp"
      24                 :            : #include "spdlog/fmt/ostr.h"
      25                 :            : #include "spdlog/spdlog.h"
      26                 :            : 
      27                 :            : /*!
      28                 :            :  * \brief check if the given VelocityRange is within valid input range
      29                 :            :  *
      30                 :            :  * \param[in] input the VelocityRange as an input value
      31                 :            :  * \param[in] logErrors enables error logging
      32                 :            :  *
      33                 :            :  * \returns \c true if VelocityRange is considered to be within the specified input range
      34                 :            :  *
      35                 :            :  * \note the specified input range is defined by the ranges of all members
      36                 :            :  */
      37                 :     245535 : inline bool withinValidInputRange(::ad::rss::situation::VelocityRange const &input, bool const logErrors = true)
      38                 :            : {
      39                 :            :   // check for generic member input ranges
      40                 :     245535 :   bool inValidInputRange = true;
      41                 :            :   inValidInputRange
      42   [ +  +  +  + ]:     245535 :     = withinValidInputRange(input.speedLon, logErrors) && withinValidInputRange(input.speedLat, logErrors);
      43   [ +  +  +  - ]:     245535 :   if (!inValidInputRange && logErrors)
      44                 :            :   {
      45         [ +  - ]:         12 :     spdlog::error("withinValidInputRange(::ad::rss::situation::VelocityRange)>> {} has invalid member",
      46                 :            :                   input); // LCOV_EXCL_BR_LINE
      47                 :            :   }
      48                 :            : 
      49                 :     245535 :   return inValidInputRange;
      50                 :            : }

Generated by: LCOV version 1.14