AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
Profile Class Reference

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.
 
ActiongetAction (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)
 

Detailed Description

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.

Definition at line 14 of file profile.h.

Constructor & Destructor Documentation

◆ Profile()

Profile::Profile ( std::string  name)
explicit

Constructs a Profile with a name.

Parameters
nameThe name of this profile

Definition at line 8 of file profile.cpp.

Member Function Documentation

◆ addAction()

void Profile::addAction ( uint8_t  button,
std::unique_ptr< Action action 
)

Adds an action to a specific button in this profile.

Parameters
buttonButton index (0..MAX_BUTTONS-1)
actionUnique pointer to the action to be executed

Performs bounds checking before storing the action.

Definition at line 15 of file profile.cpp.

◆ getAction()

Action * Profile::getAction ( uint8_t  button) const

Gets the action associated with a button in this profile.

Parameters
buttonButton index (0..MAX_BUTTONS-1)
Returns
Pointer to the Action, or nullptr if none assigned

Performs bounds checking and null checking before returning.

Definition at line 28 of file profile.cpp.

◆ getDescription()

const std::string & Profile::getDescription ( ) const

Gets the description of this profile.

Returns
The profile description

Definition at line 49 of file profile.cpp.

◆ getName()

const std::string & Profile::getName ( ) const

Gets the name of this profile.

Returns
The profile name

Definition at line 42 of file profile.cpp.

◆ setDescription()

void Profile::setDescription ( const std::string &  description)

Sets the description of this profile.

Parameters
descriptionThe profile description

Definition at line 56 of file profile.cpp.

Member Data Documentation

◆ MAX_BUTTONS

constexpr uint8_t Profile::MAX_BUTTONS = 26
staticconstexpr

Maximum buttons per profile (A–Z)

Definition at line 17 of file profile.h.


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