Walker test code coverage report
Current view: top level - Control/Options - RNGSSESeqLen.hpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 7 8 87.5 %
Date: 2022-09-21 18:57:21 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 13 26 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/Control/Options/RNGSSESeqLen.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     RNGSSE sequence length options
       9                 :            :   \details   RNGSSE sequence length options
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef RNGSSESeqLenOptions_h
      13                 :            : #define RNGSSESeqLenOptions_h
      14                 :            : 
      15                 :            : #include <brigand/sequences/list.hpp>
      16                 :            : 
      17                 :            : #include "Toggle.hpp"
      18                 :            : #include "Keywords.hpp"
      19                 :            : #include "PUPUtil.hpp"
      20                 :            : 
      21                 :            : namespace tk {
      22                 :            : namespace ctr {
      23                 :            : 
      24                 :            : //! RNGSSE sequence length options
      25                 :            : enum class RNGSSESeqLenType : uint8_t { SHORT,
      26                 :            :                                         MEDIUM,
      27                 :            :                                         LONG };
      28                 :            : 
      29                 :            : //! \brief Pack/Unpack RNGSSESeqLenType: forward overload to generic enum class
      30                 :            : //!   packer
      31                 :          5 : inline void operator|( PUP::er& p, RNGSSESeqLenType& e ) { PUP::pup( p, e ); }
      32                 :            : 
      33                 :            : //! \brief RNGSSESeqLen options: outsource searches to base templated on enum
      34                 :            : //!   type
      35                 :            : class RNGSSESeqLen : public tk::Toggle< RNGSSESeqLenType > {
      36                 :            : 
      37                 :            :   public:
      38                 :            :     //! Valid expected choices to make them also available at compile-time
      39                 :            :     using keywords = brigand::list< kw::seq_short
      40                 :            :                                   , kw::seq_med
      41                 :            :                                   , kw::seq_long
      42                 :            :                                   >;
      43                 :            : 
      44                 :            :     //! \brief Options constructor
      45                 :            :     //! \details Simply initialize in-line and pass associations to base, which
      46                 :            :     //!    will handle client interactions
      47                 :          5 :     explicit RNGSSESeqLen() :
      48                 :            :       tk::Toggle< RNGSSESeqLenType >(
      49                 :            :         //! Group, i.e., options, name
      50                 :            :         "sequence length",
      51                 :            :         //! Enums -> names
      52         [ +  - ]:          5 :         { { RNGSSESeqLenType::SHORT, kw::seq_short::name() },
      53         [ +  - ]:         10 :           { RNGSSESeqLenType::MEDIUM, kw::seq_med::name() },
      54         [ +  - ]:         10 :           { RNGSSESeqLenType::LONG, kw::seq_long::name() } },
      55                 :            :         //! keywords -> Enums
      56                 :          0 :         { { kw::seq_short::string(), RNGSSESeqLenType::SHORT },
      57         [ +  - ]:         10 :           { kw::seq_med::string(), RNGSSESeqLenType::MEDIUM },
      58 [ +  - ][ +  - ]:         65 :           { kw::seq_long::string(), RNGSSESeqLenType::LONG } } ) {}
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
         [ +  + ][ -  - ]
                 [ -  - ]
      59                 :            : };
      60                 :            : 
      61                 :            : } // ctr::
      62                 :            : } // tk::
      63                 :            : 
      64                 :            : #endif // RNGSSESeqLenOptions_h

Generated by: LCOV version 1.14