Control Surface main
MIDI Control Surface library for Arduino
Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
DualManyAddresses< NumBanks > Class Template Reference

#include <Banks/BankAddresses.hpp>

Detailed Description

template<uint8_t NumBanks>
class Bankable::ManyAddresses::DualManyAddresses< NumBanks >
Template Parameters
NumBanksThe number of bank settings the bank has.

Definition at line 131 of file BankAddresses.hpp.

+ Inheritance diagram for DualManyAddresses< NumBanks >:
+ Collaboration diagram for DualManyAddresses< NumBanks >:

Public Member Functions

 DualManyAddresses (const Bank< NumBanks > &bank, const Array2D< MIDIAddress, 2, NumBanks > &addresses)
MIDIAddress getFirstActiveAddress () const
MIDIAddress getSecondActiveAddress () const
setting_t getRawBankSetting () const
 Get the actual bank setting (no matter whether the element is locked or not). More...
setting_t getSelection () const
 Get the bank setting. More...
void lock ()
 Lock the bank setting. More...
void unlock ()
 Unlock the bank setting. More...

Protected Attributes

const OutputBankbank

Private Attributes

Array< MIDIAddress, NumBanks > first
Array< MIDIAddress, NumBanks > second
setting_t lockedSetting = UNLOCKED

Static Private Attributes

static constexpr setting_t UNLOCKED = NO_SETTING

Constructor & Destructor Documentation

◆ DualManyAddresses()

DualManyAddresses ( const Bank< NumBanks > &  bank,
const Array2D< MIDIAddress, 2, NumBanks > &  addresses 

Definition at line 133 of file BankAddresses.hpp.

Member Function Documentation

◆ getFirstActiveAddress()

MIDIAddress getFirstActiveAddress ( ) const

Definition at line 137 of file BankAddresses.hpp.

◆ getSecondActiveAddress()

MIDIAddress getSecondActiveAddress ( ) const

Definition at line 138 of file BankAddresses.hpp.

◆ getRawBankSetting()

setting_t getRawBankSetting ( ) const

Get the actual bank setting (no matter whether the element is locked or not).

Definition at line 30 of file BankableAddresses.hpp.

◆ getSelection()

setting_t getSelection ( ) const

Get the bank setting.

If the element is locked, the bank setting from the moment it was locked is returned.

Definition at line 38 of file BankableAddresses.hpp.

◆ lock()

void lock ( )

Lock the bank setting.

As long as it's locked, getSelection will return the current setting, independent from the actual bank setting.

Definition at line 48 of file BankableAddresses.hpp.

◆ unlock()

void unlock ( )

Unlock the bank setting.

After unlocking, getSelection will return the actual bank setting again.

Definition at line 59 of file BankableAddresses.hpp.

Member Data Documentation

◆ first

Array<MIDIAddress, NumBanks> first

Definition at line 143 of file BankAddresses.hpp.

◆ second

Array<MIDIAddress, NumBanks> second

Definition at line 143 of file BankAddresses.hpp.

◆ bank

const OutputBank& bank

Definition at line 62 of file BankableAddresses.hpp.


constexpr setting_t UNLOCKED = NO_SETTING

Definition at line 65 of file BankableAddresses.hpp.

◆ lockedSetting

setting_t lockedSetting = UNLOCKED

Definition at line 66 of file BankableAddresses.hpp.

The documentation for this class was generated from the following file: