This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SelectorBase Class Reference

Base class for all Selectors exposing the get method, so it can be used by display elements etc, without having to provide the full generic type. More...

#include <Selector.hpp>

Inheritance diagram for SelectorBase:
Collaboration diagram for SelectorBase:

Public Member Functions

setting_t get () const
 Get the current selection/setting. More...
 

Protected Member Functions

 SelectorBase ()=default
 Constructor. More...
 

Protected Attributes

setting_t setting = 0
 The selection of the selector. More...
 

Detailed Description

Base class for all Selectors exposing the get method, so it can be used by display elements etc, without having to provide the full generic type.

A set method is not provided, because that would require either more virtual functions, or a rather large refactoring.

Definition at line 40 of file Selector.hpp.

Constructor & Destructor Documentation

◆ SelectorBase()

SelectorBase::SelectorBase ( )
protecteddefault

Constructor.

Member Function Documentation

◆ get()

setting_t SelectorBase::get ( ) const
inline

Get the current selection/setting.

Definition at line 47 of file Selector.hpp.

Member Data Documentation

◆ setting

setting_t SelectorBase::setting = 0
protected

The selection of the selector.

It is saved in the selector as well as the selectable, because you need it in order to implement increment/decrement methods.

Definition at line 53 of file Selector.hpp.


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