Switchboard Extension SDK
Loading...
Searching...
No Matches
switchboard::Parameter Class Referenceabstract

Parameter class. Represents an adjustable config value in an audio node. More...

#include <Parameter.hpp>

Public Types

enum class  Type {
  Float , Bool , Int , UInt ,
  String
}

Public Member Functions

 Parameter (const Type type, const std::string &id, const std::string &name, const std::string &description)
 Construct a new Parameter object.
virtual ~Parameter ()=default
 Parameter destructor.
Type getType () const
 Gets the type of the parameter.
const std::string & getID () const
 Gets the unique identifier of the parameter.
const std::string & getName () const
 Gets the name of the parameter.
const std::string & getDescription () const
 Gets the description of the parameter.
virtual void setValue (std::any newValue)=0
 Sets the value of the parameter.
virtual std::any getAnyValue ()=0
 Gets the value of the parameter.

Protected Attributes

Type type
std::string id
std::string name
std::string description

Detailed Description

Parameter class. Represents an adjustable config value in an audio node.

Constructor & Destructor Documentation

◆ Parameter()

switchboard::Parameter::Parameter ( const Type type,
const std::string & id,
const std::string & name,
const std::string & description )

Construct a new Parameter object.

Parameters
typeThe type of the parameter.
idThe unique identifier of the parameter.
nameThe name of the parameter.
descriptionThe description of the parameter.

Member Function Documentation

◆ getAnyValue()

virtual std::any switchboard::Parameter::getAnyValue ( )
pure virtual

Gets the value of the parameter.

Returns
The value of the parameter.

◆ getDescription()

const std::string & switchboard::Parameter::getDescription ( ) const

Gets the description of the parameter.

Returns
The description of the parameter.

◆ getID()

const std::string & switchboard::Parameter::getID ( ) const

Gets the unique identifier of the parameter.

Returns
The unique identifier of the parameter.

◆ getName()

const std::string & switchboard::Parameter::getName ( ) const

Gets the name of the parameter.

Returns
The name of the parameter.

◆ getType()

Type switchboard::Parameter::getType ( ) const

Gets the type of the parameter.

Returns
The type of the parameter.

◆ setValue()

virtual void switchboard::Parameter::setValue ( std::any newValue)
pure virtual

Sets the value of the parameter.

Parameters
newValueThe new value for the parameter.

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