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

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

#include <BoolParameter.hpp>

Inheritance diagram for switchboard::BoolParameter:
switchboard::BoolCallbackParameter< T > switchboard::BoolPointerParameter switchboard::BoolStoredParameter

Public Member Functions

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

Detailed Description

Boolean parameter abstract class. Intended to be subclassed.

Constructor & Destructor Documentation

◆ BoolParameter()

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

BoolParameter constructor.

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

Member Function Documentation

◆ getValue()

virtual bool switchboard::BoolParameter::getValue ( ) const
pure virtual

Gets the current value of the parameter.

Returns
The current value.

Implemented in switchboard::BoolCallbackParameter< T >, switchboard::BoolPointerParameter, and switchboard::BoolStoredParameter.

◆ setValue()

virtual void switchboard::BoolParameter::setValue ( const bool newValue)
pure virtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implemented in switchboard::BoolCallbackParameter< T >, switchboard::BoolPointerParameter, and switchboard::BoolStoredParameter.