LCOV - code coverage report
Current view: top level - generated/src/ad/map/lane - ContactLocation.cpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 48 48 100.0 %
Date: 2022-10-04 09:48:07 Functions: 2 2 100.0 %
Branches: 8 8 100.0 %

           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                 :            : #include "ad/map/lane/ContactLocation.hpp"
      19                 :            : #include <stdexcept>
      20                 :            : 
      21                 :         43 : std::string toString(::ad::map::lane::ContactLocation const e)
      22                 :            : {
      23   [ +  +  +  +  :         43 :   switch (e)
             +  +  +  + ]
      24                 :            :   {
      25                 :         24 :     case ::ad::map::lane::ContactLocation::INVALID:
      26                 :         24 :       return std::string("::ad::map::lane::ContactLocation::INVALID"); // LCOV_EXCL_BR_LINE
      27                 :          1 :     case ::ad::map::lane::ContactLocation::UNKNOWN:
      28                 :          1 :       return std::string("::ad::map::lane::ContactLocation::UNKNOWN"); // LCOV_EXCL_BR_LINE
      29                 :          1 :     case ::ad::map::lane::ContactLocation::LEFT:
      30                 :          1 :       return std::string("::ad::map::lane::ContactLocation::LEFT"); // LCOV_EXCL_BR_LINE
      31                 :          1 :     case ::ad::map::lane::ContactLocation::RIGHT:
      32                 :          1 :       return std::string("::ad::map::lane::ContactLocation::RIGHT"); // LCOV_EXCL_BR_LINE
      33                 :          1 :     case ::ad::map::lane::ContactLocation::SUCCESSOR:
      34                 :          1 :       return std::string("::ad::map::lane::ContactLocation::SUCCESSOR"); // LCOV_EXCL_BR_LINE
      35                 :          1 :     case ::ad::map::lane::ContactLocation::PREDECESSOR:
      36                 :          1 :       return std::string("::ad::map::lane::ContactLocation::PREDECESSOR"); // LCOV_EXCL_BR_LINE
      37                 :          1 :     case ::ad::map::lane::ContactLocation::OVERLAP:
      38                 :          1 :       return std::string("::ad::map::lane::ContactLocation::OVERLAP"); // LCOV_EXCL_BR_LINE
      39                 :         13 :     default:
      40                 :         13 :       return std::string("UNKNOWN ENUM VALUE"); // LCOV_EXCL_BR_LINE
      41                 :            :   }
      42                 :            : }
      43                 :            : 
      44                 :         15 : template <>::ad::map::lane::ContactLocation fromString(std::string const &str)
      45                 :            : {
      46                 :         15 :   if (str == std::string("::ad::map::lane::ContactLocation::INVALID")) // LCOV_EXCL_BR_LINE
      47                 :            :   {
      48                 :          1 :     return ::ad::map::lane::ContactLocation::INVALID;
      49                 :            :   }
      50                 :         14 :   if (str == std::string("INVALID")) // LCOV_EXCL_BR_LINE
      51                 :            :   {
      52                 :          1 :     return ::ad::map::lane::ContactLocation::INVALID;
      53                 :            :   }
      54                 :         13 :   if (str == std::string("::ad::map::lane::ContactLocation::UNKNOWN")) // LCOV_EXCL_BR_LINE
      55                 :            :   {
      56                 :          1 :     return ::ad::map::lane::ContactLocation::UNKNOWN;
      57                 :            :   }
      58                 :         12 :   if (str == std::string("UNKNOWN")) // LCOV_EXCL_BR_LINE
      59                 :            :   {
      60                 :          1 :     return ::ad::map::lane::ContactLocation::UNKNOWN;
      61                 :            :   }
      62                 :         11 :   if (str == std::string("::ad::map::lane::ContactLocation::LEFT")) // LCOV_EXCL_BR_LINE
      63                 :            :   {
      64                 :          1 :     return ::ad::map::lane::ContactLocation::LEFT;
      65                 :            :   }
      66                 :         10 :   if (str == std::string("LEFT")) // LCOV_EXCL_BR_LINE
      67                 :            :   {
      68                 :          1 :     return ::ad::map::lane::ContactLocation::LEFT;
      69                 :            :   }
      70                 :          9 :   if (str == std::string("::ad::map::lane::ContactLocation::RIGHT")) // LCOV_EXCL_BR_LINE
      71                 :            :   {
      72                 :          1 :     return ::ad::map::lane::ContactLocation::RIGHT;
      73                 :            :   }
      74                 :          8 :   if (str == std::string("RIGHT")) // LCOV_EXCL_BR_LINE
      75                 :            :   {
      76                 :          1 :     return ::ad::map::lane::ContactLocation::RIGHT;
      77                 :            :   }
      78                 :          7 :   if (str == std::string("::ad::map::lane::ContactLocation::SUCCESSOR")) // LCOV_EXCL_BR_LINE
      79                 :            :   {
      80                 :          1 :     return ::ad::map::lane::ContactLocation::SUCCESSOR;
      81                 :            :   }
      82                 :          6 :   if (str == std::string("SUCCESSOR")) // LCOV_EXCL_BR_LINE
      83                 :            :   {
      84                 :          1 :     return ::ad::map::lane::ContactLocation::SUCCESSOR;
      85                 :            :   }
      86                 :          5 :   if (str == std::string("::ad::map::lane::ContactLocation::PREDECESSOR")) // LCOV_EXCL_BR_LINE
      87                 :            :   {
      88                 :          1 :     return ::ad::map::lane::ContactLocation::PREDECESSOR;
      89                 :            :   }
      90                 :          4 :   if (str == std::string("PREDECESSOR")) // LCOV_EXCL_BR_LINE
      91                 :            :   {
      92                 :          1 :     return ::ad::map::lane::ContactLocation::PREDECESSOR;
      93                 :            :   }
      94                 :          3 :   if (str == std::string("::ad::map::lane::ContactLocation::OVERLAP")) // LCOV_EXCL_BR_LINE
      95                 :            :   {
      96                 :          1 :     return ::ad::map::lane::ContactLocation::OVERLAP;
      97                 :            :   }
      98                 :          2 :   if (str == std::string("OVERLAP")) // LCOV_EXCL_BR_LINE
      99                 :            :   {
     100                 :          1 :     return ::ad::map::lane::ContactLocation::OVERLAP;
     101                 :            :   }
     102                 :          1 :   throw std::out_of_range("Invalid enum literal"); // LCOV_EXCL_BR_LINE
     103                 :            : }

Generated by: LCOV version 1.14