Switchboard SDK
Loading...
Searching...
No Matches
switchboard::UIntCallbackParameter< T > Class Template Reference

UIntCallbackParameter class. A uint parameter class that wraps a getter and a setter methods. More...

#include <UIntCallbackParameter.hpp>

Inheritance diagram for switchboard::UIntCallbackParameter< T >:
switchboard::UIntParameter switchboard::Parameter

Public Types

typedef uint(T::* UIntGetter) () const
 
typedef void(T::* UIntSetter) (uint)
 
- Public Types inherited from switchboard::Parameter
enum class  Type { Float , Bool , Int , UInt }
 

Public Member Functions

 UIntCallbackParameter (const std::string name, T *instance, UIntGetter getter, UIntSetter setter, const uint minimumValue, const uint maximumValue)
 UIntCallbackParameter constructor.
 
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 name)
 UIntParameter constructor.
 
virtual ~UIntParameter ()=default
 UIntParameter destructor.
 
- Public Member Functions inherited from switchboard::Parameter
 Parameter (const Type type, const std::string name)
 
virtual ~Parameter ()=default
 Parameter destructor.
 
const std::string & getName () const
 Gets the name of the parameter.
 
Type getType () const
 Gets the type of the parameter.
 

Additional Inherited Members

- Protected Attributes inherited from switchboard::Parameter
Type type
 
std::string name
 

Detailed Description

template<typename T>
class switchboard::UIntCallbackParameter< T >

UIntCallbackParameter class. A uint parameter class that wraps a getter and a setter methods.

Constructor & Destructor Documentation

◆ UIntCallbackParameter()

template<typename T >
switchboard::UIntCallbackParameter< T >::UIntCallbackParameter ( const std::string name,
T * instance,
UIntGetter getter,
UIntSetter setter,
const uint minimumValue,
const uint maximumValue )
inline

UIntCallbackParameter constructor.

Parameters
nameThe name of the parameter.
instancePointer to the instance that the getter and setter methods belong to.
getterThe getter method for the parameter.
setterThe setter method for the parameter.
minimumValueMinimum value for the parameter.
maximumValueMaximum value for the parameter.

Member Function Documentation

◆ getMaximumValue()

template<typename T >
uint switchboard::UIntCallbackParameter< T >::getMaximumValue ( ) const
inlineoverridevirtual

Gets the maximum value for the parameter.

Returns
The maximum value.

Implements switchboard::UIntParameter.

◆ getMinimumValue()

template<typename T >
uint switchboard::UIntCallbackParameter< T >::getMinimumValue ( ) const
inlineoverridevirtual

Gets the minimum value for the parameter.

Returns
The minimum value.

Implements switchboard::UIntParameter.

◆ getValue()

template<typename T >
uint switchboard::UIntCallbackParameter< T >::getValue ( ) const
inlineoverridevirtual

Gets the current value of the parameter.

Returns
The current value.

Implements switchboard::UIntParameter.

◆ setValue()

template<typename T >
void switchboard::UIntCallbackParameter< T >::setValue ( const uint newValue)
inlineoverridevirtual

Sets a new value for the parameter.

Parameters
newValueThe new value for the parameter.

Implements switchboard::UIntParameter.