LCOV - code coverage report
Current view: top level - generated/include/ad/map/match - MapMatchedObjectReferencePositionListValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 8 9 88.9 %
Date: 2022-10-04 09:48:07 Functions: 1 1 100.0 %
Branches: 7 16 43.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: 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/match/MapMatchedObjectReferencePositionList.hpp"
      23                 :            : #include "ad/map/match/MapMatchedPositionConfidenceListValidInputRange.hpp"
      24                 :            : #include "spdlog/fmt/ostr.h"
      25                 :            : #include "spdlog/spdlog.h"
      26                 :            : 
      27                 :            : /*!
      28                 :            :  * \brief check if the given MapMatchedObjectReferencePositionList is within valid input range
      29                 :            :  *
      30                 :            :  * \param[in] input the MapMatchedObjectReferencePositionList as an input value
      31                 :            :  * \param[in] logErrors enables error logging
      32                 :            :  *
      33                 :            :  * \returns \c true if MapMatchedObjectReferencePositionList 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                 :         12 : inline bool withinValidInputRange(::ad::map::match::MapMatchedObjectReferencePositionList const &input,
      40                 :            :                                   bool const logErrors = true)
      41                 :            : {
      42                 :            :   (void)input;
      43                 :            :   (void)logErrors;
      44                 :         12 :   bool inValidInputRange = true;
      45                 :            : 
      46         [ +  - ]:         12 :   if (inValidInputRange)
      47                 :            :   {
      48         [ +  + ]:         19 :     for (auto const &member : input)
      49                 :            :     {
      50         [ +  - ]:          7 :       bool memberInValidInputRange = withinValidInputRange(member, logErrors);
      51   [ +  -  +  - ]:          7 :       inValidInputRange = inValidInputRange && memberInValidInputRange;
      52   [ -  +  -  - ]:          7 :       if (!memberInValidInputRange && logErrors)
      53                 :            :       {
      54         [ #  # ]:          0 :         spdlog::error(
      55                 :            :           "withinValidInputRange(::ad::map::match::MapMatchedObjectReferencePositionList)>> {}, invalid member {}",
      56                 :            :           input,
      57                 :            :           member); // LCOV_EXCL_BR_LINE
      58                 :            :       }
      59                 :            :     }
      60                 :            :   }
      61                 :         12 :   return inValidInputRange;
      62                 :            : }

Generated by: LCOV version 1.14