LCOV - code coverage report
Current view: top level - generated/include/ad/map/lane - LaneValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 13 13 100.0 %
Date: 2022-10-04 09:48:07 Functions: 1 1 100.0 %
Branches: 27 32 84.4 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2020 Intel Corporation
       5                 :            :  *
       6                 :            :  * SPDX-License-Identifier: MIT
       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/map/landmark/LandmarkIdListValidInputRange.hpp"
      23                 :            : #include "ad/map/lane/ContactLaneListValidInputRange.hpp"
      24                 :            : #include "ad/map/lane/Lane.hpp"
      25                 :            : #include "ad/map/lane/LaneDirectionValidInputRange.hpp"
      26                 :            : #include "ad/map/lane/LaneIdValidInputRange.hpp"
      27                 :            : #include "ad/map/lane/LaneTypeValidInputRange.hpp"
      28                 :            : #include "ad/map/point/BoundingSphereValidInputRange.hpp"
      29                 :            : #include "ad/map/point/GeometryValidInputRange.hpp"
      30                 :            : #include "ad/map/restriction/RestrictionsValidInputRange.hpp"
      31                 :            : #include "ad/map/restriction/SpeedLimitListValidInputRange.hpp"
      32                 :            : #include "ad/physics/DistanceValidInputRange.hpp"
      33                 :            : #include "ad/physics/MetricRangeValidInputRange.hpp"
      34                 :            : #include "spdlog/fmt/ostr.h"
      35                 :            : #include "spdlog/spdlog.h"
      36                 :            : 
      37                 :            : /*!
      38                 :            :  * \brief check if the given Lane is within valid input range
      39                 :            :  *
      40                 :            :  * \param[in] input the Lane as an input value
      41                 :            :  * \param[in] logErrors enables error logging
      42                 :            :  *
      43                 :            :  * \returns \c true if Lane is considered to be within the specified input range
      44                 :            :  *
      45                 :            :  * \note the specified input range is defined by the ranges of all members
      46                 :            :  */
      47                 :         70 : inline bool withinValidInputRange(::ad::map::lane::Lane const &input, bool const logErrors = true)
      48                 :            : {
      49                 :            :   // check for generic member input ranges
      50                 :         70 :   bool inValidInputRange = true;
      51         [ +  + ]:        138 :   inValidInputRange = withinValidInputRange(input.id, logErrors) && withinValidInputRange(input.type, logErrors)
      52   [ +  +  +  - ]:         66 :     && withinValidInputRange(input.direction, logErrors) && withinValidInputRange(input.restrictions, logErrors)
      53   [ +  +  +  + ]:         64 :     && withinValidInputRange(input.length, logErrors) && withinValidInputRange(input.lengthRange, logErrors)
      54   [ +  +  +  + ]:         60 :     && withinValidInputRange(input.width, logErrors) && withinValidInputRange(input.widthRange, logErrors)
      55   [ +  -  +  + ]:         56 :     && withinValidInputRange(input.speedLimits, logErrors) && withinValidInputRange(input.edgeLeft, logErrors)
      56   [ +  +  +  - ]:         54 :     && withinValidInputRange(input.edgeRight, logErrors) && withinValidInputRange(input.contactLanes, logErrors)
      57         [ +  + ]:         52 :     && withinValidInputRange(input.boundingSphere, logErrors)
      58   [ +  +  +  - ]:        138 :     && withinValidInputRange(input.visibleLandmarks, logErrors);
      59   [ +  +  +  - ]:         70 :   if (!inValidInputRange && logErrors)
      60                 :            :   {
      61                 :         20 :     spdlog::error("withinValidInputRange(::ad::map::lane::Lane)>> {} has invalid member", input); // LCOV_EXCL_BR_LINE
      62                 :            :   }
      63                 :            : 
      64                 :         70 :   return inValidInputRange;
      65                 :            : }

Generated by: LCOV version 1.14