LCOV - code coverage report
Current view: top level - generated/include/ad/map/restriction - Restrictions.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 22 22 100.0 %
Date: 2022-10-04 09:48:07 Functions: 10 10 100.0 %
Branches: 8 12 66.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: 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 <iostream>
      21                 :            : #include <memory>
      22                 :            : #include <sstream>
      23                 :            : #include "ad/map/restriction/RestrictionList.hpp"
      24                 :            : /*!
      25                 :            :  * @brief namespace ad
      26                 :            :  */
      27                 :            : namespace ad {
      28                 :            : /*!
      29                 :            :  * @brief namespace map
      30                 :            :  */
      31                 :            : namespace map {
      32                 :            : /*!
      33                 :            :  * @brief namespace restriction
      34                 :            :  *
      35                 :            :  * Handling of traffic restrictions
      36                 :            :  */
      37                 :            : namespace restriction {
      38                 :            : 
      39                 :            : /*!
      40                 :            :  * \brief DataType Restrictions
      41                 :            :  */
      42                 :     118922 : struct Restrictions
      43                 :            : {
      44                 :            :   /*!
      45                 :            :    * \brief Smart pointer on Restrictions
      46                 :            :    */
      47                 :            :   typedef std::shared_ptr<Restrictions> Ptr;
      48                 :            : 
      49                 :            :   /*!
      50                 :            :    * \brief Smart pointer on constant Restrictions
      51                 :            :    */
      52                 :            :   typedef std::shared_ptr<Restrictions const> ConstPtr;
      53                 :            : 
      54                 :            :   /*!
      55                 :            :    * \brief standard constructor
      56                 :            :    */
      57                 :     434054 :   Restrictions() = default;
      58                 :            : 
      59                 :            :   /*!
      60                 :            :    * \brief standard destructor
      61                 :            :    */
      62                 :    2861217 :   ~Restrictions() = default;
      63                 :            : 
      64                 :            :   /*!
      65                 :            :    * \brief standard copy constructor
      66                 :            :    */
      67         [ +  - ]:    2057322 :   Restrictions(const Restrictions &other) = default;
      68                 :            : 
      69                 :            :   /*!
      70                 :            :    * \brief standard move constructor
      71                 :            :    */
      72                 :     369845 :   Restrictions(Restrictions &&other) = default;
      73                 :            : 
      74                 :            :   /**
      75                 :            :    * \brief standard assignment operator
      76                 :            :    *
      77                 :            :    * \param[in] other Other Restrictions
      78                 :            :    *
      79                 :            :    * \returns Reference to this Restrictions.
      80                 :            :    */
      81                 :            :   Restrictions &operator=(const Restrictions &other) = default;
      82                 :            : 
      83                 :            :   /**
      84                 :            :    * \brief standard move operator
      85                 :            :    *
      86                 :            :    * \param[in] other Other Restrictions
      87                 :            :    *
      88                 :            :    * \returns Reference to this Restrictions.
      89                 :            :    */
      90                 :            :   Restrictions &operator=(Restrictions &&other) = default;
      91                 :            : 
      92                 :            :   /**
      93                 :            :    * \brief standard comparison operator
      94                 :            :    *
      95                 :            :    * \param[in] other Other Restrictions
      96                 :            :    *
      97                 :            :    * \returns \c true if both Restrictions are equal
      98                 :            :    */
      99                 :         74 :   bool operator==(const Restrictions &other) const
     100                 :            :   {
     101   [ +  +  +  + ]:         74 :     return (conjunctions == other.conjunctions) && (disjunctions == other.disjunctions);
     102                 :            :   }
     103                 :            : 
     104                 :            :   /**
     105                 :            :    * \brief standard comparison operator
     106                 :            :    *
     107                 :            :    * \param[in] other Other Restrictions.
     108                 :            :    *
     109                 :            :    * \returns \c true if both Restrictions are different
     110                 :            :    */
     111                 :          3 :   bool operator!=(const Restrictions &other) const
     112                 :            :   {
     113                 :          3 :     return !operator==(other);
     114                 :            :   }
     115                 :            : 
     116                 :            :   ::ad::map::restriction::RestrictionList conjunctions;
     117                 :            :   ::ad::map::restriction::RestrictionList disjunctions;
     118                 :            : };
     119                 :            : 
     120                 :            : } // namespace restriction
     121                 :            : } // namespace map
     122                 :            : } // namespace ad
     123                 :            : 
     124                 :            : /*!
     125                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     126                 :            :  */
     127                 :            : #ifndef GEN_GUARD_AD_MAP_RESTRICTION_RESTRICTIONS
     128                 :            : #define GEN_GUARD_AD_MAP_RESTRICTION_RESTRICTIONS
     129                 :            : /*!
     130                 :            :  * @brief namespace ad
     131                 :            :  */
     132                 :            : namespace ad {
     133                 :            : /*!
     134                 :            :  * @brief namespace map
     135                 :            :  */
     136                 :            : namespace map {
     137                 :            : /*!
     138                 :            :  * @brief namespace restriction
     139                 :            :  *
     140                 :            :  * Handling of traffic restrictions
     141                 :            :  */
     142                 :            : namespace restriction {
     143                 :            : 
     144                 :            : /**
     145                 :            :  * \brief standard ostream operator
     146                 :            :  *
     147                 :            :  * \param[in] os The output stream to write to
     148                 :            :  * \param[in] _value Restrictions value
     149                 :            :  *
     150                 :            :  * \returns The stream object.
     151                 :            :  *
     152                 :            :  */
     153                 :         51 : inline std::ostream &operator<<(std::ostream &os, Restrictions const &_value)
     154                 :            : {
     155                 :         51 :   os << "Restrictions(";
     156                 :         51 :   os << "conjunctions:";
     157                 :         51 :   os << _value.conjunctions;
     158                 :         51 :   os << ",";
     159                 :         51 :   os << "disjunctions:";
     160                 :         51 :   os << _value.disjunctions;
     161                 :         51 :   os << ")";
     162                 :         51 :   return os;
     163                 :            : }
     164                 :            : 
     165                 :            : } // namespace restriction
     166                 :            : } // namespace map
     167                 :            : } // namespace ad
     168                 :            : 
     169                 :            : namespace std {
     170                 :            : /*!
     171                 :            :  * \brief overload of the std::to_string for Restrictions
     172                 :            :  */
     173                 :          1 : inline std::string to_string(::ad::map::restriction::Restrictions const &value)
     174                 :            : {
     175         [ +  - ]:          2 :   stringstream sstream;
     176         [ +  - ]:          1 :   sstream << value;
     177         [ +  - ]:          2 :   return sstream.str();
     178                 :            : }
     179                 :            : } // namespace std
     180                 :            : #endif // GEN_GUARD_AD_MAP_RESTRICTION_RESTRICTIONS

Generated by: LCOV version 1.14