Switchboard SDK
Loading...
Searching...
No Matches
switchboard::BoolStoredParameter Class Reference

BoolStoredParameter class. A bool parameter class that contains an bool variable. More...

#include <BoolStoredParameter.hpp>

Inheritance diagram for switchboard::BoolStoredParameter:
switchboard::BoolParameter

Public Member Functions

SB_WASM BoolStoredParameter (const std::string &id, const std::string &name, const std::string &description, const bool defaultValue)
 BoolStoredParameter constructor with a default value.
 
SB_WASM bool getValue () const override
 Gets the current value of the parameter.
 
SB_WASM void setValue (const bool newValue) override
 Sets a new value for the parameter.
 
- Public Member Functions inherited from switchboard::BoolParameter
 BoolParameter (const std::string &id, const std::string &name, const std::string &description)
 BoolParameter constructor.
 
virtual ~BoolParameter ()=default
 BoolParameter destructor.
 
void setValue (std::any newValue) override
 
std::any getAnyValue () override
 

Detailed Description

BoolStoredParameter class. A bool parameter class that contains an bool variable.

Constructor & Destructor Documentation

◆ BoolStoredParameter()

switchboard::BoolStoredParameter::BoolStoredParameter ( const std::string & id,
const std::string & name,
const std::string & description,
const bool defaultValue )

BoolStoredParameter constructor with a default value.

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

Member Function Documentation

◆ getValue()

bool switchboard::BoolStoredParameter::getValue ( ) const
overridevirtual

Gets the current value of the parameter.

Returns
The current value.

Implements switchboard::BoolParameter.

◆ setValue()

void switchboard::BoolStoredParameter::setValue ( const bool newValue)
overridevirtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implements switchboard::BoolParameter.