A super class for object that have to be updated regularly. More...
#include <AH/Containers/Updatable.hpp>
 Inheritance diagram for Updatable< T, ThreadSafe >:
 Collaboration diagram for Updatable< T, ThreadSafe >:Public Types | |
| using | Mutex = typename std::conditional< ThreadSafe, DefaultMutEx, EmptyMutex >::type | 
| using | LockGuard = typename std::conditional< ThreadSafe, DefaultLockGuard< Mutex >, EmptyLockGuard< Mutex > >::type | 
Static Public Member Functions | |
| static Mutex & | getMutex () | 
Protected Attributes | |
| Updatable< NormalUpdatable, false > * | next | 
| Updatable< NormalUpdatable, false > * | previous | 
Static Protected Attributes | |
| static DoublyLinkedList< Updatable< NormalUpdatable, false > > | updatables | 
| static Mutex | mutex | 
Main initialization and updating methods | |
| static void | applyToAll (const LockGuard &, void(Derived::*method)(Args &&...), Args &&... args) | 
| static void | applyToAll (void(Derived::*method)(Args &&...), Args &&... args) | 
Enabling and disabling updatables | |
| void | enable (const LockGuard &lock) | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| void | enable () | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| void | disable (const LockGuard &lock) | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
| void | disable () | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
| bool | isEnabled (const LockGuard &) const | 
| Check if this updatable is enabled.  More... | |
| bool | isEnabled () | 
| Check if this updatable is enabled.  More... | |
| void | moveDown (const LockGuard &) | 
| Move down this element in the list.  More... | |
| void | moveDown () | 
| Move down this element in the list.  More... | |
| static void | enable (UpdatableCRTP *element) | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| static void | enable (UpdatableCRTP &element) | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| static void | enable (U(&array)[N]) | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| static void | disable (UpdatableCRTP *element) | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
| static void | disable (UpdatableCRTP &element) | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
| static void | disable (U(&array)[N]) | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
Main initialization and updating methods | |
| virtual void | begin ()=0 | 
| Initialize this updatable.  More... | |
| virtual void | update ()=0 | 
| Update this updatable.  More... | |
| static void | beginAll () | 
| Begin all enabled instances of this class.  More... | |
| static void | updateAll () | 
| Update all enabled instances of this class.  More... | |
A super class for object that have to be updated regularly.
All instances of this class are kept in a linked list, so it's easy to iterate over all of them to update them.
Definition at line 195 of file Updatable.hpp.
      
  | 
  inherited | 
Definition at line 36 of file Updatable.hpp.
      
  | 
  inherited | 
Definition at line 38 of file Updatable.hpp.
      
  | 
  pure virtual | 
Initialize this updatable.
Implemented in GenericSwitchSelector< Callback >, GenericSwitchSelector< SelectorSingleLEDCallback >, GenericSwitchSelector<>, GenericSelector< N, Callback >, GenericSelector< N >, GenericSelector< N, SelectorLEDsCallback< N > >, GenericSelector< 2, EmptySelectorCallback >, GenericSelector< N, EmptySelectorCallback >, GenericSelector< 2, SelectorSingleLEDCallback >, GenericProgramChangeSelector< N, Callback >, GenericProgramChangeSelector< N >, GenericProgramChangeSelector< N, SelectorLEDsCallback< N > >, GenericManyButtonsSelector< N, Callback >, GenericManyButtonsSelector< N >, GenericManyButtonsSelector< N, SelectorLEDsCallback< N > >, GenericIncrementSelector< N, Callback >, GenericIncrementSelector< N >, GenericIncrementSelector< N, SelectorLEDsCallback< N > >, GenericIncrementDecrementSelector< N, Callback >, GenericIncrementDecrementSelector< N >, GenericIncrementDecrementSelector< N, SelectorLEDsCallback< N > >, GenericEncoderSelector< N, Callback >, GenericEncoderSelector< N >, GenericEncoderSelector< N, SelectorLEDsCallback< N > >, SmartMIDIFilteredAnalog< NumBanks, BankAddress, Sender >, SmartMIDIFilteredAnalog< NumBanks, SingleAddress, PitchBendSender< 10 > >, SmartMIDIFilteredAnalog< NumBanks, SingleAddress, ContinuousCCSender >, MIDIIncrementDecrementButtons< BankAddress, RelativeSender, ResetSender >, MIDIIncrementDecrementButtons< DualManyAddresses< NumBanks >, RelativeCCSender, DigitalNoteSender >, MIDIIncrementDecrementButtons< DualAddresses, RelativeCCSender, DigitalNoteSender >, MIDIFilteredAnalogAddressable< BankAddress, Sender >, MIDIFilteredAnalogAddressable< ManyAddresses< NumBanks >, ContinuousCCSender >, MIDIFilteredAnalogAddressable< SingleAddress, ContinuousCCSender >, MIDIChordButton< Sender >, MIDIChordButton< DigitalNoteSender >, MIDIButtonMatrix< BankAddress, Sender, nb_rows, nb_cols >, MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, nb_rows, nb_cols >, DigitalCCSender, nb_rows, nb_cols >, MIDIButtonMatrix< MatrixAddress< nb_rows, nb_cols >, DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, nb_rows, nb_cols >, DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonMatrix< MatrixAddress< nb_rows, nb_cols >, DigitalCCSender, nb_rows, nb_cols >, MIDIButtonLatching< BankAddress, Sender >, MIDIButtonLatching< SingleAddress, DigitalNoteSender >, MIDIButtonLatching< SingleAddress, DigitalCCSender >, MIDIButtonLatched< NumBanks, BankAddress, Sender >, MIDIButtonLatched< NumBanks, SingleAddress, DigitalNoteSender >, MIDIButtonLatched< NumBanks, SingleAddress, DigitalCCSender >, MIDIButton< BankAddress, Sender >, MIDIButton< SingleAddress, ProgramChangeSender >, MIDIButton< SingleAddress, DigitalNoteSender >, MIDIButton< ManyAddresses< NumBanks >, DigitalNoteSender >, MIDIButton< SingleAddress, DigitalCCSender >, MIDIButton< ManyAddresses< NumBanks >, ProgramChangeSender >, MIDIButton< ManyAddresses< NumBanks >, DigitalCCSender >, MIDIIncrementDecrementButtons< RelativeSender, ResetSender >, MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >, MIDIFilteredAnalogAddressable< Sender >, MIDIFilteredAnalogAddressable< ContinuousCCSender >, MIDIButtonLatching< Sender >, MIDIButtonLatching< DigitalNoteSender >, MIDIButtonLatching< DigitalCCSender >, MIDIButton< Sender >, MIDIButton< DigitalNoteSender >, MIDIButton< DigitalCCSender >, MIDIButton< ProgramChangeSender >, MIDIAbsoluteEncoder< Sender >, MIDIAbsoluteEncoder< PitchBendSender< 14 > >, MIDIAbsoluteEncoder< ContinuousCCSender >, FortySevenEffectsMIDI_Interface< MidiInterface >, SerialMIDI_Interface< T >, SerialMIDI_Interface< HardwareSerial >, SerialMIDI_Interface< decltype(Serial)>, SerialMIDI_Interface< SoftwareSerial >, MIDI_Interface, SerialDebugMIDI_Interface< T >, SerialDebugMIDI_Interface< HardwareSerial >, SerialDebugMIDI_Interface< decltype(Serial)>, SerialDebugMIDI_Interface< SoftwareSerial >, BluetoothMIDI_Interface, VolumeControl< N >, AudioVULEDs< N >, MIDIRotaryEncoder< BankAddress, Sender >, MIDIRotaryEncoder< ManyAddresses< NumBanks >, RelativeCCSender >, MIDIRotaryEncoder< SingleAddress, RelativeCCSender >, MIDIFilteredAnalog< BankAddress, Sender >, MIDIFilteredAnalog< SingleAddress, PitchBendSender< 10 > >, MIDIFilteredAnalog< ManyAddresses< NumBanks >, PitchBendSender< 10 > >, MIDIButtons< BankAddress, Sender, NumButtons >, MIDIButtons< SingleAddress, DigitalCCSender, NumButtons >, MIDIButtons< SingleAddress, DigitalNoteSender, NumButtons >, MIDIRotaryEncoder< Sender >, MIDIRotaryEncoder< RelativeCCSender >, MIDIFilteredAnalog< Sender >, MIDIFilteredAnalog< PitchBendSender< 10 > >, MIDIChordButton< Sender >, MIDIChordButton< DigitalNoteSender >, MIDIButtons< Sender, NumButtons >, MIDIButtons< DigitalCCSender, NumButtons >, MIDIButtons< DigitalNoteSender, NumButtons >, MIDIButtonMatrix< Sender, nb_rows, nb_cols >, MIDIButtonMatrix< DigitalCCSender, nb_rows, nb_cols >, MIDIButtonMatrix< DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonLatched< Sender >, MIDIButtonLatched< DigitalNoteSender >, and MIDIButtonLatched< DigitalCCSender >.
      
  | 
  pure virtual | 
Update this updatable.
Implemented in MIDI_Interface, GenericSwitchSelector< Callback >, GenericSwitchSelector< SelectorSingleLEDCallback >, GenericSwitchSelector<>, GenericSelector< N, Callback >, GenericSelector< N >, GenericSelector< N, SelectorLEDsCallback< N > >, GenericSelector< 2, EmptySelectorCallback >, GenericSelector< N, EmptySelectorCallback >, GenericSelector< 2, SelectorSingleLEDCallback >, GenericManyButtonsSelector< N, Callback >, GenericManyButtonsSelector< N >, GenericManyButtonsSelector< N, SelectorLEDsCallback< N > >, GenericIncrementSelector< N, Callback >, GenericIncrementSelector< N >, GenericIncrementSelector< N, SelectorLEDsCallback< N > >, GenericIncrementDecrementSelector< N, Callback >, GenericIncrementDecrementSelector< N >, GenericIncrementDecrementSelector< N, SelectorLEDsCallback< N > >, GenericEncoderSelector< N, Callback >, GenericEncoderSelector< N >, GenericEncoderSelector< N, SelectorLEDsCallback< N > >, SmartMIDIFilteredAnalog< NumBanks, BankAddress, Sender >, SmartMIDIFilteredAnalog< NumBanks, SingleAddress, PitchBendSender< 10 > >, SmartMIDIFilteredAnalog< NumBanks, SingleAddress, ContinuousCCSender >, MIDIIncrementDecrementButtons< BankAddress, RelativeSender, ResetSender >, MIDIIncrementDecrementButtons< DualManyAddresses< NumBanks >, RelativeCCSender, DigitalNoteSender >, MIDIIncrementDecrementButtons< DualAddresses, RelativeCCSender, DigitalNoteSender >, MIDIFilteredAnalogAddressable< BankAddress, Sender >, MIDIFilteredAnalogAddressable< ManyAddresses< NumBanks >, ContinuousCCSender >, MIDIFilteredAnalogAddressable< SingleAddress, ContinuousCCSender >, MIDIChordButton< Sender >, MIDIChordButton< DigitalNoteSender >, MIDIButtonMatrix< BankAddress, Sender, nb_rows, nb_cols >, MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, nb_rows, nb_cols >, DigitalCCSender, nb_rows, nb_cols >, MIDIButtonMatrix< MatrixAddress< nb_rows, nb_cols >, DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonMatrix< ManyMatrixAddresses< NumBanks, nb_rows, nb_cols >, DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonMatrix< MatrixAddress< nb_rows, nb_cols >, DigitalCCSender, nb_rows, nb_cols >, MIDIButtonLatching< BankAddress, Sender >, MIDIButtonLatching< SingleAddress, DigitalNoteSender >, MIDIButtonLatching< SingleAddress, DigitalCCSender >, MIDIButtonLatched< NumBanks, BankAddress, Sender >, MIDIButtonLatched< NumBanks, SingleAddress, DigitalNoteSender >, MIDIButtonLatched< NumBanks, SingleAddress, DigitalCCSender >, MIDIButton< BankAddress, Sender >, MIDIButton< SingleAddress, ProgramChangeSender >, MIDIButton< SingleAddress, DigitalNoteSender >, MIDIButton< ManyAddresses< NumBanks >, DigitalNoteSender >, MIDIButton< SingleAddress, DigitalCCSender >, MIDIButton< ManyAddresses< NumBanks >, ProgramChangeSender >, MIDIButton< ManyAddresses< NumBanks >, DigitalCCSender >, MIDIIncrementDecrementButtons< RelativeSender, ResetSender >, MIDIIncrementDecrementButtons< RelativeCCSender, DigitalNoteSender >, MIDIFilteredAnalogAddressable< Sender >, MIDIFilteredAnalogAddressable< ContinuousCCSender >, MIDIButtonLatching< Sender >, MIDIButtonLatching< DigitalNoteSender >, MIDIButtonLatching< DigitalCCSender >, MIDIButton< Sender >, MIDIButton< DigitalNoteSender >, MIDIButton< DigitalCCSender >, MIDIButton< ProgramChangeSender >, MIDIAbsoluteEncoder< Sender >, MIDIAbsoluteEncoder< PitchBendSender< 14 > >, MIDIAbsoluteEncoder< ContinuousCCSender >, Parsing_MIDI_Interface, BluetoothMIDI_Interface, VolumeControl< N >, AudioVULEDs< N >, MIDIRotaryEncoder< BankAddress, Sender >, MIDIRotaryEncoder< ManyAddresses< NumBanks >, RelativeCCSender >, MIDIRotaryEncoder< SingleAddress, RelativeCCSender >, MIDIFilteredAnalog< BankAddress, Sender >, MIDIFilteredAnalog< SingleAddress, PitchBendSender< 10 > >, MIDIFilteredAnalog< ManyAddresses< NumBanks >, PitchBendSender< 10 > >, MIDIButtons< BankAddress, Sender, NumButtons >, MIDIButtons< SingleAddress, DigitalCCSender, NumButtons >, MIDIButtons< SingleAddress, DigitalNoteSender, NumButtons >, MIDIRotaryEncoder< Sender >, MIDIRotaryEncoder< RelativeCCSender >, MIDIFilteredAnalog< Sender >, MIDIFilteredAnalog< PitchBendSender< 10 > >, MIDIChordButton< Sender >, MIDIChordButton< DigitalNoteSender >, MIDIButtons< Sender, NumButtons >, MIDIButtons< DigitalCCSender, NumButtons >, MIDIButtons< DigitalNoteSender, NumButtons >, MIDIButtonMatrix< Sender, nb_rows, nb_cols >, MIDIButtonMatrix< DigitalCCSender, nb_rows, nb_cols >, MIDIButtonMatrix< DigitalNoteSender, nb_rows, nb_cols >, MIDIButtonLatched< Sender >, MIDIButtonLatched< DigitalNoteSender >, and MIDIButtonLatched< DigitalCCSender >.
      
  | 
  inlinestatic | 
Begin all enabled instances of this class.
Definition at line 208 of file Updatable.hpp.
      
  | 
  inlinestatic | 
Update all enabled instances of this class.
Definition at line 212 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 79 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 85 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 93 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 106 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 115 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 144 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 146 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 149 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 119 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 128 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 155 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 157 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 160 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Check if this updatable is enabled.
Definition at line 136 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Check if this updatable is enabled.
Definition at line 141 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Move down this element in the list.
Definition at line 166 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Move down this element in the list.
Definition at line 168 of file Updatable.hpp.
      
  | 
  staticprotectedinherited | 
Definition at line 173 of file Updatable.hpp.
      
  | 
  staticprotectedinherited | 
Definition at line 174 of file Updatable.hpp.
      
  | 
  protectedinherited | 
Definition at line 323 of file LinkedList.hpp.
      
  | 
  protectedinherited | 
Definition at line 324 of file LinkedList.hpp.