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

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

#include <StringParameter.hpp>

Inheritance diagram for switchboard::StringParameter:
switchboard::StringCallbackParameter< T > switchboard::StringPointerParameter switchboard::StringStoredParameter

Public Member Functions

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

Detailed Description

String parameter abstract class. Intended to be subclassed.

Constructor & Destructor Documentation

◆ StringParameter()

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

StringParameter constructor.

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

Member Function Documentation

◆ getValue()

virtual std::string switchboard::StringParameter::getValue ( ) const
pure virtual

Gets the current value of the parameter.

Returns
The current value.

Implemented in switchboard::StringCallbackParameter< T >, switchboard::StringPointerParameter, and switchboard::StringStoredParameter.

◆ setValue()

virtual void switchboard::StringParameter::setValue ( const std::string newValue)
pure virtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implemented in switchboard::StringCallbackParameter< T >, switchboard::StringPointerParameter, and switchboard::StringStoredParameter.