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

UIntPointerParameter class. A uint parameter class that wraps an external uint variable. More...

#include <UIntPointerParameter.hpp>

Inheritance diagram for switchboard::UIntPointerParameter:
switchboard::UIntParameter switchboard::Parameter

Public Member Functions

 UIntPointerParameter (const std::string name, uint *valuePointer, const uint minimumValue, const uint maximumValue)
 UIntPointerParameter constructor with a uint pointer.
 
 UIntPointerParameter (std::string name, std::atomic< uint > *atomicValuePointer, const uint minimumValue, const uint maximumValue)
 UIntPointerParameter constructor with an atomic uint pointer.
 
uint getValue () const override
 Gets the current value of the parameter.
 
void setValue (const uint newValue) override
 Sets a new value for the parameter.
 
uint getMinimumValue () const override
 Gets the minimum value for the parameter.
 
uint getMaximumValue () const override
 Gets the maximum value for the parameter.
 
- Public Member Functions inherited from switchboard::UIntParameter
 UIntParameter (const std::string &id, const std::string &name, const std::string &description)
 UIntParameter constructor.
 
virtual ~UIntParameter ()=default
 UIntParameter 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

UIntPointerParameter class. A uint parameter class that wraps an external uint variable.

Constructor & Destructor Documentation

◆ UIntPointerParameter() [1/2]

switchboard::UIntPointerParameter::UIntPointerParameter ( const std::string name,
uint * valuePointer,
const uint minimumValue,
const uint maximumValue )

UIntPointerParameter constructor with a uint pointer.

Parameters
idThe unique identifier of the parameter.
nameThe name of the parameter.
descriptionThe description of the parameter.
valuePointerPointer to the boolean value.
minimumValueMinimum value for the parameter.
maximumValueMaximum value for the parameter.

◆ UIntPointerParameter() [2/2]

switchboard::UIntPointerParameter::UIntPointerParameter ( std::string name,
std::atomic< uint > * atomicValuePointer,
const uint minimumValue,
const uint maximumValue )

UIntPointerParameter constructor with an atomic uint pointer.

Parameters
nameThe name of the parameter.
atomicValuePointerAtomic pointer to the boolean value.
minimumValueMinimum value for the parameter.
maximumValueMaximum value for the parameter.

Member Function Documentation

◆ getMaximumValue()

uint switchboard::UIntPointerParameter::getMaximumValue ( ) const
overridevirtual

Gets the maximum value for the parameter.

Returns
The maximum value.

Implements switchboard::UIntParameter.

◆ getMinimumValue()

uint switchboard::UIntPointerParameter::getMinimumValue ( ) const
overridevirtual

Gets the minimum value for the parameter.

Returns
The minimum value.

Implements switchboard::UIntParameter.

◆ getValue()

uint switchboard::UIntPointerParameter::getValue ( ) const
overridevirtual

Gets the current value of the parameter.

Returns
The current value.

Implements switchboard::UIntParameter.

◆ setValue()

void switchboard::UIntPointerParameter::setValue ( const uint newValue)
overridevirtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implements switchboard::UIntParameter.