Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
OutputBankableMIDIAddress_Base Class Reference

#include <Banks/BankableAddresses.hpp>

Detailed Description

Class for keeping track of the active bank, and allows locking of the bank setting.

See also
OutputBankableMIDIAddress

Definition at line 15 of file BankableAddresses.hpp.

Inheritance diagram for OutputBankableMIDIAddress_Base:
Collaboration diagram for OutputBankableMIDIAddress_Base:

Public Member Functions

setting_t getRawBankSetting () const
 Get the actual bank setting (no matter whether the element is locked or not).
setting_t getSelection () const
 Get the bank setting.
void lock ()
 Lock the bank setting.
void unlock ()
 Unlock the bank setting.

Protected Member Functions

 OutputBankableMIDIAddress_Base (const OutputBank &bank)
 Constructor.

Protected Attributes

const OutputBankbank

Private Attributes

setting_t lockedSetting = Unlocked

Static Private Attributes

static constexpr setting_t Unlocked = NoSetting

Constructor & Destructor Documentation

◆ OutputBankableMIDIAddress_Base()

OutputBankableMIDIAddress_Base ( const OutputBank & bank)
inlineprotected

Constructor.

Parameters
bankThe bank to add this element to.

Definition at line 23 of file BankableAddresses.hpp.

Member Function Documentation

◆ getRawBankSetting()

setting_t getRawBankSetting ( ) const
inline

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
inline

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 ( )
inline

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 ( )
inline

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

◆ bank

const OutputBank& bank
protected

Definition at line 62 of file BankableAddresses.hpp.

◆ Unlocked

setting_t Unlocked = NoSetting
staticconstexprprivate

Definition at line 65 of file BankableAddresses.hpp.

◆ lockedSetting

setting_t lockedSetting = Unlocked
private

Definition at line 66 of file BankableAddresses.hpp.


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