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

StringStoredParameter class. More...

#include <StringStoredParameter.hpp>

Inheritance diagram for switchboard::StringStoredParameter:
switchboard::StringParameter switchboard::Parameter

Public Member Functions

WASM StringStoredParameter (const std::string &id, const std::string &name, const std::string &description, const std::string defaultValue)
 StringStoredParameter constructor with a default value.
 
WASM std::string getValue () const override
 Gets the current value of the parameter.
 
WASM void setValue (const std::string newValue) override
 Sets a new value for the parameter.
 
- Public Member Functions inherited from switchboard::StringParameter
 StringParameter (const std::string &id, const std::string &name, const std::string &description)
 StringParameter constructor.
 
virtual ~StringParameter ()=default
 StringParameter destructor.
 
void setValue (std::any newValue) override
 Sets the value of the parameter.
 
- Public Member Functions inherited from switchboard::Parameter
 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.
 

Additional Inherited Members

- Public Types inherited from switchboard::Parameter
enum class  Type {
  Float , Bool , Int , UInt ,
  String
}
 
- Protected Attributes inherited from switchboard::Parameter
Type type
 
std::string id
 
std::string name
 
std::string description
 

Detailed Description

Constructor & Destructor Documentation

◆ StringStoredParameter()

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

StringStoredParameter constructor with a default value.

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

Member Function Documentation

◆ getValue()

std::string switchboard::StringStoredParameter::getValue ( ) const
overridevirtual

Gets the current value of the parameter.

Returns
The current value.

Implements switchboard::StringParameter.

◆ setValue()

void switchboard::StringStoredParameter::setValue ( const std::string newValue)
overridevirtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implements switchboard::StringParameter.