LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - LaneSegmentValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 8 8 100.0 %
Date: 2024-04-30 13:12:49 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/MetricRangeValidInputRange.hpp"
      23                 :            : #include "ad/rss/world/LaneDrivingDirectionValidInputRange.hpp"
      24                 :            : #include "ad/rss/world/LaneSegment.hpp"
      25                 :            : #include "ad/rss/world/LaneSegmentTypeValidInputRange.hpp"
      26                 :            : #include "spdlog/fmt/ostr.h"
      27                 :            : #include "spdlog/spdlog.h"
      28                 :            : 
      29                 :            : /*!
      30                 :            :  * \brief check if the given LaneSegment is within valid input range
      31                 :            :  *
      32                 :            :  * \param[in] input the LaneSegment as an input value
      33                 :            :  * \param[in] logErrors enables error logging
      34                 :            :  *
      35                 :            :  * \returns \c true if LaneSegment 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                 :     135080 : inline bool withinValidInputRange(::ad::rss::world::LaneSegment const &input, bool const logErrors = true)
      40                 :            : {
      41                 :            :   // check for generic member input ranges
      42                 :     135080 :   bool inValidInputRange = true;
      43                 :     135080 :   inValidInputRange = withinValidInputRange(input.type, logErrors)
      44   [ +  +  +  + ]:     135076 :     && withinValidInputRange(input.drivingDirection, logErrors) && withinValidInputRange(input.length, logErrors)
      45   [ +  +  +  + ]:     270156 :     && withinValidInputRange(input.width, logErrors);
      46   [ +  +  +  - ]:     135080 :   if (!inValidInputRange && logErrors)
      47                 :            :   {
      48         [ +  - ]:         12 :     spdlog::error("withinValidInputRange(::ad::rss::world::LaneSegment)>> {} has invalid member",
      49                 :            :                   input); // LCOV_EXCL_BR_LINE
      50                 :            :   }
      51                 :            : 
      52                 :     135080 :   return inValidInputRange;
      53                 :            : }

Generated by: LCOV version 1.14