Jamba  3.0.2
pongasoft::VST::GUI::Params::GUIJmbParameter< T > Class Template Reference

#include <GUIJmbParameter.h>

Inherits pongasoft::VST::GUI::Params::IGUIJmbParameter, and FObject.

Public Types

using ParamType = T
 

Public Member Functions

std::unique_ptr< FObjectCxconnect (Parameters::IChangeListener *iChangeListener)
 
std::unique_ptr< FObjectCxconnect (Parameters::ChangeCallback iChangeCallback)
 
JmbParamDef< T > const * getParamDefT () const
 
ParamType const & getValue () const
 
ParamTypegetValue ()
 
 GUIJmbParameter (std::shared_ptr< JmbParamDef< T >> iParamDef)
 
tresult readFromMessage (Message const &iMessage) override
 
tresult readFromStream (IBStreamer &iStreamer) override
 
void setValue (ParamType const &iValue)
 
void setValue (ParamType &&iValue)
 
bool update (ParamType const &iValue)
 
template<class ValueModifier >
bool updateIf (ValueModifier const &iValueModifier)
 
tresult writeToMessage (Message &oMessage) const override
 
tresult writeToStream (IBStreamer &oStreamer) const override
 
void writeToStream (std::ostream &oStream) const override
 
- Public Member Functions inherited from pongasoft::VST::GUI::Params::IGUIJmbParameter
tresult broadcast () const
 
IJmbParamDef const * getParamDef () const
 
ParamID getParamID () const
 
tresult handleMessage (Message const &iMessage) override
 
 IGUIJmbParameter (std::shared_ptr< IJmbParamDef > iParamDef)
 
void setMessageProducer (IMessageProducer *iMessageProducer)
 
- Public Member Functions inherited from pongasoft::VST::IMessageHandler
virtual ~IMessageHandler ()=default
 

Protected Attributes

ParamType fValue
 
- Protected Attributes inherited from pongasoft::VST::GUI::Params::IGUIJmbParameter
IMessageProducerfMessageProducer {}
 
std::shared_ptr< IJmbParamDeffParamDef
 

Detailed Description

template<typename T>
class pongasoft::VST::GUI::Params::GUIJmbParameter< T >

This is the templated version providing serializer methods, very similar to the GUIVstParameter concept.

Template Parameters
Tthe underlying type of the param

Member Typedef Documentation

◆ ParamType

template<typename T>
using pongasoft::VST::GUI::Params::GUIJmbParameter< T >::ParamType = T

Constructor & Destructor Documentation

◆ GUIJmbParameter()

template<typename T>
pongasoft::VST::GUI::Params::GUIJmbParameter< T >::GUIJmbParameter ( std::shared_ptr< JmbParamDef< T >>  iParamDef)
inlineexplicit

Member Function Documentation

◆ connect() [1/2]

template<typename T>
std::unique_ptr<FObjectCx> pongasoft::VST::GUI::Params::GUIJmbParameter< T >::connect ( Parameters::IChangeListener iChangeListener)
inline
Returns
a connection that will listen to parameter changes (see GUIParamCx)

◆ connect() [2/2]

template<typename T>
std::unique_ptr<FObjectCx> pongasoft::VST::GUI::Params::GUIJmbParameter< T >::connect ( Parameters::ChangeCallback  iChangeCallback)
inline
Returns
a connection that will listen to parameter changes (see GUIParamCx)

◆ getParamDefT()

template<typename T>
JmbParamDef<T> const* pongasoft::VST::GUI::Params::GUIJmbParameter< T >::getParamDefT ( ) const
inline

◆ getValue() [1/2]

template<typename T>
ParamType const& pongasoft::VST::GUI::Params::GUIJmbParameter< T >::getValue ( ) const
inline

◆ getValue() [2/2]

template<typename T>
ParamType& pongasoft::VST::GUI::Params::GUIJmbParameter< T >::getValue ( )
inline

◆ readFromMessage()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIJmbParameter< T >::readFromMessage ( Message const &  iMessage)
inlineoverridevirtual

◆ readFromStream()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIJmbParameter< T >::readFromStream ( IBStreamer &  iStreamer)
inlineoverridevirtual

◆ setValue() [1/2]

template<typename T>
void pongasoft::VST::GUI::Params::GUIJmbParameter< T >::setValue ( ParamType const &  iValue)
inline

Sets the value. The difference with update is that it does not check for equality (case when ParamType is not comparable)

◆ setValue() [2/2]

template<typename T>
void pongasoft::VST::GUI::Params::GUIJmbParameter< T >::setValue ( ParamType &&  iValue)
inline

Sets the value. The difference with update is that it does not check for equality (case when ParamType is not comparable)

◆ update()

template<typename T>
bool pongasoft::VST::GUI::Params::GUIJmbParameter< T >::update ( ParamType const &  iValue)
inline

Update the parameter with a value.

Returns
true if the value was actually updated, false if it is the same

◆ updateIf()

template<typename T>
template<class ValueModifier >
bool pongasoft::VST::GUI::Params::GUIJmbParameter< T >::updateIf ( ValueModifier const &  iValueModifier)
inline

Use this flavor of update if you want to modify the value itself. ValueModifier will be called back with &fValue. The callback should return true when the value was updated, false otherwise

◆ writeToMessage()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIJmbParameter< T >::writeToMessage ( Message oMessage) const
inlineoverridevirtual

◆ writeToStream() [1/2]

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIJmbParameter< T >::writeToStream ( IBStreamer &  oStreamer) const
inlineoverridevirtual

◆ writeToStream() [2/2]

template<typename T>
void pongasoft::VST::GUI::Params::GUIJmbParameter< T >::writeToStream ( std::ostream &  oStream) const
inlineoverridevirtual

Member Data Documentation

◆ fValue

template<typename T>
ParamType pongasoft::VST::GUI::Params::GUIJmbParameter< T >::fValue
protected

The documentation for this class was generated from the following file: