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

           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/DistanceValidInputRange.hpp"
      23                 :            : #include "ad/rss/situation/LateralRelativePositionValidInputRange.hpp"
      24                 :            : #include "ad/rss/situation/LongitudinalRelativePositionValidInputRange.hpp"
      25                 :            : #include "ad/rss/situation/RelativePosition.hpp"
      26                 :            : #include "spdlog/fmt/ostr.h"
      27                 :            : #include "spdlog/spdlog.h"
      28                 :            : 
      29                 :            : /*!
      30                 :            :  * \brief check if the given RelativePosition is within valid input range
      31                 :            :  *
      32                 :            :  * \param[in] input the RelativePosition as an input value
      33                 :            :  * \param[in] logErrors enables error logging
      34                 :            :  *
      35                 :            :  * \returns \c true if RelativePosition is considered to be within the specified input range
      36                 :            :  *
      37                 :            :  * \note the specified input range is defined by the ranges of all members
      38                 :            :  */
      39                 :      56140 : inline bool withinValidInputRange(::ad::rss::situation::RelativePosition const &input, bool const logErrors = true)
      40                 :            : {
      41                 :            :   // check for generic member input ranges
      42                 :      56140 :   bool inValidInputRange = true;
      43                 :      56140 :   inValidInputRange = withinValidInputRange(input.longitudinalPosition, logErrors)
      44         [ +  + ]:      56136 :     && withinValidInputRange(input.longitudinalDistance, logErrors)
      45         [ +  + ]:      56133 :     && withinValidInputRange(input.lateralPosition, logErrors)
      46   [ +  +  +  + ]:     112276 :     && withinValidInputRange(input.lateralDistance, logErrors);
      47   [ +  +  +  - ]:      56140 :   if (!inValidInputRange && logErrors)
      48                 :            :   {
      49         [ +  - ]:         12 :     spdlog::error("withinValidInputRange(::ad::rss::situation::RelativePosition)>> {} has invalid member",
      50                 :            :                   input); // LCOV_EXCL_BR_LINE
      51                 :            :   }
      52                 :            : 
      53                 :      56140 :   return inValidInputRange;
      54                 :            : }

Generated by: LCOV version 1.14