Quinoa all test code coverage report
Current view: top level - Control/Options - UserTable.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 4 8 50.0 %
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/UserTable.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     User-defined table (discrete y=f(x) function) options
       9                 :            :   \details   User-defined table (discrete y=f(x) function) options.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef UserTableOptions_h
      13                 :            : #define UserTableOptions_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                 :            : //! Table types types
      24                 :            : enum class UserTableType : uint8_t { POSITION=0,
      25                 :            :                                      VELOCITY,
      26                 :            :                                      ACCELERATION };
      27                 :            : 
      28                 :            : //! \brief Pack/Unpack UserTableType: forward overload to generic enum class
      29                 :            : //!   packer
      30                 :         20 : inline void operator|( PUP::er& p, UserTableType& e ) { PUP::pup( p, e ); }
      31                 :            : 
      32                 :            : //! \brief UserTable options: outsource searches to base templated on enum
      33                 :            : //!   type
      34                 :            : class UserTable : public tk::Toggle< UserTableType > {
      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                 :          4 :     explicit UserTable() :
      41                 :            :       tk::Toggle< UserTableType >(
      42                 :            :         //! Group, i.e., options, name
      43                 :            :         "User-defined table",
      44                 :            :         //! Enums -> names
      45                 :          0 :         { { UserTableType::POSITION, "position" },
      46                 :          0 :           { UserTableType::VELOCITY, "velocity" },
      47                 :          0 :           { UserTableType::ACCELERATION, "acceleration" } },
      48                 :            :         //! keywords -> Enums
      49                 :          8 :         { { "position", UserTableType::POSITION },
      50                 :          0 :           { "velocity", UserTableType::VELOCITY },
      51 [ +  - ][ +  - ]:         28 :           { "acceleration", UserTableType::ACCELERATION } } ) {}
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  + ][ +  + ]
         [ -  - ][ -  - ]
      52                 :            : };
      53                 :            : 
      54                 :            : } // ctr::
      55                 :            : } // tk:::
      56                 :            : 
      57                 :            : #endif // UserTableOptions_h

Generated by: LCOV version 1.14