LCOV - code coverage report
Current view: top level - src/Banks - BankConfig.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 4 4 100.0 %
Date: 2019-11-24 14:50:27 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* ✔ */
       2             : 
       3             : #pragma once
       4             : 
       5             : #include <Def/Def.hpp>
       6             : 
       7             : BEGIN_CS_NAMESPACE
       8             : 
       9             : /**
      10             :  * @brief   An enumeration of the different bank types.
      11             :  */
      12             : enum BankType {
      13             :     /**
      14             :      * @brief   Change the offset of the address (i.e. Controller number or
      15             :      *          Note number) of the element.
      16             :      */
      17             :     CHANGE_ADDRESS = 0,
      18             :     /**
      19             :      * @brief   Change the offset of the channel number of the element.
      20             :      */
      21             :     CHANGE_CHANNEL = 1,
      22             :     /**
      23             :      * @brief   Change the offset of the cable number of the element 
      24             :      *          (experimental).
      25             :      * @todo    Implement
      26             :      */
      27             :     CHANGE_CABLENB = 2,
      28             : };
      29             : 
      30             : template <setting_t N>
      31             : class Bank;
      32             : class OutputBank;
      33             : 
      34             : /** 
      35             :  * @brief   A struct for selecting the bank of BankableMIDIInput%s and the
      36             :  *          bank type.
      37             :  */
      38             : template <setting_t N>
      39             : struct BankConfig {
      40          13 :     BankConfig(Bank<N> &bank, BankType type = CHANGE_ADDRESS)
      41          13 :         : bank(bank), type(type) {}
      42             :     Bank<N> &bank;
      43             :     const BankType type;
      44             : };
      45             : 
      46             : /** 
      47             :  * @brief   A struct for selecting the bank of BankableMIDIOutput%s and the
      48             :  *          bank type.
      49             :  */
      50             : struct OutputBankConfig {
      51          32 :     OutputBankConfig(OutputBank &bank, BankType type = CHANGE_ADDRESS)
      52          32 :         : bank(bank), type(type) {}
      53             :     OutputBank &bank;
      54             :     const BankType type;
      55             : };
      56             : 
      57             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6