Jamba  3.0.2
pongasoft::VST::BooleanParamConverter Class Reference

#include <ParamConverters.h>

Inherits pongasoft::VST::IParamConverter< bool >.

Public Member Functions

 BooleanParamConverter (char16 const *iFalseString=STR16("Off"), char16 const *iTrueString=STR16("On"))
 
bool denormalize (ParamValue iNormalizedValue) const override
 
int getStepCount () const override
 
ParamValue normalize (bool const &iValue) const override
 
void toString (bool const &iValue, String128 oString, int32) const override
 
- Public Member Functions inherited from pongasoft::VST::IParamConverter< bool >
virtual std::string toString (ParamType const &iValue, int32 iPrecision) const
 

Protected Attributes

char16 const * fFalseString
 
char16 const * fTrueString
 

Additional Inherited Members

- Public Types inherited from pongasoft::VST::IParamConverter< bool >
using ParamType = bool
 

Detailed Description

Manages the very common case when a param represents a boolean value. To denormalize the range [0.0,1.0] this implementation uses false for [0.0, 0.5[ and true for [0.5, 1.0] so that it matches a DiscreteValueParamConverter with a step count of 1.

Constructor & Destructor Documentation

◆ BooleanParamConverter()

pongasoft::VST::BooleanParamConverter::BooleanParamConverter ( char16 const *  iFalseString = STR16("Off"),
char16 const *  iTrueString = STR16("On") 
)
inlineexplicit

Member Function Documentation

◆ denormalize()

bool pongasoft::VST::BooleanParamConverter::denormalize ( ParamValue  iNormalizedValue) const
inlineoverridevirtual

◆ getStepCount()

int pongasoft::VST::BooleanParamConverter::getStepCount ( ) const
inlineoverridevirtual

◆ normalize()

ParamValue pongasoft::VST::BooleanParamConverter::normalize ( bool const &  iValue) const
inlineoverridevirtual

◆ toString()

void pongasoft::VST::BooleanParamConverter::toString ( bool const &  iValue,
String128  oString,
int32   
) const
inlineoverridevirtual

Member Data Documentation

◆ fFalseString

char16 const* pongasoft::VST::BooleanParamConverter::fFalseString
protected

◆ fTrueString

char16 const* pongasoft::VST::BooleanParamConverter::fTrueString
protected

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