Jamba C++ API
5.1.1
|
This is the templated version providing serializer methods, very similar to the GUIVstParameter concept. More...
#include <GUIJmbParameter.h>
Inherits ITGUIParameter< T >, IGUIJmbParameter, and FObject.
Public Types | |
using | EditorType = typename ITGUIParameter< T >::ITEditor |
using | ParamType = T |
Public Types inherited from ITGUIParameter< T > | |
using | ParamType = T |
The type of the param (alias) More... | |
using | ValueAccessor = std::function< void(T const &)> |
API to access the value of the param. More... | |
Public Member Functions | |
tresult | accessValue (typename ITGUIParameter< T >::ValueAccessor const &iGetter) const override |
std::shared_ptr< GUIDiscreteParameter > | asDiscreteParameter (int32 iStepCount) override |
Converts this parameter into a discrete parameter. More... | |
std::unique_ptr< FObjectCx > | connect (Parameters::IChangeListener *iChangeListener) const override |
std::unique_ptr< FObjectCx > | connect (Parameters::ChangeCallback iChangeCallback) const override |
std::unique_ptr< EditorType > | edit () override |
Creates an editor to modify the parameter in a transactional fashion. More... | |
JmbParamDef< T > const * | getParamDefT () const |
ParamID | getParamID () const override |
Each parameter has a unique ID returned by this method. More... | |
int32 | getStepCount () const override |
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 ). More... | |
ParamType const & | getValue () const |
ParamType & | getValue () |
GUIJmbParameter (std::shared_ptr< JmbParamDef< T >> iParamDef) | |
tresult | readFromMessage (Message const &iMessage) override |
tresult | readFromStream (IBStreamer &iStreamer) override |
tresult | resetToDefault () override |
Resets the param to its default value. More... | |
tresult | setValue (ParamType const &iValue) override |
Sets the value. More... | |
tresult | setValue (ParamType &&iValue) |
Sets the value. More... | |
std::string | toUTF8String (int32 iPrecision) const override |
Returns the current value of the parameter as a string (which is properly UTF-8 encoded). More... | |
bool | update (ParamType const &iValue) override |
Update the parameter with a value. More... | |
template<class ValueModifier > | |
bool | updateIf (ValueModifier const &iValueModifier) |
Use this flavor of update if you want to modify the value itself. More... | |
tresult | writeToMessage (Message &oMessage) const override |
tresult | writeToStream (IBStreamer &oStreamer) const override |
void | writeToStream (std::ostream &oStream) const override |
~GUIJmbParameter () override | |
Public Member Functions inherited from ITGUIParameter< T > | |
virtual tresult | accessValue (ValueAccessor const &iGetter) const =0 |
API to access the underlying value. More... | |
virtual std::unique_ptr< ITEditor > | edit (ParamType const &iValue) |
Shortcut api which creates an editor followed by ITEditor::setValue(ParamType const &) to set the parameter value to iValue . More... | |
Public Member Functions inherited from IGUIParameter | |
template<typename T > | |
std::shared_ptr< ITGUIParameter< T > > | cast () |
Downcasts this parameter into a typed version. More... | |
Public Member Functions inherited from IGUIJmbParameter | |
tresult | broadcast () const |
ParamID | getJmbParamID () const |
IJmbParamDef const * | getParamDef () const |
tresult | handleMessage (Message const &iMessage) override |
IGUIJmbParameter (std::shared_ptr< IJmbParamDef > iParamDef) | |
void | setMessageProducer (IMessageProducer *iMessageProducer) |
Protected Attributes | |
ParamType | fValue |
Protected Attributes inherited from IGUIJmbParameter | |
IMessageProducer * | fMessageProducer {} |
std::shared_ptr< IJmbParamDef > | fParamDef |
This is the templated version providing serializer methods, very similar to the GUIVstParameter concept.
T | the underlying type of the param |
using EditorType = typename ITGUIParameter<T>::ITEditor |
using ParamType = T |
|
inlineexplicit |
|
inlineoverride |
|
inlineoverride |
|
overridevirtual |
Converts this parameter into a discrete parameter.
The discrete parameter returned is a parameter with an underlying backing type int32
and values in the discrete range [0, getStepCount()]
or [0, iStepCount]
if getStepCount() <= 0
.
iStepCount | if this parameter already defines a step count (getStepCount() > 0 ), then this parameter is ignored, otherwise it is used to convert this parameter into a discrete parameter with iStepCount steps. |
nullptr
if this parameter cannot be converted to a discrete parameter. Implements IGUIParameter.
|
inlineoverridevirtual |
Implements IGUIParameter.
|
inlineoverridevirtual |
Implements IGUIParameter.
|
inlineoverridevirtual |
Creates an editor to modify the parameter in a transactional fashion.
Implements ITGUIParameter< T >.
|
inline |
|
inlineoverridevirtual |
Each parameter has a unique ID returned by this method.
GUIOptionalParam
) may return pongasoft::VST::UNDEFINED_PARAM_ID
Implements IGUIParameter.
|
inlineoverridevirtual |
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
).
asDiscreteParameter(int32)
may be able to convert/adapt it to one.> 0
if and only if this parameter is a discrete parameter. Implements IGUIParameter.
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements IGUIJmbParameter.
|
inlineoverridevirtual |
Implements IGUIJmbParameter.
|
inlineoverridevirtual |
Resets the param to its default value.
Implements IGUIParameter.
|
inlineoverridevirtual |
Sets the value.
The difference with update is that it does not check for equality (case when ParamType is not comparable)
Implements ITGUIParameter< T >.
|
inline |
Sets the value.
The difference with update is that it does not check for equality (case when ParamType is not comparable)
|
inlineoverridevirtual |
Returns the current value of the parameter as a string (which is properly UTF-8 encoded).
iPrecision | if iPrecision < 0 the parameter is free to use whichever precision is tied to the parameter otherwise it should use the one provided |
Implements IGUIParameter.
|
inlineoverridevirtual |
Update the parameter with a value.
Implements ITGUIParameter< T >.
|
inline |
Use this flavor of update if you want to modify the value itself.
ValueModifier will be called back with &fValue (of type T *
). The callback should return true when the value was updated, false otherwise
|
inlineoverridevirtual |
Implements IGUIJmbParameter.
|
inlineoverridevirtual |
Implements IGUIJmbParameter.
|
inlineoverridevirtual |
Implements IGUIJmbParameter.
|
protected |