LCOV - code coverage report
Current view: top level - generated/include/ad/rss/state - HeadingRangeVectorValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 9 9 100.0 %
Date: 2024-05-08 22:46:37 Functions: 1 1 100.0 %
Branches: 11 16 68.8 %

           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/rss/state/HeadingRangeValidInputRange.hpp"
      23                 :            : #include "ad/rss/state/HeadingRangeVector.hpp"
      24                 :            : #include "spdlog/fmt/ostr.h"
      25                 :            : #include "spdlog/spdlog.h"
      26                 :            : 
      27                 :            : /*!
      28                 :            :  * \brief check if the given HeadingRangeVector is within valid input range
      29                 :            :  *
      30                 :            :  * \param[in] input the HeadingRangeVector as an input value
      31                 :            :  * \param[in] logErrors enables error logging
      32                 :            :  *
      33                 :            :  * \returns \c true if HeadingRangeVector is considered to be within the specified input range
      34                 :            :  *
      35                 :            :  * \note the specified input range is defined by
      36                 :            :  *       0 <= \c input.size() <= 0
      37                 :            :  *       and the ranges of all vector elements
      38                 :            :  */
      39                 :          8 : inline bool withinValidInputRange(::ad::rss::state::HeadingRangeVector const &input, bool const logErrors = true)
      40                 :            : {
      41                 :          8 :   bool inValidInputRange = true;
      42                 :            : 
      43         [ +  - ]:          8 :   if (inValidInputRange)
      44                 :            :   {
      45         [ +  + ]:         15 :     for (auto const &member : input)
      46                 :            :     {
      47         [ +  - ]:          7 :       bool memberInValidInputRange = withinValidInputRange(member, logErrors);
      48   [ +  -  +  + ]:          7 :       inValidInputRange = inValidInputRange && memberInValidInputRange;
      49   [ +  +  +  - ]:          7 :       if (!memberInValidInputRange && logErrors)
      50                 :            :       {
      51         [ +  - ]:          1 :         spdlog::error("withinValidInputRange(::ad::rss::state::HeadingRangeVector)>> {}, invalid member {}",
      52                 :            :                       input,
      53                 :            :                       member); // LCOV_EXCL_BR_LINE
      54                 :            :       }
      55                 :            :     }
      56                 :            :   }
      57                 :          8 :   return inValidInputRange;
      58                 :            : }

Generated by: LCOV version 1.14