Quinoa all test code coverage report
Current view: top level - Control/Options - TxtFloatFormat.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 9 44.4 %
Date: 2024-04-29 14:59:56 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 14 28 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Options/TxtFloatFormat.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.
       7                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Text floating-point output options
       9                 :            :   \details   Text floating-point output options
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef TxtFloatFormatOptions_h
      13                 :            : #define TxtFloatFormatOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "Toggle.hpp"
      18                 :            : #include "PUPUtil.hpp"
      19                 :            : 
      20                 :            : namespace tk {
      21                 :            : namespace ctr {
      22                 :            : 
      23                 :            : //! Txt floating-point format types
      24                 :            : enum class TxtFloatFormatType : uint8_t { DEFAULT=0,
      25                 :            :                                           FIXED,
      26                 :            :                                           SCIENTIFIC };
      27                 :            : 
      28                 :            : //! \brief Pack/Unpack TxtFloatFormatType: forward overload to generic enum
      29                 :            : //!   class packer
      30                 :       3640 : inline void operator|( PUP::er& p, TxtFloatFormatType& e ) { PUP::pup( p, e ); }
      31                 :            : 
      32                 :            : //! \brief TxtFloatFormat options: outsource searches to base templated on enum
      33                 :            : //!   type
      34                 :            : class TxtFloatFormat : public tk::Toggle< TxtFloatFormatType > {
      35                 :            : 
      36                 :            :   public:
      37                 :            :     //! \brief Options constructor
      38                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      39                 :            :     //!    will handle client interactions
      40                 :        111 :     explicit TxtFloatFormat() :
      41                 :            :       tk::Toggle< TxtFloatFormatType >(
      42                 :            :         //! Group, i.e., options, name
      43                 :            :         "floating-point format",
      44                 :            :         //! Enums -> names
      45                 :          0 :         { { TxtFloatFormatType::DEFAULT, "default" },
      46                 :          0 :           { TxtFloatFormatType::FIXED, "fixed" },
      47                 :          0 :           { TxtFloatFormatType::SCIENTIFIC, "scientific" } },
      48                 :            :         //! keywords -> Enums
      49                 :        222 :         { { "default", TxtFloatFormatType::DEFAULT },
      50                 :          0 :           { "fixed", TxtFloatFormatType::FIXED },
      51                 :          0 :         { "scientific", TxtFloatFormatType::SCIENTIFIC } }
      52 [ +  - ][ +  - ]:        777 :       ) {}
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ -  - ][ -  - ]
      53                 :            : };
      54                 :            : 
      55                 :            : } // ctr::
      56                 :            : } // tk:::
      57                 :            : 
      58                 :            : #endif // TxtFloatFormatOptions_h

Generated by: LCOV version 1.14