Wrapper instance returned by ParamAware::registerBaseParam() methods.
More...
#include <IGUIParameter.h>
Wrapper instance returned by ParamAware::registerBaseParam() methods.
You can test for the actual existence of the parameter with the IGUIParam::exists() method.
- Note
- Although this wrapper does little more than the shared pointer, it is implemented for symmetry with other parameters (
GUIVstParam and GUIJmbParam) and hides some implementation details. As a result, it is strongly recommended to use this wrapper instead of IGUIParameter directly.
◆ IGUIParam()
◆ connect() [1/2]
Creates a connection between this parameter and the change listener: whenever the parameter changes, the listener will be notified of the changes (Parameters::IChangeListener::onParameterChange(ParamID)).
- Note
- This method is usually invoked by the framework but it may be used in the rare cases when the caller requires to handle the duration of the connection in a more granular fashion
- Parameters
-
| iChangeListener | the listener that will be notified on parameter changes. nullptr is allowed and will be a noop. |
- Returns
- the connection between this parameter and the listener and is maintained for as long as this pointer exists
◆ connect() [2/2]
Creates a connection between this parameter and the callback: whenever the parameter changes, the callback will be invoked (std::function<void()>).
- Note
- This method is usually invoked by the framework but it may be used in the rare cases when the caller requires to handle the duration of the connection in a more granular fashion
- Parameters
-
| iChangeCallback | the callback that will be invoked on parameter changes. |
- Returns
- the connection between this parameter and the callback and is maintained for as long as this pointer exists
◆ exists()
Returns true if this wrapper actually refers to an actual parameter.
◆ getParamID()
| ParamID getParamID |
( |
| ) |
const |
|
inline |
◆ getStepCount()
| int32 getStepCount |
( |
| ) |
const |
|
inline |
When a parameter is a discrete parameter (which means its underlying backing type is an int32 with values in the discrete range [0, getStepCount()]), this method will return the number of steps (> 0).
- Note
- Although a parameter may not be a discrete parameter itself, the method
asDiscreteParameter(int32) may be able to convert/adapt it to one.
- Returns
- the number of steps which is
> 0 if and only if this parameter is a discrete parameter.
◆ resetToDefault()
Resets the parameter to its default value.
◆ toUTF8String()
| std::string toUTF8String |
( |
int32 |
iPrecision | ) |
const |
|
inline |
Returns the current value of the parameter as a string (which is properly UTF-8 encoded).
- Parameters
-
| iPrecision | if iPrecision < 0 the parameter is free to use whichever precision is tied to the parameter otherwise it should use the one provided |
◆ fPtr
The documentation for this class was generated from the following file: