Switchboard SDK
Loading...
Searching...
No Matches
switchboard::IntParameter Class Referenceabstract

Int parameter abstract class. Intended to be subclassed. More...

#include <IntParameter.hpp>

Inheritance diagram for switchboard::IntParameter:
switchboard::IntCallbackParameter< T > switchboard::IntPointerParameter switchboard::IntStoredParameter

Public Member Functions

 IntParameter (const std::string &id, const std::string &name, const std::string &description)
 IntParameter constructor.
 
virtual ~IntParameter ()=default
 IntParameter destructor.
 
virtual int getValue () const =0
 Gets the current value of the parameter.
 
virtual void setValue (const int newValue)=0
 Sets a new value for the parameter.
 
virtual int getMinimumValue () const =0
 Gets the minimum value for the parameter.
 
virtual int getMaximumValue () const =0
 Gets the maximum value for the parameter.
 
void setValue (std::any newValue) override
 
std::any getAnyValue () override
 

Detailed Description

Int parameter abstract class. Intended to be subclassed.

Constructor & Destructor Documentation

◆ IntParameter()

switchboard::IntParameter::IntParameter ( const std::string & id,
const std::string & name,
const std::string & description )

IntParameter constructor.

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

Member Function Documentation

◆ getMaximumValue()

virtual int switchboard::IntParameter::getMaximumValue ( ) const
pure virtual

Gets the maximum value for the parameter.

Returns
The maximum value.

Implemented in switchboard::IntCallbackParameter< T >, switchboard::IntPointerParameter, and switchboard::IntStoredParameter.

◆ getMinimumValue()

virtual int switchboard::IntParameter::getMinimumValue ( ) const
pure virtual

Gets the minimum value for the parameter.

Returns
The minimum value.

Implemented in switchboard::IntCallbackParameter< T >, switchboard::IntPointerParameter, and switchboard::IntStoredParameter.

◆ getValue()

virtual int switchboard::IntParameter::getValue ( ) const
pure virtual

Gets the current value of the parameter.

Returns
The current value.

Implemented in switchboard::IntCallbackParameter< T >, switchboard::IntPointerParameter, and switchboard::IntStoredParameter.

◆ setValue()

virtual void switchboard::IntParameter::setValue ( const int newValue)
pure virtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implemented in switchboard::IntCallbackParameter< T >, switchboard::IntPointerParameter, and switchboard::IntStoredParameter.