LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - SceneValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 11 11 100.0 %
Date: 2024-05-02 12:32:33 Functions: 1 1 100.0 %
Branches: 16 18 88.9 %

           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/situation/SituationTypeValidInputRange.hpp"
      23                 :            : #include "ad/rss/world/ObjectValidInputRange.hpp"
      24                 :            : #include "ad/rss/world/RoadAreaValidInputRange.hpp"
      25                 :            : #include "ad/rss/world/RssDynamicsValidInputRange.hpp"
      26                 :            : #include "ad/rss/world/Scene.hpp"
      27                 :            : #include "spdlog/fmt/ostr.h"
      28                 :            : #include "spdlog/spdlog.h"
      29                 :            : 
      30                 :            : /*!
      31                 :            :  * \brief check if the given Scene is within valid input range
      32                 :            :  *
      33                 :            :  * \param[in] input the Scene as an input value
      34                 :            :  * \param[in] logErrors enables error logging
      35                 :            :  *
      36                 :            :  * \returns \c true if Scene is considered to be within the specified input range
      37                 :            :  *
      38                 :            :  * \note the specified input range is defined by the ranges of all members
      39                 :            :  */
      40                 :       7048 : inline bool withinValidInputRange(::ad::rss::world::Scene const &input, bool const logErrors = true)
      41                 :            : {
      42                 :            :   // check for generic member input ranges
      43                 :       7048 :   bool inValidInputRange = true;
      44                 :       7048 :   inValidInputRange = withinValidInputRange(input.situationType, logErrors)
      45         [ +  + ]:       6046 :     && withinValidInputRange(input.egoVehicle, logErrors)
      46   [ +  +  +  + ]:       6036 :     && withinValidInputRange(input.egoVehicleRssDynamics, logErrors) && withinValidInputRange(input.object, logErrors)
      47         [ +  + ]:       6027 :     && withinValidInputRange(input.objectRssDynamics, logErrors)
      48         [ +  - ]:       6025 :     && withinValidInputRange(input.intersectingRoad, logErrors)
      49   [ +  +  +  + ]:      13094 :     && withinValidInputRange(input.egoVehicleRoad, logErrors);
      50   [ +  +  +  - ]:       7048 :   if (!inValidInputRange && logErrors)
      51                 :            :   {
      52                 :       1027 :     spdlog::error("withinValidInputRange(::ad::rss::world::Scene)>> {} has invalid member", input); // LCOV_EXCL_BR_LINE
      53                 :            :   }
      54                 :            : 
      55                 :       7048 :   return inValidInputRange;
      56                 :            : }

Generated by: LCOV version 1.14