Control Surface new-input
MIDI Control Surface library for Arduino
BankConfig.hpp
Go to the documentation of this file.
1 /* ✔ */
2 
3 #pragma once
4 
5 #include <Def/Def.hpp>
6 
8 
12 enum BankType {
26 };
27 
28 template <setting_t N>
29 class Bank;
30 class OutputBank;
31 
32 template <BankType DefaultBankType>
33 struct OutputBankConfig;
34 
39 template <setting_t N>
41  protected:
43 
44  public:
46  const BankType type;
47 };
48 
50 template <setting_t N, BankType DefaultBankType = BankType::CHANGE_ADDRESS>
52  BankConfig(Bank<N> &bank, BankType type = DefaultBankType)
53  : BaseBankConfig<N>(bank, type) {}
54 };
55 
61  protected:
63  : bank(bank), type(type) {}
64 
65  public:
66  template <setting_t N>
68  : bank(config.bank), type(config.type) {}
69 
71  const BankType type;
72 };
73 
75 template <BankType DefaultBankType = BankType::CHANGE_ADDRESS>
79 };
80 
BankType
An enumeration of the different bank types.
Definition: BankConfig.hpp:12
@ CHANGE_CHANNEL
Change the offset of the channel number of the element.
Definition: BankConfig.hpp:21
@ CHANGE_CABLENB
Change the offset of the cable number of the element.
Definition: BankConfig.hpp:25
@ CHANGE_ADDRESS
Change the offset of the address (i.e.
Definition: BankConfig.hpp:17
#define END_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
A class that groups Bankable MIDI Output Elements and Bankable MIDI Input Elements,...
Definition: Bank.hpp:91
A struct for selecting the bank of BankableMIDIInputs and the bank type.
Definition: BankConfig.hpp:40
BaseBankConfig(Bank< N > &bank, BankType type)
Definition: BankConfig.hpp:42
const BankType type
Definition: BankConfig.hpp:46
Bank< N > & bank
Definition: BankConfig.hpp:45
A struct for selecting the bank of BankableMIDIOutputs and the bank type.
Definition: BankConfig.hpp:60
OutputBank & bank
Definition: BankConfig.hpp:70
BaseOutputBankConfig(BaseBankConfig< N > config)
Definition: BankConfig.hpp:67
BaseOutputBankConfig(OutputBank &bank, BankType type)
Definition: BankConfig.hpp:62
const BankType type
Definition: BankConfig.hpp:71
A class for changing the address of BankableMIDIOutputs.
Definition: Bank.hpp:16
BankConfig(Bank< N > &bank, BankType type=DefaultBankType)
Definition: BankConfig.hpp:52
OutputBankConfig(OutputBank &bank, BankType type=DefaultBankType)
Definition: BankConfig.hpp:77