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

Base class for all pedal actions. More...

#include <action.h>

Inheritance diagram for Action:
DelayedAction LEDBlinkAction SendAction SerialOutputAction SendCharAction SendKeyAction SendMediaKeyAction SendStringAction

Public Types

enum class  Type : uint8_t {
  Unknown , SendString , SendChar , SendKey ,
  SendMediaKey , SerialOutput , Delayed
}
 

Public Member Functions

void setName (const std::string &n)
 
const std::string & getName () const
 
bool hasName () const
 
virtual Type getType () const
 
virtual void execute ()=0
 
virtual uint32_t getDelay () const
 
virtual bool isSendAction () const
 
virtual bool isInProgress () const
 Returns true if the action is currently in progress (e.g.
 
virtual void getJsonProperties (JsonObject &json) const
 
virtual ~Action ()=default
 

Detailed Description

Base class for all pedal actions.

Definition at line 11 of file action.h.

Member Enumeration Documentation

◆ Type

enum class Action::Type : uint8_t
strong
Enumerator
Unknown 
SendString 
SendChar 
SendKey 
SendMediaKey 
SerialOutput 
Delayed 

Definition at line 14 of file action.h.

Constructor & Destructor Documentation

◆ ~Action()

virtual Action::~Action ( )
virtualdefault

Member Function Documentation

◆ execute()

virtual void Action::execute ( )
pure virtual

◆ getDelay()

virtual uint32_t Action::getDelay ( ) const
inlinevirtual

Reimplemented in DelayedAction.

Definition at line 31 of file action.h.

◆ getJsonProperties()

virtual void Action::getJsonProperties ( JsonObject &  json) const
inlinevirtual

Reimplemented in DelayedAction.

Definition at line 39 of file action.h.

◆ getName()

const std::string & Action::getName ( ) const
inline

Definition at line 26 of file action.h.

◆ getType()

virtual Type Action::getType ( ) const
inlinevirtual

◆ hasName()

bool Action::hasName ( ) const
inline

Definition at line 27 of file action.h.

◆ isInProgress()

virtual bool Action::isInProgress ( ) const
inlinevirtual

Returns true if the action is currently in progress (e.g.

a running delay)

Reimplemented in DelayedAction.

Definition at line 37 of file action.h.

◆ isSendAction()

virtual bool Action::isSendAction ( ) const
inlinevirtual

Reimplemented in DelayedAction, LEDBlinkAction, SendAction, and SerialOutputAction.

Definition at line 32 of file action.h.

◆ setName()

void Action::setName ( const std::string &  n)
inline

Definition at line 25 of file action.h.


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