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

#include <GUIVstParameter.h>

Public Member Functions

std::unique_ptr< FObjectCxconnect (Parameters::IChangeListener *iChangeListener) const
 
std::unique_ptr< FObjectCxconnect (Parameters::ChangeCallback iChangeCallback) const
 
tresult copyValueFrom (GUIVstParam< T > const &iParam)
 
std::unique_ptr< typename GUIVstParameter< T >::Editor > edit ()
 
std::unique_ptr< typename GUIVstParameter< T >::Editor > edit (T const &iValue)
 
bool exists () const
 
ParamValue getNormalizedValue () const
 
ParamID getParamID () const
 
getValue () const
 
 GUIVstParam ()
 
 GUIVstParam (std::unique_ptr< GUIVstParameter< T >> &&iPtr)
 
 GUIVstParam (GUIVstParam< T > &iPtr)=delete
 
 GUIVstParam (GUIVstParam< T > &&iPtr) noexcept
 
 operator T () const
 
bool operator!= (const GUIVstParam &rhs) const
 
GUIVstParam< T > & operator= (GUIVstParam< T > &&iPtr) noexcept
 
void operator= (T const &iValue)
 
bool operator== (const GUIVstParam< T > &rhs) const
 
tresult setNormalizedValue (ParamValue const &iNormalizedValue)
 
tresult setValue (T const &iValue)
 
void toString (String128 oString)
 
String toString ()
 

Private Attributes

std::unique_ptr< GUIVstParameter< T > > fPtr
 

Detailed Description

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

This is the main class that the plugin should use as it exposes only the necessary methods of the param as well as redefine a couple of operators which helps in writing simpler and natural code (the param behaves like T in many ways).

Template Parameters
Tthe underlying type of the param

Constructor & Destructor Documentation

◆ GUIVstParam() [1/4]

template<typename T>
pongasoft::VST::GUI::Params::GUIVstParam< T >::GUIVstParam ( )
inline

◆ GUIVstParam() [2/4]

template<typename T>
pongasoft::VST::GUI::Params::GUIVstParam< T >::GUIVstParam ( std::unique_ptr< GUIVstParameter< T >> &&  iPtr)
inlineexplicit

◆ GUIVstParam() [3/4]

template<typename T>
pongasoft::VST::GUI::Params::GUIVstParam< T >::GUIVstParam ( GUIVstParam< T > &  iPtr)
delete

◆ GUIVstParam() [4/4]

template<typename T>
pongasoft::VST::GUI::Params::GUIVstParam< T >::GUIVstParam ( GUIVstParam< T > &&  iPtr)
inlinenoexcept

Member Function Documentation

◆ connect() [1/2]

template<typename T>
std::unique_ptr<FObjectCx> pongasoft::VST::GUI::Params::GUIVstParam< T >::connect ( Parameters::IChangeListener iChangeListener) const
inline
Returns
an object maintaining the connection between the parameter and the listener

◆ connect() [2/2]

template<typename T>
std::unique_ptr<FObjectCx> pongasoft::VST::GUI::Params::GUIVstParam< T >::connect ( Parameters::ChangeCallback  iChangeCallback) const
inline
Returns
an object maintaining the connection between the parameter and the callback

◆ copyValueFrom()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIVstParam< T >::copyValueFrom ( GUIVstParam< T > const &  iParam)
inline

Shortcut to copy the value from another param to this one. Implementation note: uses normalized value as this is faster and avoid math precision loss in normalize/denormalize

◆ edit() [1/2]

template<typename T>
std::unique_ptr<typename GUIVstParameter<T>::Editor> pongasoft::VST::GUI::Params::GUIVstParam< T >::edit ( )
inline
Returns
an editor to modify the parameter (see Editor)

◆ edit() [2/2]

template<typename T>
std::unique_ptr<typename GUIVstParameter<T>::Editor> pongasoft::VST::GUI::Params::GUIVstParam< T >::edit ( T const &  iValue)
inline

Shortcut to create an editor and set the value to it

Returns
an editor to modify the parameter (see Editor)

◆ exists()

template<typename T>
bool pongasoft::VST::GUI::Params::GUIVstParam< T >::exists ( ) const
inline

◆ getNormalizedValue()

template<typename T>
ParamValue pongasoft::VST::GUI::Params::GUIVstParam< T >::getNormalizedValue ( ) const
inline
Returns
the current value of the parameter as a normalized value

◆ getParamID()

template<typename T>
ParamID pongasoft::VST::GUI::Params::GUIVstParam< T >::getParamID ( ) const
inline

◆ getValue()

template<typename T>
T pongasoft::VST::GUI::Params::GUIVstParam< T >::getValue ( ) const
inline
Returns
the current value of the parameter as a T (using the Denormalizer)

◆ operator T()

template<typename T>
pongasoft::VST::GUI::Params::GUIVstParam< T >::operator T ( ) const
inline

◆ operator!=()

template<typename T>
bool pongasoft::VST::GUI::Params::GUIVstParam< T >::operator!= ( const GUIVstParam< T > &  rhs) const
inline

◆ operator=() [1/2]

template<typename T>
GUIVstParam<T>& pongasoft::VST::GUI::Params::GUIVstParam< T >::operator= ( GUIVstParam< T > &&  iPtr)
inlinenoexcept

◆ operator=() [2/2]

template<typename T>
void pongasoft::VST::GUI::Params::GUIVstParam< T >::operator= ( T const &  iValue)
inline

◆ operator==()

template<typename T>
bool pongasoft::VST::GUI::Params::GUIVstParam< T >::operator== ( const GUIVstParam< T > &  rhs) const
inline

◆ setNormalizedValue()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIVstParam< T >::setNormalizedValue ( ParamValue const &  iNormalizedValue)
inline

Sets the value of this parameter as a normalized value. Note that this is "transactional" and if you want to make further changes that spans multiple calls (ex: onMouseDown / onMouseMoved / onMouseUp) you should use an editor

◆ setValue()

template<typename T>
tresult pongasoft::VST::GUI::Params::GUIVstParam< T >::setValue ( T const &  iValue)
inline

Sets the value of this parameter. Note that this is "transactional" and if you want to make further changes that spans multiple calls (ex: onMouseDown / onMouseMoved / onMouseUp) you should use an editor

◆ toString() [1/2]

template<typename T>
void pongasoft::VST::GUI::Params::GUIVstParam< T >::toString ( String128  oString)
inline

Populates the oString with a string representation of this parameter

◆ toString() [2/2]

template<typename T>
String pongasoft::VST::GUI::Params::GUIVstParam< T >::toString ( )
inline

Returns a string representation of this parameter

Member Data Documentation

◆ fPtr

template<typename T>
std::unique_ptr<GUIVstParameter<T> > pongasoft::VST::GUI::Params::GUIVstParam< T >::fPtr
private

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