IntCallbackParameter class. A int parameter class that wraps a getter and a setter methods.
More...
#include <IntCallbackParameter.hpp>
|
typedef int(T::* | IntGetter) () const |
|
typedef void(T::* | IntSetter) (int) |
|
enum class | Type { Float
, Bool
, Int
, UInt
} |
|
|
| IntCallbackParameter (const std::string name, T *instance, IntGetter getter, IntSetter setter, const int minimumValue, const int maximumValue) |
| IntCallbackParameter constructor.
|
|
int | getValue () const override |
| Gets the current value of the parameter.
|
|
void | setValue (const int newValue) override |
| Sets a new value for the parameter.
|
|
int | getMinimumValue () const override |
| Gets the minimum value for the parameter.
|
|
int | getMaximumValue () const override |
| Gets the maximum value for the parameter.
|
|
| IntParameter (const std::string name) |
| IntParameter constructor.
|
|
virtual | ~IntParameter ()=default |
| IntParameter destructor.
|
|
| 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.
|
|
|
Type | type |
|
std::string | name |
|
template<typename T>
class switchboard::IntCallbackParameter< T >
IntCallbackParameter class. A int parameter class that wraps a getter and a setter methods.
◆ IntCallbackParameter()
template<typename T >
switchboard::IntCallbackParameter< T >::IntCallbackParameter |
( |
const std::string | name, |
|
|
T * | instance, |
|
|
IntGetter | getter, |
|
|
IntSetter | setter, |
|
|
const int | minimumValue, |
|
|
const int | maximumValue ) |
|
inline |
IntCallbackParameter constructor.
- Parameters
-
name | The name of the parameter. |
instance | Pointer to the instance that the getter and setter methods belong to. |
getter | The getter method for the parameter. |
setter | The setter method for the parameter. |
minimumValue | Minimum value for the parameter. |
maximumValue | Maximum value for the parameter. |
◆ getMaximumValue()
◆ getMinimumValue()
◆ getValue()
◆ setValue()
Sets a new value for the parameter.
- Parameters
-
newValue | The new value for the parameter. |
Implements switchboard::IntParameter.