|
AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
|
Represents a single button configuration profile. More...
#include <profile.h>
Public Member Functions | |
| Profile (std::string name) | |
| Constructs a Profile with a name. | |
| void | addAction (uint8_t button, std::unique_ptr< Action > action) |
| Adds an action to a specific button in this profile. | |
| Action * | getAction (uint8_t button) const |
| Gets the action associated with a button in this profile. | |
| const std::string & | getName () const |
| Gets the name of this profile. | |
| const std::string & | getDescription () const |
| Gets the description of this profile. | |
| void | setDescription (const std::string &description) |
| Sets the description of this profile. | |
Static Public Attributes | |
| static constexpr uint8_t | MAX_BUTTONS = 26 |
| Maximum buttons per profile (A–Z) | |
Represents a single button configuration profile.
A Profile contains a name and an array of actions, one for each button. This provides better encapsulation than the previous 2D array approach.
|
explicit |
Constructs a Profile with a name.
| name | The name of this profile |
Definition at line 8 of file profile.cpp.
| void Profile::addAction | ( | uint8_t | button, |
| std::unique_ptr< Action > | action | ||
| ) |
Adds an action to a specific button in this profile.
| button | Button index (0..MAX_BUTTONS-1) |
| action | Unique pointer to the action to be executed |
Performs bounds checking before storing the action.
Definition at line 15 of file profile.cpp.
| Action * Profile::getAction | ( | uint8_t | button | ) | const |
Gets the action associated with a button in this profile.
| button | Button index (0..MAX_BUTTONS-1) |
Performs bounds checking and null checking before returning.
Definition at line 28 of file profile.cpp.
| const std::string & Profile::getDescription | ( | ) | const |
Gets the description of this profile.
Definition at line 49 of file profile.cpp.
| const std::string & Profile::getName | ( | ) | const |
| void Profile::setDescription | ( | const std::string & | description | ) |
Sets the description of this profile.
| description | The profile description |
Definition at line 56 of file profile.cpp.
|
staticconstexpr |